SF Muni Real-Time Transit

io.github.srivastshPublished by GitHub account srivastshv1.0.0Updated Nov 2, 2026

Real-time SF Muni departures, routes, alerts, vehicle positions, and schedules.

VerifiedStreamable HTTPWeb executableLocation & LifestyleData & Analytics

Overview

AI-generated overview

Hosted MCP endpoint for real-time SF Muni data: departures, routes, line details, alerts, vehicle positions and schedules.

What you can do
  • List 511 transit operators and all Muni routes
  • Get real-time departures from a stop and line details with stops
  • Check current service alerts
  • Read real-time vehicle GPS positions
  • Look up a line's timetable
When to use it
Useful when an assistant should answer questions about San Francisco Muni service — when the next bus or train leaves a stop, which lines serve a stop, current disruptions, or where vehicles are right now.
Requirements
A remote MCP endpoint; nothing to install or deploy. A free 511.org API key passed in the x-api-key-511 header is required. Clients that only support stdio need a bridge such as mcp-remote. Network access to the hosted endpoint and to the 511 API.
Before you install
The 511.org API key is sent as the x-api-key-511 header, so store it in client configuration rather than sharing it. Requests go to a third-party hosted worker and onward to the 511 API, so queries are visible to those services. Data is read-only; no writes or payments are involved.

Installation

In SourceWeft

  1. Open SF Muni Real-Time Transit in the dashboard and add it to a workspace.
  2. Connect x-api-key-511 credentials. They are stored privately and never shown on public pages.
  3. 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%2Fmuni-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": {
    "sf-muni-real-time-transit": {
      "type": "http",
      "url": "https://muni-mcp.srivastsh.workers.dev/mcp",
      "headers": {
        "x-api-key-511": "<YOUR_API_KEY>"
      }
    }
  }
}

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

0
This server asks for a credential such as an API key, so SourceWeft could not read its tools without one and has not indexed them.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

85% 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 listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts