Skip to content

MCP server

rainfall_thresholds.mcp_server

The MCP server: the thresholds as tools an assistant can call.

pip install "rainfall-thresholds[mcp]"
rainfall-thresholds-mcp            # on standard input and output

The tools compute only from what the call gives them: no network, no live rain. Bring the rain from a gauge, a radar or a model; the answer says how far it is from the threshold, and that a threshold exceeded is not an alert. The tools are the functions of :mod:rainfall_thresholds.facts, and check is :func:rainfall_thresholds.check.check_text.

create_server

create_server() -> MCPServer[Any]

The MCP server with its four tools.

run

run() -> None

Serve on standard input and output, until the client hangs up.