BART Real-Time Transit

io.github.srivastsh由 GitHub 帳號 srivastsh 發布v1.0.0更新於 Oct 27, 2026

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

已驗證Streamable HTTP可網頁執行位置與生活網頁搜尋與抓取

概覽

AI 產生的概覽

託管式 MCP 端點,提供灣區 BART 即時資料:車站查詢、發車時刻、行程規劃、票價與服務通告。

可以做什麼
  • 列出並依名稱、城市、地址或四字母代碼搜尋 BART 車站
  • 查詢某車站的即時發車資訊,可依北行或南行方向篩選
  • 規劃兩站之間的行程,回傳時刻、票價與轉乘資訊
  • 查詢兩站之間的票價
  • 讀取目前服務通告、誤點以及電梯與電扶梯狀態,並取得服務狀態摘要
適用情境
適合讓助理回答灣區大眾運輸問題:某站下一班車、兩站之間怎麼走、行程票價多少,或目前是否有誤點和電梯停用。
執行需求
遠端 MCP 端點;BART 服務不需安裝、帳號或 API 金鑰。僅支援 stdio 的用戶端需要 mcp-remote 之類的橋接工具。需要能連線到該託管端點的網路。
安裝前請注意
此端點是第三方提供的公開、無驗證服務,執行於免費額度,可用性與速率限制沒有保證。查詢內容會傳送到該主機,再由其呼叫 BART API。README 另介紹一個 Muni 服務,需透過 x-api-key-511 標頭提供 511.org 金鑰;使用 BART 不需要該金鑰。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 BART Real-Time Transit,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.srivastsh%2Fbart-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

來源:README.md,提交 36607e9

工具

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.

無需輸入參數。

bart_station_lookup

Find BART Stations

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

輸入參數citylimitquery必填

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'

輸入參數station必填direction

bart_trip

Plan BART Trip

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

輸入參數datetimeorigin必填destination必填

bart_advisories

BART Advisories

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

無需輸入參數。

bart_status_summary

BART Status Summary

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

無需輸入參數。

bart_fare

BART Fare

Get fare between two BART stations.

輸入參數origin必填destination必填

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分