mcpField
C
caltrain-mcp

caltrain-mcp

Local
github.com/davidyen1124Productivity10Updated 4w ago

About caltrain-mcp

A remote MCP server for Caltrain passengers, using the official Caltrain GTFS schedule. It finds upcoming trains, transfer options, and daily timetables, with an interactive timetable in MCP Apps hosts that support it.

Key features

  1. 01Find upcoming trains between stations
  2. 02Find last trains arriving by 9
  3. 03Provide transfer routes
  4. 04Recognize common station shorthand
  5. 05Interactive daily timetable with filters

Use cases

  1. 01Check the next train between two stations
  2. 02Find a route arriving before 9
  3. 03Plan a trip requiring a transfer
  4. 04Filter timetables by Express, Limited, or Local

MCP support

It provides an unauthenticated Streamable HTTP MCP endpoint with the read-only tools `next_trains`, `list_stations`, and `get_timetable`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"caltrain": {
"command": "uvx",
"args": [
"caltrain-mcp"
]
}
}
}
Run commanduvx caltrain-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypicaltrain-mcp

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Caltrain MCP

CI

A remote MCP server that tells you exactly when the next Caltrain leaves, so you can be precisely informed about how late it is. It runs on Caltrain's official GTFS schedule, which means the disappointment is official too.

Server: https://caltrain-mcp-rho.vercel.app/mcp (Streamable HTTP, no auth). Live demo at caltrain-mcp-rho.vercel.app.

The full-day Caltrain timetable open next to the chat in ChatGPT

In ChatGPT and other MCP Apps hosts, answers come with an interactive timetable. Tap a train for its stops, or open the whole day with Express / Limited / Local filters and keep asking questions about what's on screen. Everywhere else you get the same answer as text.

What it knows

  • The next trains between two stations, or the last ones that still get you there by 9.
  • That the 12:05 AM train belongs to yesterday, that Thanksgiving runs a weekend schedule, and that South County doesn't do weekends.
  • Where to change trains when there's no direct one.
  • That sf, sj and 22nd are stations, because nobody types "San Francisco Caltrain Station".

Tools: next_trains, list_stations, and get_timetable (only the timetable view calls that one). All read-only.

Development

npm install
npm run dev    # http://localhost:3000, MCP at /mcp
npm test

It's Next.js on Vercel:

  • Schedule engine: lib/schedule.ts.
  • Timetable view: widget/, React, Tailwind and shadcn built into one HTML file.
  • Feed: data/gtfs/. A weekly GitHub Action fetches a fresh one and opens a PR, and merging deploys it.

When the view changes, bump TIMETABLE_URI in lib/mcp/constants.ts. ChatGPT caches it harder than you'd think.

The old Python package on PyPI (uvx caltrain-mcp) still installs, but it's retired. Use the URL above.

License

LICENSE.md. Uses official Caltrain GTFS data; not affiliated with Caltrain. If the train is late, take it up with them.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.