loading…
Search for a command to run...
loading…
Provides real-time train schedule information and live predictions for all 18 stations on the MBTA Worcester Line. It enables users to query upcoming departures
Provides real-time train schedule information and live predictions for all 18 stations on the MBTA Worcester Line. It enables users to query upcoming departures and filter by direction or date through natural language.
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.
Get a free API key at: https://api-v3.mbta.com
npm install
Copy .env.example to .env.local and add your MBTA API key:
MBTA_API_KEY=your-mbta-api-key-here
MCP_API_KEY=your-secret-token # Optional: for authentication
npm run dev
npm run test:mcp
MBTA_API_KEY: Your MBTA API keyMCP_API_KEY: Secret token for authentication (optional)Add to ~/.gemini/settings.json:
{
"mcpServers": {
"mbta": {
"httpUrl": "https://your-app.vercel.app/api",
"headers": {
"Authorization": "Bearer YOUR_MCP_API_KEY"
},
"timeout": 30000
}
}
}
Or via CLI:
gemini mcp add --transport http mbta https://your-app.vercel.app/api
{
"mcpServers": {
"mbta": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-app.vercel.app/api/mcp"]
}
}
}
Get upcoming train departures from any Worcester Line station.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
stop |
string | Yes | Stop name or ID (e.g., "South Station", "framingham") |
direction |
string | No | "outbound" (toward Worcester) or "inbound" (toward Boston). Default: "outbound" |
date |
string | No | Date in YYYY-MM-DD format. Default: today |
limit |
number | No | Number of departures (1-20). Default: 5 |
Example queries:
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
src/
├── app/
│ ├── api/[transport]/route.ts # MCP handler
│ └── page.tsx # Status page
├── lib/
│ ├── mbta/
│ │ ├── client.ts # MBTA API client
│ │ ├── types.ts # TypeScript types
│ │ └── stops.ts # Stop ID mappings
│ └── mcp/
│ ├── auth.ts # Authentication
│ └── tools/ # MCP tools
│ ├── get-departures.ts
│ └── index.ts
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mbta-worcester-line-mcp-server": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.