Transit MCP

com.transitmcpPublished by transitmcp.comOfficial publisherv6.1.0Updated Oct 25, 2026

Trips, departures, alerts and vehicles for NYC, DC and the SF Bay Area.

VerifiedStreamable HTTPWeb executableLocation & LifestyleProductivity & Workflow

Overview

AI-generated overview

Anonymous, read-only remote MCP server giving assistants live transit answers for NYC, Washington DC and the SF Bay Area: trip plans, departures, alerts and…

What you can do
  • Plan journeys between places, with step-free options and validated itineraries
  • Look up next departures from a stop, including trips that continue to a given destination
  • Check service status: disruptions, delays, closures, elevator and escalator outages
  • Locate trains and buses, or find stations, stops, routes and train IDs by name
  • Query DC and NYC specifics: station predictions, incidents, bus routes, stops, positions and transfers
When to use it
Useful when an assistant should answer rider questions such as how to get somewhere, when the next train or bus leaves, whether a line is disrupted, or where a vehicle is, across New York, Washington DC and the SF Bay Area.
Requirements
A remote Streamable HTTP endpoint; no login, client credentials, bearer token or OAuth flow is required. Only network access to the endpoint is needed. Self-hosting a copy would require your own WMATA and 511 SF Bay API keys and a request-state key.
Before you install
Read-only and anonymous, so no credentials are exposed. It returns agency-supplied text, which should be treated as quoted data rather than instructions. Results may be realtime, scheduled-only or unavailable, and some tools are DC-only or NYC-only. Rate limiting is roughly 300 requests per 60 seconds per source IP, and shared egress IPs group clients.

Installation

In SourceWeft

  1. Open Transit MCP 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/com.transitmcp%2Ftransit-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": {
    "transit": {
      "type": "http",
      "url": "https://transitmcp.com/mcp"
    }
  }
}

README

Transit MCP

Transit MCP is a free, anonymous, read-only Model Context Protocol server that lets your AI answer transit questions: how do I get there, when's the next train, is anything broken, where's my bus. It's a side project, and general-purpose agents (ChatGPT, Claude, Muse, Instinct and friends) plug straight into it.

It covers:

  • New York: the subway, the Long Island Rail Road, Metro-North and NYC buses.
  • Washington DC: Metrorail and Metrobus.
  • SF Bay Area: every operator in 511 SF Bay's regional feed, including BART, Muni, Caltrain, AC Transit, VTA, SamTrans and the ferries. Departures, alerts and vehicles work there, and so does trip planning.

Metro MCP is now Transit MCP.

Nearly 100,000 requests served in the last 7 days.

[MCP] [Transit MCP] [Cloudflare Workers] [License]

Connect

The production endpoint is https://transitmcp.com/mcp. No login is required. No client credentials, bearer token, or OAuth flow is required; Transit MCP does not collect client credentials. Stale Authorization headers are ignored.

The previous endpoint, https://metro-mcp.anuragd.me/mcp, will continue to be supported and serves the same Worker.

Directories

Claude

bash
claude mcp add --transport http transit-mcp https://transitmcp.com/mcp

Codex

bash
codex mcp add transit-mcp https://transitmcp.com/mcp

Generic Streamable HTTP client

json
{  "mcpServers": {    "transit-mcp": {      "type": "http",      "url": "https://transitmcp.com/mcp"    }  }}

Agent skill

skills/transit-mcp/SKILL.md teaches an agent which tool answers which question, how to handle a name that means several places, and how to keep a rider posted by rechecking a planned trip before they leave. Install it with your agent's skills tool (for example npx skills add Aarekaz/transit-mcp) or copy the file into its skills folder.

POST /mcp is the recommended stateless Streamable HTTP endpoint. POST and OPTIONS /sse are a compatibility alias; legacy GET SSE, DELETE, session-message URLs, and slash variants return 405.

What it provides

This checkout registers 18 MCP tools: the 13 compatible DC/NYC tools plus five global capabilities, find_transit, plan_trip, get_departures, get_service_status, and get_vehicle_status. The compatible tools call WMATA and MTA directly for arrivals, service incidents, stations, routes, buses, trains, transfers, and vehicle positions.

All three regions serve the five global tools. Here's what they do:

  • plan_trip plans trips between stations, or from map coordinates with short walks, using the published timetables and live predictions. In New York and DC it searches the rail network on its own. Anywhere, including the SF Bay Area and buses, you can name the lines to ride in routes (up to four) and it finds the real trips, stops, transfers and walks on them. When it can't search on its own it says why and returns routeHints: the lines near each end and the ones that serve both. Every itinerary is checked by an independent validator and comes with plain steps a rider can follow.
  • Place names go in as the rider says them. A name for one place (Penn Station, SFO, two stations across the street) covers all its stations. A name for different places ("Broadway") gets the best trip from each in plan_trip, labelled in reading and explained in notice, and a question to ask in the other tools. No tool shows the user a form.
  • get_departures with toStop answers "next train from A to B": only trips that go on to that stop, each with its arrival time there.
  • get_departures merges the timetable with live trip updates. In NYC that includes rerouted trains and trains missing from the timetable, which are marked as observed rather than dropped. You can pass a station name directly; a station complex such as Times Sq-42 St or 14 St-Union Sq counts as one place and lists departures from every line in it, and genuinely different stations with the same name come back as choices.
  • get_service_status returns the agencies' own alerts for a city, line, station, or trip, plus elevator and escalator outages there: whether each is on the step-free path, whether a backup elevator exists, and MTA's suggested way around.
  • plan_trip with accessibility: "step_free" plans journeys that only board, alight and change where the platform is reachable without stairs, and avoids stations cut off by a current elevator outage. Station access comes from WMATA's GTFS and MTA's station list (including stations accessible in one direction only); if the live elevator report is missing or stale, it says so instead of guessing.
  • find_transit resolves stations, stops, routes and train IDs. Stations rank ahead of street stops and rail ahead of bus, each candidate says what it is (station, platform or street stop, modes, lines), and a few reviewed place names work, such as SFO, Union Square, Penn Station, Grand Central and Dulles.
  • Names work the way people type them: "King Street" finds King St-Old Town, "42nd Street Times Square" finds Times Sq-42 St, and misspellings like "Crystl Cty" still land. DC stations also answer to WMATA's published names ("Chinatown", "Convention Center", "Adams Morgan"). Without a region, a name is searched in every region; find_transit with no arguments lists the regions and what each supports. When nothing matches, you get suggestions, the closest names, which are never treated as a match.
  • Live data is on the first question, not just the second: a quiet coordinator answers a stop's departures from the agency's feed as soon as it arrives. Times a rider sees are in the agency's local time with its offset (18:32-04:00).
  • get_vehicle_status shows where trains and buses are: on a line, on a dated trip from a departure board or planned journey, or at a station (every station of a complex). Each train reports its train ID (MTA's, such as 1A 1023 207/FAR, or WMATA's number), the station it is stopped at or heading to, the station it last served, and its destination. DC trains carry GPS coordinates. MTA publishes stations rather than coordinates, so an NYC train stopped at a station is placed there and one between stations has no coordinates rather than a guessed one.

The NYC coverage also carries the Long Island Rail Road, Metro-North and NYC buses, and DC carries Metrobus. Journeys use every mode, buses included, and change between them on foot at stations such as Penn Station, Grand Central and Atlantic Terminal; LIRR and Metro-North departures show the track. The network planner searches compact timetables a cron builds in R2, then plans and validates the proposed lines exactly (see src/transit/planner/network-plan.ts). NYC bus predictions, locations and alerts come from MTA Bus Time; a self-hosted Worker without its key (MTA_BUS_API_KEY) serves NYC buses from the timetable only.

Timetables are rebuilt at the edge when WMATA or MTA publish tables that actually changed. For the NYC subway, which MTA republishes about hourly, a change to yesterday, today or tomorrow is built once the published timetable is three hours old, and changes further out wait up to six hours. Live trains the timetable doesn't have yet still show up, from the realtime feed. 511 SF Bay timetables are stored automatically and built offline. An update that would remove most of a day's service is rejected, and one that makes live matching worse is rolled back. Under the hood on the docs page has the longer story, with diagrams. DC and NYC global transit is the verification record. SF Bay data comes from 511 SF Bay and participating operators, with their attribution on every result.

Honest limits

  • Late at night, when nothing runs within walking distance, plan_trip finds nothing and hands back routeHints instead.
  • NYC trains between stations have no coordinates; MTA reports stations, not GPS.
  • The first call after a quiet spell can take several seconds while the timetable loads.
  • The 13 original tools are still here and unchanged for older clients.

It also provides four transit:// URI templates (stations, routes, incidents, and versioned entities) and three canned prompts (service-briefing, commute-planner, and accessibility-check). Use plan_trip for journeys; do not assemble routes from departure boards. Global results distinguish realtime, scheduled_only, and unavailable, with source timestamps, versions, reasons, attribution, and a JSON text fallback.

An Apps-capable host can render the Transit Board resource for the 13 DC and NYC tools. See the Apps verification record.

Runtime and safety boundaries

  • Protocol: MCP 2026-07-28 stateless Streamable HTTP. The server does not advertise sessions, resumability, or server push.
  • Request trust: public origin and host/origin allowlists are validated at startup. The signed MRTR request-state codec is bound to the MCP method and expires after five minutes.
  • Cancellation: client disconnects propagate request cancellation to MCP handlers and upstream transit fetches.
  • Caching: discovery and tool metadata are publicly cacheable for 24 hours. Station and route resources are public-cacheable; incident and versioned-entity resources are not. Legacy WMATA and MTA tools retain their provider caches. Global tools read versioned artifacts and snapshots without fetching upstream providers during a request.
  • Rate limiting: roughly 300 requests per 60-second window per source-IP key per Cloudflare location. Shared egress IPs group clients, and enforcement is eventually consistent. This is abuse protection, not a dedicated user quota.
  • Rollback: the inactive MetroMcpAgent class and original v1 Durable Object migration remain for rollback. Do not add a deletion migration during stabilization.

Deploy your own

Client access is anonymous. A self-hosted Worker still needs its own WMATA and 511 SF Bay API keys plus a stable MCP_REQUEST_STATE_KEY of at least 32 bytes for signed MRTR state.

bash
bun install --frozen-lockfilecp .dev.vars.example .dev.varsbun run dev

Use the checked-in loopback origin, hostname allowlists, and ENVIRONMENT=development values together. Keep .dev.vars out of source control. Production and preview use their own origins, allowlists, state keys, WMATA and 511 keys, artifact buckets, and MCP_RATE_LIMITER bindings.

Before an approved deployment, run only dry-runs:

bash
production_out=$(mktemp -d /tmp/transit-mcp-production.XXXXXX)preview_out=$(mktemp -d /tmp/transit-mcp-preview.XXXXXX)node node_modules/wrangler/bin/wrangler.js deploy --dry-run --env "" --outdir "$production_out"node node_modules/wrangler/bin/wrangler.js deploy --env preview --dry-run --outdir "$preview_out"

Verification

Run bun run build && bun run test && bun run test:apps. The conformance runner starts and stops its own isolated local Worker, uses the installed pinned referee, and gates a frozen product profile with mapped real tests. The full official score is reported separately and is not a product-profile pass:

bash
./scripts/run-conformance.sh

See global transit verification for current evidence and unpassed launch gates, SF rollout for activation prerequisites, and security architecture for request boundaries. The older MCP 2026 record is historical evidence, not this branch's acceptance.

Support and legal

License

MIT. See LICENSE.

Source: README.md at commit a6bb62f

Tools

18

get_station_predictions

Train arrival predictions

Get real-time train arrival predictions for a transit station. Supports DC Metro and NYC Subway. Accepts a station name or an exact station ID; if a name matches several stations, the result lists the candidates to choose from.

ParameterscityrequiredstationNamerequired

search_stations

Search stations

Search for transit stations by name or code. Supports DC Metro and NYC Subway.

Parameterscityrequiredqueryrequired

get_stations_by_line

Stations on a line

Get all stations on a specific transit line. Supports DC Metro and NYC Subway.

ParameterscityrequiredlineCoderequired

get_all_stations

All stations

Get the complete list of transit stations with coordinates for one city. Large result; prefer search_stations or get_stations_by_line when looking for specific stations.

Parameterscityrequired

get_station_transfers

Station transfers

Get transfer connections and nearby stations from a transit station. NYC Subway only.

ParameterscityrequiredstationIdrequired

get_incidents

Service incidents

Get current transit incidents and service advisories for DC Metro or NYC Subway.

Parameterscityrequired

get_elevator_incidents

Elevator outages

Get current elevator and escalator outages. DC Metro only.

Parameterscityrequired

get_bus_predictions

Bus arrival predictions

Get real-time bus arrival predictions for a DC Metro bus stop.

ParametersstopIdrequired

get_bus_routes

All bus routes

Get all DC Metro bus routes with route IDs and descriptions.

Takes no parameters.

get_bus_stops

Bus stops

Get DC Metro bus stops. Returns all stops or filters by lat/lon/radius.

Parametersradiuslatitudelongitude

get_bus_positions

Live bus positions

Get real-time positions of DC Metro buses, optionally filtered by route.

ParametersrouteId

get_train_positions

Live train positions

Get real-time positions of all trains on the DC Metro system.

Takes no parameters.

get_route_info

Route information

Get detailed information about a transit route including service patterns. NYC Subway only.

ParameterscityrequiredrouteIdrequired

find_transit

Find transit entities

Call with no arguments (or only `coverage`) to list the regions served and what each supports. Without a coverage, a name is searched in every region. If nothing matches, suggestions lists the closest names (not matches). Resolve a coverage, agency, route, station, stop, or a currently observed train number (where vehicle data exists); inspect an exact reference or nearby coordinates. Context ranks candidates without selecting identity. Candidates come best first (exact names and well-known place names such as SFO, then stations, then rail before bus), and each stop says what it is: stopType (station, platform or street stop), modes and the lines serving it, so you can pick the one the rider means. No general address geocoding. Use plan_trip for journeys.

Parametersreflimitquerycontextcoveragelatitudelongitude

plan_trip

Plan a transit journey

Plan an origin-to-destination journey. Returns up to three independently validated itineraries (the fastest, then other lines); departure defaults to now. Pass the rider's place names as given: a name for one place (Penn Station, SFO) plans from or to all its stations. A name meaning different places (Broadway) returns the best trip from each, each labelled in reading and explained in notice: use the one the conversation points to, or ask the rider. The search covers every line of the coverage, buses included. When no itinerary is possible (planning unavailable, a search too large, or nothing found) it returns routeHints: lines near each end and direct lines serving both. Call again with routes (the lines you would ride, from routeHints or your own knowledge) to plan along only those lines, which works wherever schedules exist. Present only returned itineraries as confirmed. The whole journey must finish within windowSeconds (default two hours): if none is found for a long trip, retry with a larger window. Each transit leg carries a tripInstanceRef; pass it to get_vehicle_status to see where that train is now. For a wheelchair user or anyone avoiding stairs, set accessibility: "step_free": journeys then board, alight and change only at platforms step-free from the street per the agency (partial stations by direction), avoiding stations cut off by a current elevator outage; in-station changes between such platforms are taken as step-free. It refuses with ACCESSIBILITY_UNAVAILABLE when no current elevator report exists and ENDPOINT_NOT_STEP_FREE when an endpoint has no step-free platform now (get_service_status lists the outages). Never present a journey pieced together from get_departures as confirmed; check it here with routes.

ParametersoriginrequiredroutescoveragedepartAtdestinationrequiredmaxTransfersaccessibilitymaxWalkMetreswindowSeconds

get_departures

Departures at a stop

Find what leaves a stop next, the first service or last service in a bounded window. Pass a stopRef from find_transit, or a stop name with its coverage: a name for one place covers all its stations in that network (otherStations lists the same place in other networks, such as the LIRR at Penn Station); a name for different places returns a question to ask, with candidates. A station covers its whole complex, e.g. every line at Times Sq-42 St; a platform ref covers that platform. Pass toStop or toStopRef for the next trips from here that stop at a destination, each with its arrival time there. Returns dated trip references for get_vehicle_status. For a journey with a change use plan_trip (with routes where needed): departures alone cannot prove a connection.

ParametersatstoplimittoStopstopRefcoveragerouteRefsselectiontoStopRefagencyRefswindowSeconds

get_service_status

Transit service status

Check disruptions, delays, closures, elevator and escalator outages, or revalidate a chosen itinerary without replacing it. Scope by coverage, a station name with its coverage (stop), or an agency, route, stop or dated trip reference; a station covers its complex. Aggregate scopes include canonical service in the next 24 hours. equipment lists elevator/escalator outages: accessiblePath marks the step-free route, blocksStepFree marks stations step-free plan_trip avoids, and alternativeRoute is the agency's way around. Use get_vehicle_status for an observed vehicle location.

Parametersrefstopcoverageitinerary

get_vehicle_status

Where trains are now

Where observed trains are right now. Pass a route ref to list its trains, a dated trip ref (from get_departures or a plan_trip leg) to find that train, or a station (stopRef, or a name with coverage) to see trains stopped at or heading to it; a station covers its whole complex. Each train reports the stop it is at or heading to (stopStatus), the stop it last served, and its destination. Coordinates are the vehicle's own when the agency sends them (DC); otherwise a stopped train is placed at its station and a moving one has none. Never pass a bare train number: use find_transit.

Parametersrefstoplimitcoverage

Version history

2
  1. v6.1.0LatestOct 25, 2026
  2. v6.0.0Oct 17, 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