GTFS MCP
Provides tools for querying NYC Subway/MTA GTFS schedules and GTFS-RT realtime feeds, including next arrivals, service alerts, live vehicle positions, route and stop details, trip stop sequences with delays, and realtime feed health.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
GTFS MCP
An MCP server for querying public transit info from GTFS schedules and GTFS-RT realtime feeds. It works with any GTFS-compatible transit system, and includes a ready-to-use config for NYC Subway (MTA).
Ask things like "When's the next L from Bedford Av?", "Any service alerts on the G?", or "What stops does the 7 train serve?".
Service alerts example

Arrivals example

Quickstart
Requires Node 22+, or use the Docker image.
git clone https://github.com/jdamcd/gtfs-mcp.git && cd gtfs-mcp
npm install
npm run buildAdd to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"gtfs": {
"command": "node",
"args": ["/absolute/path/to/gtfs-mcp/dist/index.js"],
"env": {
"GTFS_MCP_CONFIG": "/absolute/path/to/gtfs-mcp/config.mta.json"
}
}
}
}Restart Claude Desktop and ask an NYC transit question. The schedule downloads when the server first starts (~15s for MTA).
Related MCP server: Houston METRO MCP
Running with Docker
Images for amd64 and arm64 are published to GitHub Container Registry for each release:
docker pull ghcr.io/jdamcd/gtfs-mcpMount a config file at /config/config.json and a volume at /data. This keeps schedules across restarts and takes the place of the config's data_dir.
Run locally with stdio transport
docker run -i --rm \
-v $(pwd)/config.mta.json:/config/config.json:ro \
-v gtfs-data:/data \
ghcr.io/jdamcd/gtfs-mcpTo use it from Claude Desktop, put this command in claude_desktop_config.json with an absolute path to the config file.
Run on your network with Streamable HTTP transport
On the host machine:
docker run -d --restart unless-stopped \
--name gtfs-mcp \
-p 3000:3000 \
-e GTFS_MCP_TRANSPORT=http \
-e MCP_ALLOWED_HOSTS=myhost.local:3000 \
-v $(pwd)/config.mta.json:/config/config.json:ro \
-v gtfs-data:/data \
ghcr.io/jdamcd/gtfs-mcpClients connect to http://myhost.local:3000/mcp. Set MCP_ALLOWED_HOSTS to the host and port they use, since requests addressed to anything else are rejected. There's no authentication, so anyone who can reach the port can use the server.
Adding other transit systems
The server reads a JSON config defining one or more transit systems, pointed to by GTFS_MCP_CONFIG. Find feeds for your local agency in the Mobility Database.
{
"systems": [
{
"id": "mbta",
"name": "MBTA Boston",
"schedule_url": "https://cdn.mbta.com/MBTA_GTFS.zip",
"timezone": "America/New_York",
"realtime": {
"trip_updates": ["https://cdn.mbta.com/realtime/TripUpdates.pb"],
"vehicle_positions": ["https://cdn.mbta.com/realtime/VehiclePositions.pb"],
"alerts": ["https://cdn.mbta.com/realtime/Alerts.pb"]
},
"auth": null
}
],
"data_dir": "~/.gtfs-mcp/data",
"schedule_refresh_hours": 24,
"pre_warm_database": "setup"
}pre_warm_database controls when schedules are downloaded:
"setup"(default): missing schedules at setup"proactive": at setup plus a regular check againstschedule_refresh_hours"off": only when queried
A schedule older than schedule_refresh_hours refreshes in the background on its next query in every mode.
Each realtime feed type accepts multiple URLs (e.g. MTA splits trip updates across 8 feeds). Set any feed type to [] if the system doesn't provide it.
timezone is the agency's IANA timezone (e.g. "Europe/London"), so times are right whatever the server's timezone.
Authenticated feeds
For feeds that need an API key, auth names the environment variable to read it from, and sends it as a header or a query parameter:
{
"auth": {
"type": "header",
"header_name": "X-Api-Key",
"key_env": "MY_API_KEY"
}
}For a query parameter, use "type": "query_param" with param_name in place of header_name. Set the variable in the Claude Desktop env block. With Docker, also forward it with -e MY_API_KEY.
Tools
Tool | Description | Parameters |
| List all configured transit systems | — |
| Search stops by name |
|
| Stops near a coordinate, ordered by distance |
|
| Stop details and routes serving it |
|
| Upcoming arrivals, realtime where the feed has them and scheduled beyond |
|
| Routes in a system, with optional name filter and pagination |
|
| Route details with ordered stops in each direction |
|
| Active service alerts |
|
| Live vehicle positions |
|
| Trip stop sequence with realtime delays |
|
| Realtime feed diagnostics: per-URL fetch results, entity counts, oldest header age |
|
system is a system id from your config, such as "mta-subway".
Resources and prompts
gtfs://systems(resource): an overview of the configured systems and their realtime feeds, to attach as context.transit-status(prompt): a summary of active alerts, optionally for onesystem. In Claude Desktop it's in the "+" menu.
Development
npm testEvals
LLM evals use promptfoo to verify that a model selects the correct tools for natural-language transit queries. Each case runs against Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5. Requires ANTHROPIC_API_KEY and GTFS_MCP_CONFIG in .env or the environment.
npm run build
npm run eval:smoke # one pass on Haiku only
npm run eval # all 3 models, 3 repeats each
npm run eval:summary # rebuild the report for the last full run
npm run eval:view # web UI to inspect individual responsesEach run writes an HTML report beside its results in evals/results/ and prints a link (includes confidence interval, problem cases, how many cases exercise each tool, tokens, and estimated cost).
MCP inspector
Test tools interactively without an LLM client:
npx @modelcontextprotocol/inspector -e GTFS_MCP_CONFIG=./config.mta.json node dist/index.jsInvariant testing
scripts/campaign.ts exercises the full tool surface against real GTFS feeds across the systems in config.testing.json, checks the responses for invariant violations, and writes per-call JSON under campaign-results/.
⚠️ This downloads static GTFS data for every configured system into
./data-testing/— up to ~10GB.
GTFS_MCP_CONFIG=./config.testing.json npx tsx scripts/campaign.ts --smoke # quick pass across all systems
GTFS_MCP_CONFIG=./config.testing.json npx tsx scripts/campaign.ts --deep mbta,vbb # full phases on selected systemsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only public transit departures, stop search, and city coverage for bus and train users.
Trips, departures, alerts and vehicles for NYC, DC and the SF Bay Area.
Plan San Francisco and Bay Area transit trips and check upcoming stop departures. Free, no API keys.
Get real-time NYC bus arrivals, live vehicle locations, and service alerts. Plan trips between any…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables querying global transit data including agencies, routes, stops, and departures through a GTFS aggregator.64 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables local AI clients to search Houston METRO routes, stops, nearby stops, realtime arrivals, and service alerts through natural language.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to access real-time and scheduled public transit data, including routes, stops, departures, and service alerts, across multiple US metropolitan areas.5MIT

transcapi-mcpofficial
AlicenseAqualityBmaintenanceConnects AI assistants to live public transport data across Great Britain, enabling searches for stops and stations, real-time bus and rail departures, live vehicle positions, service disruptions, and door-to-door journey planning. All tools are read-only and require an API key.10MIT