
paulvonberg/db-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
A comprehensive Model Context Protocol (MCP) server that provides unified access to Deutsche Bahn (DB) and German mobility APIs.
概要
A comprehensive Model Context Protocol (MCP) server that provides unified access to Deutsche Bahn (DB) and German mobility APIs. Built with Python, FastAPI, and FastMCP for seamless integration with Claude Desktop and other MCP clients. The server is ready for local and cloud deployment. A running MCP server is available to connect by adding the URL to your MCP Client: [SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]. - : Stations, timetables, real-time disruptions, and parking - : Full support for tools, prompts, and resources - : Security headers, rate limiting, input validation - : Clean, maintainable codebase structure - : Designed for Google Cloud Run deployment - : Comprehensive guides and reference materials - Python 3.11+ - Deutsche Bahn API credentials (Get them here) - Google Cloud account (for deployment) 2. Next, edit the new .env file with your DB API credentials. See the "Configuration" section for details on each variable.
README
以下は原文 README の抜粋です。原文を見る。
Deutsche Bahn MCP Server
A comprehensive Model Context Protocol (MCP) server that provides unified access to Deutsche Bahn (DB) and German mobility APIs. Built with Python, FastAPI, and FastMCP for seamless integration with Claude Desktop and other MCP clients.
The server is ready for local and cloud deployment. A running MCP server is available to connect by adding the URL to your MCP Client: [SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED].
🚀 Features
- 🚄 Complete Railway Data: Stations, timetables, real-time disruptions, and parking
- 🤖 MCP Protocol: Full support for tools, prompts, and resources
- 🛡️ Production Ready: Security headers, rate limiting, input validation
- 🏗️ Modular Architecture: Clean, maintainable codebase structure
- ☁️ Cloud Native: Designed for Google Cloud Run deployment
- 📚 Rich Documentation: Comprehensive guides and reference materials
📋 Quick Start (for developers - User instructions below)
Prerequisites
- Python 3.11+
- Deutsche Bahn API credentials (Get them here)
- Google Cloud account (for deployment)
Local Development
-
Clone and setup:
git clone cd deutsche-bahn-mcp-server python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt -
Configure environment:
cp .env.example .envNext, edit the new
.envfile with your DB API credentials. See the “Configuration” section for details on each variable. -
Run the server:
python main.py # Server available at http://localhost:8080
🎯 Live Server Usage Guide
[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]
🖥️ Claude Desktop Setup
Step 1: Locate your configuration file
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\\Claude\\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Step 2: Edit the configuration Open the file and add the Deutsche Bahn server:
{
"mcpServers": {
"deutschebahn": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://[SERVER DECOMISSIONED - Use your URL]/mcp",
"--transport", "http-only"
]
}
}
}
Step 3: Restart Claude Desktop
- Close Claude Desktop completely
- Reopen the application
- You should see “Deutsche Bahn MCP Server” in the MCP section
Step 4: Test the connection Ask Claude: “What train stations are in Berlin?”
🌐 Claude.ai Web Usage
Step 1: Start a conversation Go to claude.ai and begin a new conversation.
Step 2: Add the MCP Server Click on “Search and Tools > Add connectors > Manage connectors” Select “Add custom connector” Enter a name, e.g.: “Deutsche Bahn MCP Server”
インストール
npx -y mcp-remote https://[SERVER DECOMISSIONED - Use your URL設定
{
"mcpServers": {
"deutschebahn": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://[SERVER DECOMISSIONED - Use your URL]/mcp",
"--transport", "http-only"
]
}
}
}