Model Context Protocol Server
v3.1.3

Give your AI agent
live transit vision

Metro-MCP connects LLMs and AI agents to current transit data from NYC Subway and DC Metro. Train positions, arrivals, delays—all streaming through MCP with instant updates.

1. Open Your Client's MCP/Connector settings
2. Add this URL: https://metro-mcp.anuragd.me/mcp
3. Click "Connect" and authorize via GitHub
4. Start asking questions about the Metro!
# Deploy your own Cloudflare Workers instance:
$ git clone https://github.com/Aarekaz/metro-mcp.git
$ cd metro-mcp && bun install
# Get WMATA API key & setup GitHub OAuth
$ bunx wrangler kv namespace create "OAUTH_CLIENTS"
$ bunx wrangler secret put WMATA_API_KEY
$ bunx wrangler deploy
# Full guide: github.com/Aarekaz/metro-mcp#deployment
0
Total Stations
0
Second Updates
0
Transit Lines
0
MCP Tools

Powering transit-aware AI applications

From commuter assistants to analytics platforms, Metro-MCP provides the foundation for intelligent transit applications with up-to-date data and comprehensive coverage.

🚇

Live Arrival Predictions

Get current arrival times for any station. AI agents can answer "when's the next train?" with actual data, not guesses.

  • Smart commute planning
  • Travel assistants
  • Delay notifications
📍

Train Position Tracking

Track every train in the system. See exactly where trains are, which direction they're heading, and train composition.

  • System monitoring
  • Crowding insights
  • Route optimization
🚌

Multimodal Integration

Complete DC Metro bus support with instant positions, predictions, routes, and stops. Build comprehensive transit assistants.

  • Bus + rail coordination
  • Transfer planning
  • Last-mile solutions
⚠️

Service Disruption Alerts

Stay ahead of disruptions. Get instant incident reports, elevator outages, and service advisories as they happen.

  • Proactive route changes
  • Accessibility updates
  • Emergency notifications
🗺️

Rich Station Metadata

Complete station info with coordinates, transfer connections, and line information. Build spatial reasoning into your AI.

  • Geographic queries
  • Transfer optimization
  • Accessibility info
🔄

Auto-Refresh Data Streams

Data updates every 7-10 seconds. Your AI always has the freshest information without manual polling.

  • SSE event streams
  • Efficient bandwidth
  • Always up-to-date

Two major transit systems, one unified API

Comprehensive coverage of NYC Subway and DC Metro with different strengths and capabilities

Feature DC Metro (WMATA) NYC Subway (MTA)
Train Arrivals Live predictions Live predictions
Train Positions GPS tracking GPS tracking
Service Alerts Incidents & advisories System-wide alerts
Bus Integration Full support Rail only
Stations 98 stations 496 stations
Lines 6 lines (Red, Orange, Silver, Blue, Yellow, Green) 29 lines (A, C, E, 1, 2, 3, etc.)
Geographic Coverage DC, MD, VA metro area NYC 5 boroughs
Update Frequency 7-10 seconds 7-10 seconds

Core MCP Tools

Essential tools that enable AI agents to access and query transit data effectively

🔍

get_next_trains

Retrieve upcoming train arrivals at any station with estimated times, destinations, and line information. The foundation for commute planning and travel assistance.

📡

get_train_positions

Real-time location data for all active trains including direction, line, and car count. Essential for system monitoring and crowding analysis.

🚌

get_bus_predictions

Bus arrival predictions with route information and stop details. Enables multimodal trip planning and last-mile connectivity (DC Metro only).

⚠️

get_alerts

Service disruptions, elevator outages, and system advisories. Critical for proactive route adjustments and accessibility planning.

🗺️

get_stations

Complete station metadata including coordinates, lines served, and transfer information. Enables geographic queries and spatial reasoning.

🔄

get_lines

Line information and service patterns. Helps agents understand the transit network structure and routing possibilities.

Example queries

See how AI agents can answer transit questions naturally using Metro-MCP

💬

"When's the next Red Line train to Shady Grove?"

AI Response

The next Red Line train to Shady Grove arrives in 4 minutes at Metro Center. After that:

  • 8 minutes — Second train
  • 14 minutes — Third train
  • Trains running on normal schedule, no reported delays
💬

"Are there any service disruptions on my commute?"

AI Response

Current alerts affecting your route:

  • Orange Line: Single tracking between Stadium-Armory and Minnesota Ave, expect 10-15 min delays
  • Metro Center: Elevator to Red Line platform out of service, use escalator
  • Consider: Blue Line alternative with 8-min transfer at L'Enfant Plaza
💬

"Best way from Union Station to Reagan Airport?"

AI Response

Fastest route (38 minutes total):

  • Red Line to Metro Center (3 stops, 6 min)
  • Transfer to Orange/Silver Line (2 min walk)
  • Silver Line to Reagan National (6 stops, 28 min)
  • Next departure in 5 minutes, arrive by 3:45 PM

Start building transit-aware AI

Deploy in minutes, scale infinitely. Metro-MCP runs on Cloudflare Workers with enterprise-grade reliability.

Built with modern technologies
TypeScript
Cloudflare Workers
MCP Protocol
WMATA API
MTA API