Mbta Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mbta Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server for the MBTA V3 API, providing access to Boston's public transit data.
No installation required! Just run directly:
uv tool run mbta-mcpSet your MBTA API key as an environment variable:
export MBTA_API_KEY=your_api_key_here
uv tool run mbta-mcpInstall directly with uv tool:
uv tool install mbta-mcpSet your MBTA API key:
export MBTA_API_KEY=your_api_key_hereRun the server:
mbta-mcp git clone https://github.com/cubismod/mbta-mcp.git
cd mbta-mcp
uv sync cp .env.example .env
# Edit .env and add your MBTA_API_KEYRun the MCP server for use with AI clients like Claude Desktop:
# Direct run (no installation needed)
uv tool run mbta-mcp
# If installed as a tool
mbta-mcp
# If using development setup
uv run mbta-mcpFor direct command-line access to MBTA and Amtrak data:
# Show available commands
uv run mbta-cli --help
# Get Amtrak trains
uv run mbta-cli trains --limit 5
# Get Amtrak trains in JSON format
uv run mbta-cli trains --json --limit 3
# Test MBTA routes
uv run mbta-cli routes
# Show available MCP tools
uv run mbta-cli toolsCore Transit Data:
mbta_get_routes - Get MBTA routes (subway, bus, commuter rail, ferry)mbta_get_stops - Get MBTA stops by ID, route, or locationmbta_get_predictions - Get real-time arrival predictionsmbta_get_schedules - Get scheduled service timesmbta_get_trips - Get trip information and detailsmbta_get_alerts - Get service alerts and disruptionsmbta_get_vehicles - Get real-time vehicle positionsTrip Planning:
mbta_plan_trip - Plan multi-modal journeys with real-time data and transfer optimizationmbta_get_route_alternatives - Find alternative routes with different transit modesExtended Features:
mbta_get_services - Get service definitions and calendarsmbta_get_shapes - Get route shape/path information for mappingmbta_get_facilities - Get facility information (elevators, escalators, parking)mbta_get_live_facilities - Get real-time facility status and outagesmbta_search_stops - Search for stops by name or near a locationmbta_get_nearby_stops - Get stops near a specific locationmbta_get_predictions_for_stop - Get all predictions for a specific stopExternal API Tools:
mbta_get_vehicle_positions - Get real-time vehicle positions from external API (GeoJSON format)mbta_get_external_alerts - Get general alerts from external API (delays, disruptions, service info)Boston Amtrak Tracker API:
mbta_get_amtrak_trains - Get all tracked Amtrak trains from Boston Amtrak Tracker APImbta_get_amtrak_trains_geojson - Get Amtrak trains as GeoJSON for mapping applicationsmbta_get_amtrak_health_status - Get health status of the Boston Amtrak Tracker APIIMT Track Prediction API:
mbta_get_track_prediction - Predict which track a train will use at a stationmbta_get_chained_track_predictions - Get multiple track predictions in a single requestmbta_get_prediction_stats - Get prediction statistics and accuracy metricsmbta_get_historical_assignments - Get historical track assignments for analysis#### mbta_get_routes
Get information about MBTA routes including subway, bus, commuter rail, and ferry services.
route_id (optional), route_type (optional), page_limit (default: 10)#### mbta_get_stops
Find transit stops by location, route, or ID with optional filtering.
stop_id (optional), route_id (optional), latitude/longitude (optional), radius (optional), page_limit (default: 10)#### mbta_get_predictions
Get real-time arrival predictions for MBTA services.
stop_id (optional), route_id (optional), trip_id (optional), page_limit (default: 10)#### mbta_get_schedules
Get scheduled service times and departure information.
stop_id (optional), route_id (optional), trip_id (optional), direction_id (optional), page_limit (default: 10)#### mbta_get_trips
Get trip information and details for MBTA services.
trip_id (optional), route_id (optional), direction_id (optional), page_limit (default: 10)#### mbta_get_alerts
Get service alerts and disruptions affecting MBTA services.
alert_id (optional), route_id (optional), stop_id (optional), page_limit (default: 10)#### mbta_get_vehicles
Get real-time vehicle positions and status information.
vehicle_id (optional), route_id (optional), trip_id (optional), page_limit (default: 10)#### mbta_get_services
Get service definitions and calendars for MBTA operations.
service_id (optional), page_limit (default: 10)#### mbta_get_shapes
Get route shape/path information for mapping and visualization.
shape_id (optional), route_id (optional), page_limit (default: 10)#### mbta_get_facilities
Get facility information including elevators, escalators, and parking areas.
facility_id (optional), stop_id (optional), facility_type (optional), page_limit (default: 10)#### mbta_get_live_facilities
Get real-time facility status and outage information.
facility_id (optional), page_limit (default: 10)#### mbta_search_stops
Search for stops by name or near a specific location.
query (required), latitude/longitude (optional), radius (optional), page_limit (default: 10)#### mbta_get_nearby_stops
Get stops near a specific location within a specified radius.
latitude (required), longitude (required), radius (default: 1000), page_limit (default: 10)#### mbta_get_predictions_for_stop
Get all predictions for a specific stop with optional filtering.
stop_id (required), route_id (optional), direction_id (optional), page_limit (default: 10)#### mbta_get_vehicle_positions
Get real-time vehicle positions from external API in GeoJSON format.
#### mbta_get_external_alerts
Get general alerts from external API including delays, disruptions, and service information.
#### mbta_get_amtrak_trains
Get all tracked Amtrak trains from the Boston Amtrak Tracker API.
#### mbta_get_amtrak_trains_geojson
Get Amtrak trains as GeoJSON for mapping applications.
#### mbta_get_amtrak_health_status
Get health status of the Boston Amtrak Tracker API.
#### mbta_get_track_prediction
Predict which track a train will use at a specific station using machine learning.
station_id (required), route_id (required), trip_id (required), headsign (required), direction_id (required), scheduled_time (required)#### mbta_get_chained_track_predictions
Get multiple track predictions in a single request for batch processing.
predictions (required) - Array of prediction request objects#### mbta_get_prediction_stats
Get prediction statistics and accuracy metrics for a station and route.
station_id (required), route_id (required)#### mbta_get_historical_assignments
Get historical track assignments for analysis and pattern recognition.
station_id (required), route_id (required), days (default: 30)The MBTA MCP server provides intelligent trip planning capabilities that combine real-time transit data with multi-modal journey optimization. These tools help plan efficient journeys across the MBTA network with support for accessibility requirements and transfer preferences.
#### mbta_plan_trip
Plan multi-modal journeys with real-time data and transfer optimization. This tool finds the best transit routes between two locations, considering walking distance, transfer limits, and accessibility requirements.
Parameters:
origin_lat (required): Origin latitude coordinateorigin_lon (required): Origin longitude coordinatedest_lat (required): Destination latitude coordinatedest_lon (required): Destination longitude coordinatedeparture_time (optional): ISO 8601 formatted departure time (e.g., "2025-01-01T10:00:00-05:00")max_walk_distance (optional): Maximum walking distance in meters (default: 800)max_transfers (optional): Maximum number of transfers allowed (default: 2)prefer_fewer_transfers (optional): Prioritize routes with fewer transfers (default: true)wheelchair_accessible (optional): Only include accessible routes and vehicles (default: false)Returns: JSON with trip options including:
Example Usage:
Plan a trip from MIT to Harvard Square:
- origin_lat: 42.3601
- origin_lon: -71.0942
- dest_lat: 42.3736
- dest_lon: -71.1190
- max_walk_distance: 600
- prefer_fewer_transfers: true#### mbta_get_route_alternatives
Find alternative routes with different transit modes. This tool excludes specified primary route types to discover backup options, useful when primary routes have service disruptions.
Parameters:
origin_lat (required): Origin latitude coordinateorigin_lon (required): Origin longitude coordinatedest_lat (required): Destination latitude coordinatedest_lon (required): Destination longitude coordinateprimary_route_modes (optional): Array of route type IDs to exclude (e.g., ["1"] to exclude subway)departure_time (optional): ISO 8601 formatted departure timemax_walk_distance (optional): Maximum walking distance in meters (default: 800)max_transfers (optional): Maximum transfers (default: 2)wheelchair_accessible (optional): Require accessible routes (default: false)Route Type IDs:
"0" - Light Rail (Green Line branches)"1" - Subway (Red, Orange, Blue Lines)"2" - Commuter Rail"3" - Bus"4" - FerryReturns: Alternative route options excluding the specified primary modes, with the same detailed structure as mbta_plan_trip.
Example Usage:
Find bus alternatives when subway is disrupted:
- origin_lat: 42.3601
- origin_lon: -71.0942
- dest_lat: 42.3736
- dest_lon: -71.1190
- primary_route_modes: ["1", "0"] // Exclude subway and light rail
- max_walk_distance: 1000Morning Commute Planning: Use mbta_plan_trip with departure time to find the best route for your daily commute, considering real-time delays and service alerts.
Accessibility-First Routing: Enable wheelchair_accessible: true to ensure all suggested routes are fully accessible, including elevators and ramps at stations.
Service Disruption Backup: When alerts indicate subway delays, use mbta_get_route_alternatives to find bus routes that avoid the affected lines.
Event Planning: For large events, plan trips with longer walking distances and more transfers to distribute passenger load across the transit network.
Tourist Assistance: Combine trip planning with nearby stops and predictions to help visitors navigate Boston's transit system efficiently.
#### Option 1: Using uv tool run (Easiest - No Installation Required)
Add to Claude Desktop configuration:
On macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mbta": {
"command": "uv",
"args": ["tool", "run", "mbta-mcp"],
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}On Windows, edit %APPDATA%\Claude\claude_desktop_config.json with the same content.
#### Option 2: Using uv tool install (Recommended for Regular Use)
uv tool install mbta-mcpOn macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mbta": {
"command": "mbta-mcp",
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}On Windows, edit %APPDATA%\Claude\claude_desktop_config.json with the same content.
#### Option 3: Using development setup
git clone https://github.com/cubismod/mbta-mcp.git
cd mbta-mcp
task install-dev
task verify # Ensure everything works cp .env.example .env
# Edit .env and add: MBTA_API_KEY=your_api_key_hereOn macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mbta": {
"command": "uv",
"args": ["run", "mbta-mcp"],
"cwd": "/path/to/your/mbta-mcp",
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}On Windows, edit %APPDATA%\Claude\claude_desktop_config.json with the same content.
Restart Claude Desktop and you'll see "mbta" in the 🔌 icon, indicating the MCP server is connected.
#### Continue.dev
Using uv tool run (easiest):
{
"mcpServers": [
{
"name": "mbta",
"command": "uv",
"args": ["tool", "run", "mbta-mcp"],
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
]
}Using uv tool installation:
{
"mcpServers": [
{
"name": "mbta",
"command": "mbta-mcp",
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
]
}Or with development setup:
{
"mcpServers": [
{
"name": "mbta",
"command": "uv",
"args": ["run", "mbta-mcp"],
"cwd": "/path/to/your/mbta-mcp",
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
]
}#### Codeium
Using uv tool run (easiest):
{
"mcp": {
"servers": {
"mbta": {
"command": ["uv", "tool", "run", "mbta-mcp"],
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}
}Using uv tool installation:
{
"mcp": {
"servers": {
"mbta": {
"command": ["mbta-mcp"],
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}
}Or with development setup:
{
"mcp": {
"servers": {
"mbta": {
"command": ["uv", "run", "mbta-mcp"],
"cwd": "/path/to/your/mbta-mcp",
"env": {
"MBTA_API_KEY": "your_api_key_here"
}
}
}
}
}#### Generic MCP Client
Using uv tool run (easiest):
uv tool run mbta-mcpMBTA_API_KEY=your_api_key_hereUsing uv tool install:
mbta-mcpMBTA_API_KEY=your_api_key_hereUsing development setup:
uv run mbta-mcp/path/to/your/mbta-mcpMBTA_API_KEY=your_api_key_hereOnce connected, you can ask your LLM questions like:
Core Transit Information:
Trip Planning:
Advanced Features:
Server not connecting:
uv is installed and in your PATHtask test-server to verify the server worksAPI rate limiting:
Configuration issues:
.env file is in the project rootMBTA_API_KEY=your_key_here.env file or environment variable MBTA_API_KEYThis MCP server integrates with additional external APIs to provide enhanced functionality:
This project uses Task for build automation. Install it and run:
task --list # Show available taskstask install-dev # Install dependencies including dev tools
task check # Run all checks (format, lint, typecheck)
task test-server # Test MCP server functionality
task run # Run the MBTA MCP server
task verify # Full project verificationInstall dev dependencies:
uv sync --devRun formatters and linters:
task format # or: uv run ruff format mbta_mcp/
task lint # or: uv run ruff check mbta_mcp/
task typecheck # or: uv run mypy mbta_mcp/~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.