DB Timetable MCP Server
DB時刻表MCPサーバー
ドイツ鉄道時刻表 API 用のモデル コンテキスト プロトコル (MCP) サーバー。サーバーは、時刻表データ、駅情報、列車の変更にアクセスするための MCP ツールとリソースを提供します。
命名義務:
このプロジェクトは、クリエイティブ コモンズ アトリビューション 4.0 国際ライセンス (CC BY 4.0)に基づいて公開されているドイツ鉄道の時刻表データを提供します。
API およびライセンス条件の詳細については、 developers.deutschebahn.comをご覧ください。 API リクエストにはライセンスの条件が適用されます。
機能
現在の時刻表: 駅の現在の時刻表データを取得します
時刻表の変更:最新の変更を追跡する
予定時刻表: 特定の時間の予定時刻表データへのアクセス
駅検索:駅名またはコードで駅を検索します
Related MCP server: db-mcp
要件
Node.js 18以上
DBタイムテーブルAPIのAPI認証情報(クライアントIDとクライアントシークレット)
インストール
リポジトリのクローン:
git clone <repository-url> cd db-mcp依存関係をインストールします:
npm installTypeScript コードをコンパイルします。
npm run build
構成
次の環境変数を使用して、プロジェクトのルート ディレクトリに.envファイルを作成します。
DB_TIMETABLE_CLIENT_ID=deine-client-id
DB_TIMETABLE_CLIENT_SECRET=dein-client-secret
TRANSPORT_TYPE=stdio
PORT=8080
SSE_ENDPOINT=/sse
LOG_LEVEL=info設定オプション
DB_TIMETABLE_CLIENT_ID: DB APIのクライアントID(必須)DB_TIMETABLE_CLIENT_SECRET: DB APIのクライアントシークレット(必須)TRANSPORT_TYPE: MCP サーバーのトランスポートタイプ (stdioまたはsse、デフォルト:stdio)PORT: SSEサーバーのポート(デフォルト:8080)SSE_ENDPOINT: SSE接続のエンドポイント(デフォルト:/sse)LOG_LEVEL: ログレベル (debug、info、warn、error、デフォルト:info)
使用
サーバーを起動する
stdio モード (CLI テストおよびデバッグ用):
npm startSSE モード (Web クライアントの場合):
TRANSPORT_TYPE=sse npm start検査モードでテストする
サーバーは FastMCP Inspector を使用してテストできます。
npx fastmcp inspect path/to/index.jsMCPツール
サーバーは次のツールを提供します。
getCurrentTimetable : 駅の現在の時刻表データを取得します
パラメータ:
evaNo- 駅のEVA番号(例:フランクフルト中央駅の場合は8000105)
getRecentChanges : ステーションの最近の変更を取得します
パラメータ:
evaNo- 駅のEVA番号(例:フランクフルト中央駅の場合は8000105)
getPlannedTimetable : 駅の予定時刻表データを取得します
パラメータ:
evaNo- 駅のEVA番号(例:フランクフルト中央駅の場合は8000105)date- YYMMDD形式の日付(例:2023年4月1日の場合は230401)hour- HH 形式の時間 (例: 午後 2 時の場合は 14)
findStations : 検索パターンを使用してステーションを検索します
パラメータ:
pattern- 検索パターン(例:「Frankfurt」または「BLS」)
MCPリソース
サーバーは次のリソースを提供します。
現在の時刻表データ:
db-api:timetable/current/{evaNo}現在の時刻表の変更:
db-api:timetable/changes/{evaNo}計画時刻表データ:
db-api:timetable/planned/{evaNo}/{date}/{hour}駅検索:
db-api:station/{pattern}
発達
プロジェクト構造
db-mcp/
├── src/
│ ├── api/ # API-Client und Typen
│ ├── tools/ # MCP-Tools
│ ├── resources/ # MCP-Ressourcen
│ ├── utils/ # Hilfsfunktionen
│ ├── config.ts # Konfiguration
│ └── index.ts # Haupteinstiegspunkt
├── dist/ # Kompilierte Dateien
├── .env # Umgebungsvariablen
├── package.json
├── tsconfig.json
└── README.mdNPMスクリプト
npm run build: TypeScriptコードをコンパイルするnpm start: サーバーを起動しますnpm run dev: 自動リロードで開発モードでサーバーを起動しますnpm test: テストを実行する
拡張性
潜在的な拡張
データ処理と拡充
セマンティック時刻表データ処理: XML からセマンティックエンリッチメントによる構造化 JSON へ
遅延や混乱に関する履歴データ分析
複合輸送接続の統合
高度なMCPツール
駅間のルート計画
AIベースの遅延と容量予測
旅行中断分析
駅や乗り換えのアクセシビリティチェック
ライセンス
MCP サーバー: MIT ライセンス
DBタイムテーブルAPI:クリエイティブ・コモンズ 表示4.0 国際ライセンス
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceProvides unified access to Deutsche Bahn APIs for real-time railway data, station information, timetables, disruptions, parking, and accessibility services.18
- AlicenseAqualityBmaintenanceAn MCP server that exposes the Deutsche Bahn public transport API to any MCP-compatible client (Claude Desktop, Cursor, Cline, Continue, etc.). Five tools cover station search, departures, journey planning, trip details, and nearby stations.6MIT
- FlicenseAqualityDmaintenanceMCP server for querying German public transport information, including station search, live departures/arrivals, and journey planning.5
- AlicenseAqualityDmaintenanceProvides access to Deutsche Bahn's timetable data through MCP, enabling real-time train schedules, station search, and change tracking for German railway stations.470MIT
Related MCP Connectors
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
iRail MCP — Belgian rail (SNCB/NMBS) real-time via the community iRail API
TravelMind: 8 MCP tools for travel (12306 trains, flights, hotels, geocode, planning, policy).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jorekai/db-timetable-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server