Back to MCP directory
publicPublicdnsLocal runtime

Berlin Transport

柏林公共交通MCP服务器,通过VBB API提供柏林-勃兰登堡地区的公共交通数据查询服务,包括站点搜索、班次查询和行程规划功能。

article

README

🚀 柏林交通MCP服务器

本项目是一个提供柏林公共交通数据访问的MCP服务器,它封装了 v6.vbb.transport.rest API,将VBB(Verkehrsverbund Berlin - Brandenburg)API进行了封装,方便用户获取相关交通数据。

🚀 快速开始

您可以通过以下两种方式开始使用本MCP服务器:

  • 部署到Workers:点击 部署到Workers,这将把您的MCP服务器部署到类似 remote-mcp-server-authless.<your-account>.workers.dev/sse 的URL。
  • 本地创建:在本地计算机上使用以下命令创建远程MCP服务器:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless

✨ 主要特性

🔍 搜索车站

可搜索柏林 - 勃兰登堡的公共运输车站。

参数:

  • query (字符串):搜索查询

🚉 获取发车时间表

为特定车站获取即将到达的列车或公交车信息。

参数:

  • stop_id (字符串):要获取发车信息的车站ID
  • results (数字,可选):要返回的结果数量

🚇 查询行程路线

从一个车站到另一个车站查询出行方案。

参数:

  • from (字符串):出发地车站ID
  • to (字符串):目的地车站ID
  • departure (字符串,可选):出发时间(例如:"明天下午2点")
  • results (数字,可选):要返回的结果数量

📚 详细文档

🔌 将Claude Desktop连接到您的MCP服务器

您也可以通过 mcp - remote代理,从本地MCP客户端连接到远程MCP服务器。

要在Claude Desktop中连接到您的MCP服务器,请按照 Anthropic的快速入门指南 操作,并在Claude Desktop中进入设置 > 开发者 > 编辑配置。

更新为以下配置:

{
  "mcpServers": {
    "calculator": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://berlin-transport.mcp-tools.app/sse"  // 或者如果本地运行 http://localhost:8787/sse
      ]
    }
  }
}

重启Claude后,您应该可以看到这些工具变得可用。

🔗 连接到Cloudflare AI Playground

您可以通过以下步骤将您的MCP服务器连接到Cloudflare AI Playground:

  1. 访问 https://playground.ai.cloudflare.com/
  2. 输入您的MCP服务器URL(例如:remote-mcp-server-authless.<your-account>.workers.dev/sse
  3. 现在,您可以直接从Playground使用您的MCP工具!

⚙️ 自定义您的MCP服务器

要在MCP服务器中添加自己的 工具,请在 src/index.tsinit() 方法中使用 this.server.tool(...) 进行定义。

📄 API文档

有关底层API的更多详细信息,请访问 v6.vbb.transport.rest/getting-started.html

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client