bostonmove

io.github.Srikarmk由 GitHub 账号 Srikarmk 发布v0.1.1更新于 Nov 6, 2026

Live MBTA departures and alerts, Bluebikes bikes and docks, and Boston trip options. Read-only.

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

只读的波士顿出行 MCP 服务器:提供 MBTA 实时班次与运营提醒、Bluebikes 单车与桩位数量,以及步行、骑行和公交地铁出行方案。

可以做什么
  • 查找某地点附近的 MBTA 车站、公交站和 Bluebikes 站点,含步行距离与实时单车、桩位数量
  • 按线路和方向查询某站的即将发车班次,有预测时用实时数据,并附该站提醒
  • 查询某线路、某站或全系统当前生效的延误、停运、接驳车、绕行和封闭
  • 查找最近的 Bluebikes 站点,显示单车、电动车和空桩数量
  • 规划从 A 到 B 的行程,给出步行、Bluebikes 和 MBTA 方案及到达时间,最多一条线路或一次地铁/轻轨换乘
  • 每条结果都附带数据来源和时间戳
适用场景
适合让助手用真实数据回答波士顿交通与共享单车问题:下一班车何时到、当前有哪些运营中断、附近有没有空桩,或从一处到另一处怎么走。
运行要求
以 Python 包形式通过 uvx(或 pip、pipx)在本地运行,作为 stdio MCP 服务器配置。需要访问 MBTA V3 API、Bluebikes GBFS 数据源和 OpenStreetMap Nominatim。可选的环境变量 MBTA_API_KEY(免费)可将速率上限从每分钟 20 次提高到 1,000 次。
安装前请注意
仅读取公开数据,但会把地名和坐标发送给 MBTA、Bluebikes 和 OpenStreetMap Nominatim。未设置 MBTA_API_KEY 时,几次行程规划就可能用尽每分钟 20 次的限额;每次规划消耗 4 到 16 次请求。步行和骑行时间为估算值,单车数量可能在到达前变化,含糊的地名可能解析到错误地点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 bostonmove,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

bostonmove

[CI] [PyPI] [Python] [MCP registry] [License]

Getting around Boston from live public data: MBTA departures and service alerts, Bluebikes bike and dock counts, and door-to-door options: walk, Bluebikes, one MBTA route, or one change between subway lines. A command-line tool and an MCP server, so Claude Code, Claude Desktop, Cursor and other agents can answer "when's the next train" or "is there a dock near Kendall" with real numbers. It only reads public data.

$ bostonmove plan "Northeastern" "Harvard"Northeastern University  →  Harvard  (4424 m straight line)   27 min  Green Line E to Medford/Tufts: board at Northeastern University (0 min walk) now, ride 10, off at Park Street; then Red Line to Alewife: leaves 16:22, ride 9, off at Harvard  (arrive ~16:31)   28 min  Orange Line to Oak Grove: board at Massachusetts Avenue (6 min walk) in 6 min, ride 6, off at Downtown Crossing; then Red Line to Alewife: leaves 16:20, ride 11, off at Harvard  (arrive ~16:31)   29 min  Bluebikes from Forsyth St at Huntington Ave (13 bikes) to Church St (1 docks)  (arrive ~16:33)   40 min  1 to Harvard: board at Massachusetts Ave @ St Botolph St (7 min walk) in 15 min, ride 23, off at Massachusetts Ave opp Holyoke St  (arrive ~16:43)   69 min  walk, about 5751 m  (arrive ~17:12)  · Walking and cycling times are estimates from straight-line distance; transit times are from MBTA live predictions, or the timetable when there are none.  · MBTA options are one route, or one change between subway and light-rail lines with 3 min to change; changes involving buses aren't planned (mbta.com/trip-planner does them).

Install

bash
uvx bostonmove plan "South Station" "Kendall"   # run once without installinguv tool install bostonmove                      # or: pipx install bostonmove / pip install bostonmove

Add it to Claude Code:

bash
claude mcp add --scope user bostonmove -- uvx bostonmove mcp

Or in any MCP client's config (Claude Desktop, Cursor):

json
{ "mcpServers": { "bostonmove": { "command": "uvx", "args": ["bostonmove", "mcp"] } } }

If the client can't find uvx, use the full path that which uvx (macOS, Linux) or where uvx (Windows) prints as the command.

MBTA API key (optional, free). Without one the MBTA allows 20 requests a minute, which two or three trip plans can use up. With a key from api-v3.mbta.com it's 1,000. Set MBTA_API_KEY in the environment, or pass it in the MCP config with "env": {"MBTA_API_KEY": "..."}. When the limit is hit, bostonmove says so; plan_trip still returns the walking and Bluebikes options.

Tools

MCP toolCLIWhat it answers
next_departuresbostonmove next "Park Street" [--route Red]Upcoming departures at a stop by route and direction: live when the MBTA has predictions, else the timetable, plus alerts at that stop
service_alertsbostonmove alerts [--route Orange] [--stop X]Delays, suspensions, shuttles, detours and closures in effect now, most severe first
bike_availabilitybostonmove bikes "Kendall" [--need bike|ebike|dock]Nearest Bluebikes stations with bikes, e-bikes and free docks
find_nearbybostonmove near "Fenway Park"MBTA stations and stops, and Bluebikes stations, near a place
plan_tripbostonmove plan A BWalk, Bluebikes and MBTA options (one route, or one change between subway lines) with arrival times

A place can be a station name (Park Street, Kendall, Northeastern), an MBTA stop id (place-pktrm, 110), a Bluebikes station name, an address or landmark (Fenway Park, 360 Huntington Ave), or lat,lon. Every result carries sources and as_of. Add --json to any CLI command for the full result.

How the numbers are made

  • Departures are the MBTA's live predictions. When a stop has none (late at night, or a route that doesn't publish them), the timetable is used and each time is marked scheduled.
  • Transit trip times: wait from the live prediction, ride time from that trip's own predicted times at the two stops (or its timetable), walking at each end estimated. A departure you can't walk to in time is skipped.
  • Changes: when no subway or light-rail line goes the whole way, bostonmove looks for a line near the start and a line near the destination that share a station (Park Street, Downtown Crossing, State, Haymarket...), ranks the pairs by walking plus stops travelled, and prices the best two with live departures. The second train must leave at least 3 minutes after the first gets in.
  • Walking and cycling are estimates: straight-line distance × 1.3 for streets, at 5 km/h walking and 14 km/h on a bike. They are labelled estimate.
  • Bike counts are as of the Bluebikes feed time (it refreshes about once a minute); a bike or dock can be taken before you get there. In this feed the bike count includes e-bikes, so classic = bikes - ebikes.
  • Alerts on a trip are only the ones that matter for that ride: severity 5 or more on its routes, or any alert at a stop where it boards, changes or gets off.

Limits

  • At most one change, and only between subway and light-rail lines (Red, Orange, Blue, the Green Line branches, Mattapan). Bus to train, bus to bus, commuter rail and two-change trips aren't planned; use mbta.com/trip-planner for those.
  • A plan costs 4 to 16 MBTA requests. On the keyless limit bostonmove waits up to 20 seconds for the count to reset rather than fail; past that it leaves the MBTA options out and says why.
  • Stops and bike stations are searched within 800 m of each end of a trip.
  • Names are matched to MBTA and Bluebikes stations first, then geocoded with OpenStreetMap inside greater Boston. An ambiguous name can land on the wrong place; the result always says what it resolved to.

Data and credit

  • MBTA data from the MBTA V3 API, under the MassDOT Developers License Agreement. bostonmove is not affiliated with or endorsed by the MBTA.
  • Bluebikes data from the public GBFS feed, under the Bluebikes data license. Not affiliated with Bluebikes or Lyft.
  • Place search by OpenStreetMap Nominatim, data © OpenStreetMap contributors (ODbL). Lookups follow its usage policy: at most one a second, an identifying User-Agent, and results cached for 30 days.

Slow-changing data (station lists, a route's stop order, geocoded places) is cached on disk for a day in ~/.cache/bostonmove (BOSTONMOVE_CACHE_DIR to move it, BOSTONMOVE_NO_CACHE=1 to turn it off). Live data is cached in memory for under a minute.

Development

bash
uv syncuv run pytest            # offline: replays recorded real responses with the clock frozenuv run pytest -m live    # against the real APIsuv run python tests/record_fixtures.py   # re-record the fixtures

MIT licence.

来源:README.md,提交 5f1b55d

工具

5

find_nearby

Find transit stops and bike stations nearby

Use to see what's near a place: MBTA stations and bus stops with walking distance, and Bluebikes stations with live bike and dock counts.

输入参数place必填radius_m

next_departures

Next departures from a stop

Use for "when's the next train/bus": upcoming departures at a stop by route and direction, live when the MBTA has predictions (else the timetable), plus alerts at that stop.

输入参数stop必填route

service_alerts

Current MBTA service alerts

Use to check for delays, suspensions, shuttles, detours and closures in effect now, for a route, a stop, or the whole system, most severe first.

输入参数stoproute

bike_availability

Bluebikes availability

Use to find a Bluebikes bike or a free dock: the nearest stations with live counts of bikes, e-bikes and empty docks.

输入参数needplace必填

plan_trip

Ways to get from A to B

Use for "how do I get from A to B": walking, Bluebikes and MBTA options with arrival times, using live departures and bike counts. MBTA options are one route, or one change between subway and light-rail lines (Red, Orange, Blue, Green, Mattapan); changes involving buses aren't planned.

输入参数origin必填destination必填

版本历史

1
  1. v0.1.1最新Oct 30, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分