streamable-httpMITupdated 3mo ago
Two Cloudflare Workers providing MCP (Model Context Protocol) access to BART and SF Muni real-time transit data. Works with Claude, ChatGPT, Poke, Cursor, and any MCP-compatible client.
BART Real Time Transit 能做什么?
Bay Area Transit MCP Servers
Two Cloudflare Workers providing MCP (Model Context Protocol) access to BART and SF Muni real-time transit data. Works with Claude, ChatGPT, Poke, Cursor, and any MCP-compatible client.
You don't need to deploy anything. Just point your MCP client at the hosted endpoints below.
Live Endpoints
- BART:
https://bart-mcp.srivastsh.workers.dev/mcp— no auth, just connect - Muni:
https://muni-mcp.srivastsh.workers.dev/mcp— pass your free 511.org API key viax-api-key-511header
These run on Cloudflare Workers' free tier (100k requests/day). Since the Muni server uses BYOK auth, each user's 511 rate limit is isolated to their own key.
Quick Start
BART (no auth required)
Just add the URL to your MCP client. No API key needed.
Muni (BYOK)
- Get a free 511.org API key at https://511.org/open-data/token
- Pass it via the
x-api-key-511header in your MCP config
Client Configuration
Claude Desktop / Claude Code
{
"mcpServers": {
"bart": {
"url": "https://bart-mcp.srivastsh.workers.dev/mcp"
},
"muni": {
"url": "https://muni-mcp.srivastsh.workers.dev/mcp",
"headers": {
"x-api-key-511": "YOUR_511_API_KEY"
}
}
}
}
Poke
One-click setup: BART recipe | Muni recipe
Or add manually as a remote MCP server:
- URL:
https://bart-mcp.srivastsh.workers.dev/mcporhttps://muni-mcp.srivastsh.workers.dev/mcp - For Muni, set custom header
x-api-key-511to your 511 key
Cursor / Windsurf / stdio-only Clients
Use mcp-remote as a bridge:
{
"mcpServers": {
"bart": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-remote", "https://bart-mcp.srivastsh.workers.dev/mcp"]
},
"muni": {
"command": "npx",
"args": [
"-y", "@anthropic-ai/mcp-remote",
"https://muni-mcp.srivastsh.workers.dev/mcp",
"--header", "x-api-key-511:YOUR_511_API_KEY"
]
}
}
}
Available Tools
BART (5 tools)
| Tool | Description |
|---|---|
bart_stations |
List all BART stations with codes |
bart_departures |
Real-time departures from a station |
bart_trip |
Plan a trip between two stations |
bart_advisories |
Current service advisories |
bart_fare |
Fare lookup between two stations |
Muni (7 tools)
| Tool | Description |
|---|---|
transit_operators |
List all 511 transit operators |
muni_routes |
List all Muni routes |
muni_departures |
Real-time departures from a stop |
muni_line |
Line details with stops |
muni_alerts |
Current service alerts |
muni_vehicles |
Real-time vehicle GPS positions |
muni_schedule |
Timetable for a line |
Deploy Your Own
Most users don't need to deploy — just use the hosted endpoints above. But if you want your own instance:
Prerequisites
- Node.js 18+
- Cloudflare account (free tier works)
wranglerCLI:npm install -g wrangler
BART Worker
cd bart-mcp
npm install
wrangler login
wrangler deploy
The public BART demo key (MW9S-E7SL-26DU-VV8V) is baked into wrangler.toml. No secrets needed.
Muni Worker
cd muni-mcp
npm install
wrangler deploy
Optionally set a fallback 511 key (used when no header key is provided):
wrangler secret put API_511_KEY
Architecture
- Runtime: Cloudflare Workers (V8 isolates)
- Transport:
WebStandardStreamableHTTPServerTransport(stateless, one server per request) - Auth: BYOK via request headers, optional env secret fallback
- Validation: Zod schemas for all tool inputs
- CORS: Enabled for all origins
- API Sources: api.bart.gov (BART), api.511.org (Muni/511)
安装
把 BART Real Time Transit 添加到你的客户端。选择你正在使用的那个。
claude mcp add --transport http bart-real-time-transit https://bart-mcp.srivastsh.workers.dev/mcpcodex mcp add bart-real-time-transit --url https://bart-mcp.srivastsh.workers.dev/mcp{
"mcpServers": {
"bart-real-time-transit": {
"url": "https://bart-mcp.srivastsh.workers.dev/mcp"
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"servers": {
"bart-real-time-transit": {
"type": "http",
"url": "https://bart-mcp.srivastsh.workers.dev/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
{
"mcpServers": {
"bart-real-time-transit": {
"url": "https://bart-mcp.srivastsh.workers.dev/mcp"
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"bart-real-time-transit": {
"serverUrl": "https://bart-mcp.srivastsh.workers.dev/mcp"
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
评分
39 / 100
不完整
- 文档22/25
- 维护13/25
- 可信度13/20
- 能力0/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 91 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 6 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 1.0.0最新 | 2026年3月25日 |