Back to Home
ericskiff icon

mbta-mcp

Verified Safe

by ericskiff

Overview

Provides real-time MBTA Worcester Line train schedules as a Model Context Protocol (MCP) server for AI assistants.

Installation

Run Command
npm run dev

Environment Variables

  • MBTA_API_KEY
  • MCP_API_KEY

Security Notes

The server correctly utilizes environment variables for both the MBTA API Key and an optional MCP authentication key. Input validation for the 'get_worcester_departures' tool is robustly implemented using Zod schemas, mitigating common injection and data validation risks. Network requests to the external MBTA API are performed using `fetch` with controlled, parameterized inputs, preventing arbitrary code execution. The authentication mechanism for the MCP server itself (`MCP_API_KEY`) relies on a bearer token via the Authorization header; while optional, its implementation is standard when enabled. If the `MCP_API_KEY` is not set, the server allows anonymous access, which is a deployment configuration risk if not intended, but not a code vulnerability. No 'eval', direct command execution via user input, or obvious malicious patterns were found in the provided source code.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens300
Stars0
Forks0
Last Update2026-01-19

Tags

MBTAWorcester LineTrain SchedulesReal-time DataMCP Server