Wraps the BART public API into five clean tools: real-time departures by station, trip planning between stops, fare lookups, service advisories, and station listings. Runs on Cloudflare Workers with no authentication required, making it dead simple to wire up. Reach for this when you're building transit assistants, commute planners, or anything that needs Bay Area rapid transit data without managing API keys or deployment. The developer also published a companion Muni server using the 511.org API with bring-your-own-key auth. Both support streamable HTTP transport and work with Claude Desktop, Poke, Cursor, or any MCP client via the hosted endpoints.
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.
https://bart-mcp.srivastsh.workers.dev/mcp — no auth, just connecthttps://muni-mcp.srivastsh.workers.dev/mcp — pass your free 511.org API key via x-api-key-511 headerThese 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.
Just add the URL to your MCP client. No API key needed.
x-api-key-511 header in your MCP config{
"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"
}
}
}
}
One-click setup: BART recipe | Muni recipe
Or add manually as a remote MCP server:
https://bart-mcp.srivastsh.workers.dev/mcp or https://muni-mcp.srivastsh.workers.dev/mcpx-api-key-511 to your 511 keyUse 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"
]
}
}
}
| 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 |
| 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 |
Most users don't need to deploy — just use the hosted endpoints above. But if you want your own instance:
wrangler CLI: npm install -g wranglercd 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.
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
WebStandardStreamableHTTPServerTransport (stateless, one server per request)