
An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

A Model Context Protocol server built with Python, FastAPI, and FastMCP that gives MCP clients access to Deutsche Bahn and German mobility APIs.
Deutsche Bahn MCP Server is cataloged as an MCP server attributed to paulvonberg. A Model Context Protocol server built with Python, FastAPI, and FastMCP that gives MCP clients access to Deutsche Bahn and German mobility APIs. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Creative Commons Attribution 4.0 International License (CC BY 4.0). Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Deutsche Bahn MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
README.md · 74852f7139f2 · Fetched 2026-11-13 13:33:41 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
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].
Clone and setup:
git clone <repository-url>
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 .env
Next, edit the new .env file 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
[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]
Step 1: Locate your configuration file
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\\Claude\\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonStep 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
Step 4: Test the connection Ask Claude: "What train stations are in Berlin?"
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" Enter this remote MCP Server URL: [SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]
Step 3: Test immediately Try asking: "Find train stations near Frankfurt and check for any current delays at Frankfurt Hauptbahnhof."
Once connected, try these practical examples:
🔍 Station Search
🚄 Real-time Information
♿ Accessibility Planning
🅿️ Parking Information
🗺️ Travel Planning
Claude Desktop Issues:
Problem: Server not showing in MCP section
Problem: Connection timeouts
curl https://[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]/mcp/ping in terminalProblem: "Command not found" errors
npm install -g mcp-remoteClaude.ai Web Issues:
Problem: "Cannot connect to MCP server"
General Issues:
Server Status Check:
# Test if server is responding
curl https://[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]/health
# Test MCP endpoint
curl https://[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]/mcp/ping
Rate Limiting:
get_station_by_name(name, limit=10) - Search stations by name with fallback filteringget_stations_by_position(lat, lon, radius=2.0) - Find nearby stations using smart regional filteringget_planned_timetable(eva_number, date, hour) - Scheduled departures/arrivalsget_recent_timetable_changes(eva_number) - Real-time updates (last 2 minutes)get_full_timetable_changes(eva_number) - All known future disruptionsget_parking_by_station(stop_place_id) - Parking facilities near stationssearch_parking_facilities(station_name) - Search parking by station name using real APIget_parking_prognoses(facility_id, datetime) - Availability forecastsfind_facilities(station_number, type, state) - Elevators, escalators statusget_facilities_by_station(station_number) - Complete facility overviewget_szentralen_by_location(lat, lon) - Mobility service centers using regional filteringsearch_szentralen(limit, offset) - Service center search with paginationaccessibility_check - Barrier-free travel verification between stationsparking_prognosis - Parking availability forecast at stationsrecent_timetable_changes - Real-time delays & service disruptionsplanned_timetable_window - Train schedule for specific time periodsstation_services - Complete station information & amenitiesnearby_stations - Find railway stations near geographic coordinatescurrent_disruptions - Comprehensive service disruption overviewfile://reference/station-categories - German railway station classification guidefile://reference/train-types - Complete guide to German train types (ICE, IC, RE, etc.)file://stations/major-hubs - List of Germany's most important railway stationsfile://services/accessibility-guide - Comprehensive accessibility features guidefile://status/current-disruptions - System-wide disruption overview├── main.py # FastAPI application entry point
├── server_instance.py # Shared MCP server instance
├── mcp_server.py # Server setup and module registration
├── utils.py # Shared utilities and validation
├── config.py # Configuration and secret management
├── models.py # Pydantic data models
├── rate_limiter.py # Security: rate limiting
├── tools/ # MCP Tools
│ ├── station_tools.py # Station search and lookup
│ ├── timetable_tools.py # Timetables and disruptions
│ ├── parking_tools.py # Parking facilities
│ └── facility_tools.py # Accessibility services
├── resources/ # MCP Resources
│ └── travel_resources.py # Travel guides and references
└── prompts/ # MCP Prompts
└── travel_prompts.py # Interactive travel assistance
The server implements intelligent regional filtering to maximize API efficiency and result relevance:
get_stations_by_position() fetches stations from relevant federal states instead of random 1000get_station_by_name() uses API searchstring with client-side fallbackDeploy your own instance of the Deutsche Bahn MCP Server with these steps:
Setup secrets:
# Create secrets for your DB API credentials
echo "your_db_api_key" | gcloud secrets create DB_API_KEY --data-file=-
echo "your_db_api_secret" | gcloud secrets create DB_API_SECRET --data-file=-
Deploy the service:
# Clone the repository
git clone https://github.com/your-repo/deutsche-bahn-mcp-server
cd deutsche-bahn-mcp-server
# Deploy to Cloud Run
gcloud run deploy deutschebahn-mcp-server \\
--source . \\
--region europe-west3 \\
--allow-unauthenticated \\
--port 8080
Grant secret access permissions:
# Get your service account email from the deployment output
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \\
--member="serviceAccount:your-service-account@your-project.iam.gserviceaccount.com" \\
--role="roles/secretmanager.secretAccessor"
Use your MCP server:
Your server will be available at the provided Cloud Run URL, e.g.:
https://deutschebahn-mcp-server-123456789.region.run.app/mcp
For production use with a custom domain and enhanced security:
Follow basic deployment steps 1-3 above
Setup custom domain and load balancer (see Google Cloud Load Balancer docs)
Redeploy with custom domain:
gcloud run deploy deutschebahn-mcp-server \\
--source . \\
--region europe-west3 \\
--allow-unauthenticated \\
--port 8080 \\
--set-env-vars CUSTOM_DOMAIN=your-domain.com
# Build the image
docker build -t deutschebahn-mcp-server .
# Run locally with your API credentials
docker run -p 8080:8080 \\
-e DB_API_KEY=your_db_api_key \\
-e DB_API_SECRET=your_db_api_secret \\
deutschebahn-mcp-server
# Server available at http://localhost:8080/mcp
Secret Manager Access Issues:
# Verify secrets exist
gcloud secrets list
# Check service account permissions
gcloud projects get-iam-policy YOUR_PROJECT_ID \\
--flatten="bindings[].members" \\
--filter="bindings.members:*gserviceaccount.com"
Connection Issues:
# Test your deployed service
curl https://your-service-url/health
# Check logs
gcloud run logs read --service=deutschebahn-mcp-server --region=your-region
# Ask Claude: "Find train stations near Munich city center"
# Uses: get_stations_by_position(48.1351, 11.5820)
# → Smart regional filtering returns relevant Bavarian stations
# Ask Claude: "Find train stations in Frankfurt"
# Uses: get_station_by_name("Frankfurt")
# → API searchstring parameter with intelligent fallback
# Ask Claude: "Find mobility service centers near Berlin"
# Uses: get_szentralen_by_location(52.5200, 13.4050)
# → Returns Berlin/Brandenburg S-Zentralen using city filtering
# Ask Claude: "Are there any delays at Berlin Hauptbahnhof?"
# Uses: recent_timetable_changes prompt
# Ask Claude: "Find parking at Frankfurt Hauptbahnhof"
# Uses: search_parking_facilities("Frankfurt Hauptbahnhof")
# → Uses real API stationName parameter for accurate results
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
# Run with coverage
pytest --cov=. tests/
# Format code
black .
# Lint code
flake8 .
# Type checking
mypy .
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Inspect local server
mcp-inspector http://localhost:8080/mcp
We welcome contributions from the community! Please see our CONTRIBUTING.md guide for detailed information.
git checkout -b feature-nameIf you use this work, code, or concepts in your own projects, please provide proper attribution:
Based on Deutsche Bahn MCP Server by Paul von Berg
https://github.com/PaulvonBerg/db-mcp-server
Thank you!
The server is configured via environment variables. For local development, create a .env file in the root directory by copying the .env.example template. For cloud deployment, these values are set via Google Secret Manager or directly on the service.
See the .env.example file for comments on which credential goes where to avoid confusion.
| Variable | Description | Source / Notes |
|---|---|---|
DB_API_KEY | Your Deutsche Bahn API Client ID | Required. Set in .env (local) or DB_API_KEY secret (cloud). |
DB_API_SECRET | Your Deutsche Bahn API Key (the secret) | Required. Set in .env (local) or DB_API_SECRET secret (cloud). |
GCP_PROJECT_ID | Your Google Cloud project ID | Required for cloud deployment. Auto-detected if not set. |
CUSTOM_DOMAIN | Your custom domain for the deployed service | Optional. Enables enhanced security for cloud deployment. |
CLOUD_RUN_URL | The backend URL of the Cloud Run service | Optional. Auto-detected in Cloud Run, only override if needed. |
LOG_LEVEL | Logging level (DEBUG, INFO, WARNING, ERROR) | Optional. Defaults to INFO. |
PORT | The port the server listens on | Optional. Defaults to 8080. |
API Authentication Errors
Connection Issues
MCP Client Connection
Enable debug logging:
export LOG_LEVEL=DEBUG
python main.py
This project is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0) - see the LICENSE file for details.
When using this software or data, you must provide appropriate credit to:
This software accesses Deutsche Bahn's public APIs under different licensing terms:
Important: Parking information data has additional restrictions:
Users must comply with Deutsche Bahn's API terms of service at developers.deutschebahn.com.
Note: This software is not officially associated with Deutsche Bahn AG.
For users of the live server at `[SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]:
This is a community-provided service hosted independently. Please note:
For production use, consider hosting your own instance using the deployment instructions above.
Hosting provider: This service is provided by an independent developer and is not affiliated with Deutsche Bahn AG
Live Server: [SERVER DECOMISSIONED - HOST YOUR OWN DEPLOYMENT AS DESCRIBED]
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Deutsche Bahn MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/db-mcp-server-paulvonberg)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Runs a free Answer Engine Optimization and AI visibility report for a domain and returns a shareable report plus a structured summary.

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.