mcpField
B
Berlin Transport MCP Server

Berlin Transport MCP Server

Local
github.com/harshil1712Maps & Travel6Updated 13w ago

About Berlin Transport MCP Server

Berlin Transport MCP Server connects MCP clients to Berlin public transport data through the VBB API. Its two-tool Code Mode lets models discover API operations and run JavaScript snippets that can chain requests in a sandbox.

Key features

  1. 01VBB stop and location search
  2. 02Departure and journey queries
  3. 03OpenAPI operation discovery
  4. 04Sandboxed JavaScript execution
  5. 05Chained API requests

Use cases

  1. 01Find a Berlin stop or point of interest
  2. 02Check upcoming departures
  3. 03Plan journeys between locations

MCP support

Exposes `search` and `execute` to MCP clients. The server describes VBB operations with an OpenAPI spec and proxies requests from sandboxed snippets.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"berlin-transport": {
"command": "npx",
"args": [
"-y",
"mcp-remote"
]
}
}
}
Run commandnpx -y mcp-remote

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-remote

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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 dev

This starts a local server at http://localhost:8787/mcp.

npm run deploy

This deploys the Worker to a URL like: berlin-transport-mcp.<your-account>.workers.dev/mcp.

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 calls codemode.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:

  1. Update API_ORIGIN and openApiSpec with the new API's paths/operations.
  2. Adjust the request function 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:

  1. Go to https://playground.ai.cloudflare.com/
  2. Enter your deployed MCP server URL (berlin-transport-mcp.<your-account>.workers.dev/mcp)
  3. You can now use the search and execute tools 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.