Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MBTA Worcester Line MCP ServerWhen are the next trains from South Station to Worcester?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MBTA Worcester Line MCP Server
An MCP (Model Context Protocol) server that provides real-time train schedule information for the MBTA Worcester Line. Built with Next.js and deployable on Vercel.
Features
Real-time train departures from any Worcester Line station
Merges scheduled times with live predictions
Supports all 18 Worcester Line stops
Works with Gemini CLI and other MCP clients
Quick Start
1. Get an MBTA API Key
Get a free API key at: https://api-v3.mbta.com
2. Install Dependencies
3. Configure Environment
Copy .env.example to .env.local and add your MBTA API key:
4. Run Locally
5. Test the MCP Server
Deployment
Deploy to Vercel
Push to GitHub
Import to Vercel
Add environment variables:
MBTA_API_KEY: Your MBTA API keyMCP_API_KEY: Secret token for authentication (optional)
Client Configuration
Gemini CLI
Add to ~/.gemini/settings.json:
Or via CLI:
Claude Desktop (via mcp-remote)
Available Tools
get_worcester_departures
Get upcoming train departures from any Worcester Line station.
Parameters:
Name | Type | Required | Description |
| string | Yes | Stop name or ID (e.g., "South Station", "framingham") |
| string | No | "outbound" (toward Worcester) or "inbound" (toward Boston). Default: "outbound" |
| string | No | Date in YYYY-MM-DD format. Default: today |
| number | No | Number of departures (1-20). Default: 5 |
Example queries:
"What trains leave South Station for Worcester?"
"Get next trains from Framingham to Boston"
"What trains leave Westborough tomorrow morning?"
Worcester Line Stops
South Station, Back Bay, Lansdowne, Boston Landing, Newtonville, West Newton, Auburndale, Wellesley Farms, Wellesley Hills, Wellesley Square, Natick Center, West Natick, Framingham, Ashland, Southborough, Westborough, Grafton, Worcester
Project Structure
License
MIT