Skip to main content
Glama

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.

Related MCP server: Google Calendar MCP Server

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.

Available Tools

2 tools
list_stationsA

List all available Caltrain stations.

This tool is useful when you need to find the exact station names, especially if the next_trains() tool returns a "Station not found" error. Station names are case-insensitive and support some common abbreviations like 'SF' and 'SJ'.

Returns a formatted list of all Caltrain stations that can be used as origin or destination in the next_trains() tool.

Inputs: no named parameters.

next_trainsA

Return the next few scheduled Caltrain departures.

Args: origin: Station name (e.g. 'San Jose Diridon', 'Palo Alto', 'San Francisco'). Supports common abbreviations like 'SF' for San Francisco, 'SJ' for San Jose. If station is not found, use list_stations() to see all available options. destination: Station name (e.g. 'San Francisco', 'Mountain View', 'Tamien'). Supports common abbreviations like 'SF' for San Francisco, 'SJ' for San Jose. If station is not found, use list_stations() to see all available options. when_iso: Optional ISO-8601 datetime (local time). Default: now.

Note: If you get a "Station not found" error, try using the list_stations() tool first to see exact station names, then retry with the correct spelling.

Inputs: origin (required), destination (required), when_iso.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one lists all stations, the other retrieves upcoming departures. There is no overlap in functionality.

    Naming Consistency4/5

    Tool names are readable and follow a descriptive pattern, but 'list_stations' uses verb_noun while 'next_trains' uses adjective_noun, which is a minor inconsistency.

    Tool Count3/5

    With only 2 tools, it covers the basic station listing and departure lookup, but feels minimal for a transportation server. Additional tools like route or alert info would be expected for completeness.

    Completeness4/5

    The tool set covers the core workflow of finding stations and getting departures. However, there is no way to get details about a specific train or receive alerts, which are minor gaps.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers