
jorekai/db-timetable-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Ein Model Context Protocol (MCP) Server für die Deutsche Bahn Timetable API
Обзор
A Model Context Protocol server for the official Deutsche Bahn Timetables API. It converts the compact DB XML into semantic JSON and merges the planned schedule with live changes into one station board. - effective holds the value to display. planned and changed explain the deviation. - Tools return structuredContent, descriptive JSON schemas, and a data model available as an MCP resource. - Official TypeScript SDK, stdio for local clients, stateless Streamable HTTP for remote operation. - No logs on stdout, loopback binding unless you change it, host allowlist, timeouts, non-root container, reproducible lockfile. - Unit, contract, and transport tests, coverage thresholds, CI, dependency and secret checks. Requirements: Node.js 22 or 24 LTS, and a subscribed Timetables product in the DB API Marketplace. In stdio mode the process waits for an MCP client. Status messages go to stderr only. stdout stays reserved for JSON-RPC.
README
Показан фрагмент оригинального README. Открыть оригинал.
DB Timetable MCP Server
A Model Context Protocol server for the official Deutsche Bahn Timetables API. It converts the compact DB XML into semantic JSON and merges the planned schedule with live changes into one station board.
What it guarantees
- Correct platforms and times.
effectiveholds the value to display.plannedandchangedexplain the deviation. - Output built for models. Tools return
structuredContent, descriptive JSON schemas, and a data model available as an MCP resource. - MCP conformance. Official TypeScript SDK, stdio for local clients, stateless Streamable HTTP for remote operation.
- Safe defaults. No logs on
stdout, loopback binding unless you change it, host allowlist, timeouts, non-root container, reproducible lockfile. - Verifiable behaviour. Unit, contract, and transport tests, coverage thresholds, CI, dependency and secret checks.
Quick start
Requirements: Node.js 22 or 24 LTS, and a subscribed Timetables product in the DB API Marketplace.
git clone https://github.com/jorekai/db-timetable-mcp.git
cd db-timetable-mcp
npm ci
cp .env.example .env
Fill in .env:
DB_TIMETABLE_CLIENT_ID=deine-client-id
DB_TIMETABLE_CLIENT_SECRET=dein-api-key
Then build and start:
npm run build
npm start
In stdio mode the process waits for an MCP client. Status messages go to stderr only. stdout stays reserved for JSON-RPC.
Claude Desktop
Run npm ci && npm run build first, then point the configuration at an absolute path in claude_desktop_config.json.
macOS/Linux:
{
"mcpServers": {
"db-timetable": {
"command": "node",
"args": ["/absolute/path/db-timetable-mcp/dist/index.js"]
}
}
}
Windows:
{
"mcpServers": {
"db-timetable": {
"command": "node",
"args": ["C:\\absolute\\path\\db-timetable-mcp\\dist\\index.js"]
}
}
}
The .env file is looked up in the current working directory and next to the project directory, which covers the case where Claude Desktop starts the compiled server from somewhere else. You can also set the two credentials in the env object of the MCP entry instead.
After a configuration change, quit Claude Desktop completely and start it again. More in Troubleshooting.
Tools
| Tool | Purpose |
|---|---|
getStationBoard |
Recommended. Joins the planned schedule and the full change set into a live station board |
getPlannedTimetable |
Static planned timetable for an EVA number, date, and hour |
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"db-timetable": {
"command": "node",
"args": ["/absolute/path/db-timetable-mcp/dist/index.js"]
}
}
}