MCP server
InfraNode ships an official MCP server. It exposes the open city data as tools an AI agent can call directly, so you do not write HTTP calls by hand.
Note
The install command shown below requires a local repository. The source code will be published shortly; until then the MCP installation is only possible with repository access.
What is MCP
The Model Context Protocol (MCP) is an open standard through which AI agents plug in external tools and data sources. An MCP server registers its tools with the client, the agent calls them with typed arguments when needed and receives structured JSON back. For you as a developer that means: instead of building an API integration, you register a server once and your agent can use the data right away. The InfraNode server speaks stdio and runs as a local subprocess of your client; it opens no network port of its own.
Setup in Claude Code
Register the server with a single command. Claude Code starts it as a local subprocess when needed.
claude mcp add infranode -- uv run --group mcp python -m infranode.mcp{
"mcpServers": {
"infranode": {
"command": "uv",
"args": ["run", "--group", "mcp", "python", "-m", "infranode.mcp"]
}
}
}{
"mcpServers": {
"infranode": {
"command": "uv",
"args": ["run", "--group", "mcp", "python", "-m", "infranode.mcp"],
"env": {
"INFRANODE_MCP_API_BASE": "https://infranode.dev/api/v1"
}
}
}
} Once added, the InfraNode tools are available in the agent.
Setup in Claude Desktop
Add the server to claude_desktop_config.json under the
mcpServers key (second tab above). The file lives at:
-
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
You can optionally set the base URL per entry via the
INFRANODE_MCP_API_BASE environment variable (third tab). Restart
Claude Desktop after saving so the server loads.
What the server runs against
The MCP server is a thin wrapper around the InfraNode live API. Each tool
calls the public REST API and passes its normalised JSON through unchanged.
By default the server talks to the public API at
https://infranode.dev/api/v1. There is no mapping logic in the
server and no API key for read access.
Tool overview
The server registers one tool per city-data resource, 21 in total. Each tool
expects a city slug (for example berlin or
hamburg); pois also takes an optional
type parameter.
Core and geo
| Tool | Description |
|---|---|
get_city | City master data |
geo | Geo data |
demographics | Demographics |
Environment and weather
| Tool | Description |
|---|---|
air_quality | Air quality |
air_quality_live | Air quality, live readings |
weather | Weather |
pollen_uv | Pollen and UV index |
Mobility and traffic
| Tool | Description |
|---|---|
traffic | Traffic situation |
transit | Public transit |
charging | Charging stations |
road_events | Road and construction notices |
Water and situation
| Tool | Description |
|---|---|
water_level | Water levels |
flood | Flood situation |
Health and energy
| Tool | Description |
|---|---|
health | Health data |
icu_live | ICU beds, live |
energy | Energy |
City life and politics
| Tool | Description |
|---|---|
pois | Points of interest (optionally filtered by type) |
events | Events |
webcams | Webcams |
election | Election results |
holidays | Public holidays |
Example call
An agent fetches the master data for Berlin. The result is the live API's normalised JSON, passed through unchanged.
get_city(slug="berlin")