A Model Context Protocol server providing real-time Deutsche Bahn travel data — departures, journeys, trip details, and station search.
claude mcp add db-mcp --transport http https://mcp-builder.de/db/mcpAdd to your MCP client config:
{
"mcpServers": {
"db-mcp": {
"url": "https://mcp-builder.de/db/mcp"
}
}
}git clone <repo-url> && cd db
npm install && npm run buildThen add to your client config:
{
"mcpServers": {
"db-mcp": {
"command": "node",
"args": ["/absolute/path/to/db/build/index.js"]
}
}
}Search for a Deutsche Bahn station by name.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | yes | Station name to search for |
results |
number | no | Number of results (default 1) |
Get upcoming departures from a station.
| Parameter | Type | Required | Description |
|---|---|---|---|
station_id |
string | yes | Station ID (e.g. 8000261 for München Hbf) |
when |
string | no | ISO 8601 datetime (defaults to now) |
duration |
number | no | Duration in minutes to query (default 60) |
Get full trip details for a specific train, including all stopovers and remarks.
| Parameter | Type | Required | Description |
|---|---|---|---|
train_name |
string | yes | Train name (e.g. ICE 599) |
station_id |
string | yes | Station ID (e.g. 8000261 for München Hbf) |
date |
string | yes | ISO date (e.g. 2026-03-08) |
Find journey connections between two stations.
| Parameter | Type | Required | Description |
|---|---|---|---|
from_id |
string | yes | Departure station ID |
to_id |
string | yes | Arrival station ID |
departure |
string | yes | ISO datetime (e.g. 2026-03-08T14:00) |
results |
number | no | Number of journeys to return (default 4) |
The server includes built-in instructions that guide the LLM to:
- Always show actual (not planned) times, platforms, and line info
- Warn about platform changes
- Flag replacement bus services
- Inform about passenger rights when delays exceed 60 minutes
- Check reachable intermediate stops when suggesting alternatives
The server auto-selects its transport based on the PORT environment variable:
PORT set? |
Transport | Use case |
|---|---|---|
| Yes | Streamable HTTP | Remote / hosted |
| No | stdio | Local via MCP client |
npm install
npm run build
npm run serve # starts HTTP on port 3000MIT