49b9bb6724
Deploy Docs / deploy-docs (push) Failing after 1s
Conformance Tests / client-conformance (push) Failing after 3s
Conformance Tests / server-conformance (push) Failing after 1s
GitHub Actions Security Analysis / zizmor (push) Failing after 1s
CI / checks (push) Failing after 59m20s
CI / all-green (push) Waiting to run
16 lines
322 B
Python
16 lines
322 B
Python
from mcp.server import MCPServer
|
|
|
|
mcp = MCPServer("Weather")
|
|
|
|
|
|
class Station:
|
|
def __init__(self, name: str, online: bool):
|
|
self.name = name
|
|
self.online = online
|
|
|
|
|
|
@mcp.tool()
|
|
def get_station(name: str) -> Station:
|
|
"""Look up a weather station by name."""
|
|
return Station(name=name, online=True)
|