MBTA MCP服务

MBTA MCP服务是一个用于管理和调用MBTA API的服务器配置工具,适用于公共交通警报系统的开发与集成。

  • by rsun19
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 rsun19/mbta-mcp

使用说明

Using the MBTA MCP:

Setup

  1. Get an API key from the MBTA, and put it in an .env.local file

Request link: https://www.mbta.com/developers/v3-api#key

MBTA_API_KEY=<API_KEY>
  1. Run uv sync

  2. Add this configuration to your tool that will call the MCP server:

{
  "mcpServers": {
    "mbta-alerts": {
      "command": "uv",
      "args": [
        "--directory",
        "~/mbta-mcp",
        "run",
        "api/mbta/alerts/run.py"
      ]
    }
  }
}
  1. Now, your MCP server should be callable and should work correctly.

Development

  1. Follow the Setup steps above.

  2. Create your virtual environment by running source .venv/bin/activate (on Mac). Windows commands will be slightly different.

  3. Run python3 -m api.mbta.alerts.run