Berlin Transport MCP Server
This server provides access to Berlin's public transport data via the VBB (Verkehrsverbund Berlin-Brandenburg) API, allowing you to:
Search for stops (
search_stops): Look up Berlin public transport stops, stations, addresses, and points of interest by name or keyword.Get departures (
get_departures): Retrieve upcoming departures for a specific stop using its stop ID, with an optional limit on the number of results.Plan journeys (
get_journeys): Find journey options between an origin and destination (by stop ID), with optional parameters for the number of results and a desired departure time.Explore the API (
search): Discover available API operations, parameters, and response shapes from the underlying OpenAPI specification.Execute API calls (
execute): Run short JavaScript snippets to make calls directly against the VBB API.
Allows deployment of the MCP server to Cloudflare Workers and provides integration with Cloudflare AI Playground for testing tools
Provides access to the mcp-remote package for connecting to remote MCP servers from local clients
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Berlin Transport MCP Serverwhen is the next train from Alexanderplatz to Potsdamer Platz?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Berlin Transport MCP Server
An MCP server that provides access to Berlin's public transport data through the VBB (Verkehrsverbund Berlin-Brandenburg) API. This server wraps the v6.vbb.transport.rest API.
This server uses Code Mode: instead of exposing one MCP tool per API operation, the VBB API is described as an OpenAPI spec and the server exposes exactly two tools, search and execute. The model reads the spec, then writes and runs a short JavaScript snippet in a sandboxed Dynamic Worker to call the API — which scales far better than dumping every tool schema into the model's context window, and lets it chain multiple calls (e.g. search a stop, then fetch its departures) in a single sandbox run.
Get started
npm install
npm run devThis starts a local server at http://localhost:8787/mcp.
npm run deployThis deploys the Worker to a URL like: berlin-transport-mcp.<your-account>.workers.dev/mcp.
Related MCP server: BVG MCP Server
Available Tools
search— Search the OpenAPI spec (codemode.spec()) to discover available operations, parameters, and response shapes before calling the API.execute— Run a short async JavaScript snippet that callscodemode.request({ method, path, query })against the VBB API. The host proxies the actual HTTP request; the sandbox has no direct network access.
Underlying API operations
The OpenAPI spec exposed to the model covers:
getLocations(GET /locations) — search for stops, stations, addresses, and points of interest.getDepartures(GET /stops/{id}/departures) — upcoming departures for a stop.getJourneys(GET /journeys) — journey options between an origin and a destination.
For more details about the underlying API, visit v6.vbb.transport.rest/getting-started.html.
Customizing your MCP Server
The OpenAPI spec passed to openApiMcpServer and the request proxy function both live in src/index.ts. To wrap a different API:
Update
API_ORIGINandopenApiSpecwith the new API's paths/operations.Adjust the
requestfunction if the upstream API needs different methods, auth headers, or response handling.
Connect to Cloudflare AI Playground
You can connect to your MCP server from the Cloudflare AI Playground, which is a remote MCP client:
Enter your deployed MCP server URL (
berlin-transport-mcp.<your-account>.workers.dev/mcp)You can now use the
searchandexecutetools directly from the playground!
Connect Claude Desktop to your MCP server
You can also connect to your remote MCP server from local MCP clients, by using the mcp-remote proxy.
To connect to your MCP server from Claude Desktop, follow Anthropic's Quickstart and within Claude Desktop go to Settings > Developer > Edit Config.
Update with this configuration:
{
"mcpServers": {
"berlin-transport": {
"command": "npx",
"args": [
"mcp-remote",
"https://berlin-transport.mcp-tools.app/mcp" // or if local http://localhost:8787/mcp
]
}
}
}Restart Claude and you should see the search and execute tools become available.
Available Tools
3 toolsget_departuresD
| Name | Required | Description | Default |
|---|---|---|---|
| stop_id | Yes | Stop ID to get departures for | |
| results | No | Number of results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_journeysD
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Origin stop ID | |
| to | Yes | Destination stop ID | |
| departure | No | Departure time (e.g. tomorrow 2pm) | |
| results | No | Number of results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_stopsD
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for stops |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
- First observed
get_departures - First observed
get_journeys - First observed
search_stops
TDQS
The three tools have distinct purposes: get_departures likely retrieves departure times, get_journeys handles route planning, and search_stops finds stops or stations. While there is some potential overlap between get_departures and get_journeys (both involve travel information), the names suggest clear enough separation for an agent to differentiate them effectively.
All tool names follow a consistent verb_noun pattern with snake_case: get_departures, get_journeys, and search_stops. This uniformity makes the tool set predictable and easy to understand, with no deviations in naming style.
With only 3 tools, the server feels thin for a transport domain that typically requires more operations like route details, fare information, or service alerts. While it covers basic functions, the count is borderline low for comprehensive transport-related tasks.
The tool set has significant gaps for a transport server. It lacks essential operations such as getting route details, checking fares, accessing service status or alerts, and managing user preferences. This incomplete coverage will likely cause agent failures when handling common transport queries beyond basic departure and journey lookups.
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 Connectors
Read-only public transit departures, stop search, and city coverage for bus and train users.
Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
Provide real-time transportation data including bus arrivals, train service alerts, carpark availa…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to Paris public transport data (métro, RER, bus, tram, Transilien) including live departure times and traffic disruptions through the IDFM PRIM API.2MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with the Berlin Public Transport (BVG) API to search for locations and plan journeys. It provides real-time access to departures, arrivals, trip details, and vehicle tracking within Berlin's transit network.MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time Dutch Railways (NS) data for journey planning, live departures, disruptions, and station search.3-
- FlicenseNot gradedqualityCmaintenanceProvides unified access to Deutsche Bahn APIs for real-time railway data, station information, timetables, disruptions, parking, and accessibility services.18-
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/harshil1712/berlin-transport-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server