BART Real-Time Transit

io.github.srivastshPublished by GitHub account srivastshv1.0.0Updated Oct 27, 2026

Real-time BART departures, trip planning, fares, stations, and advisories.

VerifiedStreamable HTTPWeb executableLocation & LifestyleWeb Search & Scraping

Overview

AI-generated overview

Hosted MCP endpoint for real-time Bay Area BART data: station lookup, departures, trip planning, fares and service advisories.

What you can do
  • List and search BART stations by name, city, address or four-letter code
  • Get real-time departures from a station, optionally filtered by northbound or southbound direction
  • Plan a trip between two stations with schedule, fares and transfer information
  • Look up the fare between two stations
  • Read current service advisories, delays and elevator/escalator status, and get a summarized service status
When to use it
Useful when you want an assistant to answer Bay Area transit questions: next trains from a station, how to get between two BART stops, what a trip costs, or whether there are delays and elevator outages right now.
Requirements
A remote MCP endpoint; no installation, account or API key is needed for the BART server. Clients that only support stdio need a bridge such as mcp-remote. Network access to the hosted endpoint is required.
Before you install
The endpoint is a public, unauthenticated third-party service running on a free tier, so availability and rate limits are not guaranteed. Queries are sent to that host, which in turn calls the BART API. The README also documents a separate Muni server that requires a 511.org key via the x-api-key-511 header; that key is not needed for BART.

Installation

In SourceWeft

  1. Open BART Real-Time Transit in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.srivastsh%2Fbart-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "bart-real-time-transit": {
      "type": "http",
      "url": "https://bart-mcp.srivastsh.workers.dev/mcp"
    }
  }
}

README

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 via x-api-key-511 header

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)

  1. Get a free 511.org API key at https://511.org/open-data/token
  2. Pass it via the x-api-key-511 header in your MCP config

Client Configuration

Claude Desktop / Claude Code

json
{  "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/mcp or https://muni-mcp.srivastsh.workers.dev/mcp
  • For Muni, set custom header x-api-key-511 to your 511 key

Cursor / Windsurf / stdio-only Clients

Use mcp-remote as a bridge:

json
{  "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)

ToolDescription
bart_stationsList all BART stations with codes
bart_departuresReal-time departures from a station
bart_tripPlan a trip between two stations
bart_advisoriesCurrent service advisories
bart_fareFare lookup between two stations

Muni (7 tools)

ToolDescription
transit_operatorsList all 511 transit operators
muni_routesList all Muni routes
muni_departuresReal-time departures from a stop
muni_lineLine details with stops
muni_alertsCurrent service alerts
muni_vehiclesReal-time vehicle GPS positions
muni_scheduleTimetable 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)
  • wrangler CLI: npm install -g wrangler

BART Worker

bash
cd bart-mcpnpm installwrangler loginwrangler deploy

The public BART demo key (MW9S-E7SL-26DU-VV8V) is baked into wrangler.toml. No secrets needed.

Muni Worker

bash
cd muni-mcpnpm installwrangler deploy

Optionally set a fallback 511 key (used when no header key is provided):

bash
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)

Source: README.md at commit 36607e9

Tools

7

bart_stations

List BART Stations

List all BART stations with abbreviation codes and locations. Use this to look up station codes needed by other tools.

Takes no parameters.

bart_station_lookup

Find BART Stations

Search BART stations by name, city, address, or 4-letter station code.

Parameterscitylimitqueryrequired

bart_departures

BART Real-Time Departures

Get real-time departures from a BART station. Args: - station: 4-letter abbreviation (e.g. EMBR, 24TH) - direction: Optional 'n' or 's'

Parametersstationrequireddirection

bart_trip

Plan BART Trip

Plan a trip between two BART stations. Returns schedule, fares, and transfer info.

Parametersdatetimeoriginrequireddestinationrequired

bart_advisories

BART Advisories

Get current BART service advisories, delays, and elevator/escalator status.

Takes no parameters.

bart_status_summary

BART Status Summary

Summarize current BART service status from advisories and real-time alert data.

Takes no parameters.

bart_fare

BART Fare

Get fare between two BART stations.

Parametersoriginrequireddestinationrequired

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts