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 分