- Home
- MCP servers
- Caltrain
Caltrain
- python
9
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"davidyen1124-caltrain-mcp": {
"command": "uvx",
"args": [
"caltrain-mcp"
]
}
}
}You can run a Model Context Protocol (MCP) server that serves Caltrain schedule data, using GTFS data to provide next-train queries and station lookups. It’s designed to work with MCP clients so you can ask your assistant for itineraries, see upcoming departures, and browse stations directly in conversations. This guide shows you how to install, configure, and use the Caltrain MCP Server end-to-end.
How to use
Use an MCP client to connect to the Caltrain MCP Server and ask for the next trains between two stations or browse all stations. The server runs locally and communicates over standard MCP I/O. You can access it via an MCP-enabled client like Claude Desktop or any compatible MCP client.
How to install
Prerequisites: you need a runtime for running MCP servers, Python for GTFS handling, and the MCP runtime client you’ll use to start the server.
Steps to install and start the Caltrain MCP Server:
# 1) Install the MCP runtime (uvx) if you haven’t already
# This script installs uv, a modern runtime you’ll use to run MCP servers
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2) Install dependencies via uv (if needed by the server project)
uv sync
# 3) Fetch the latest GTFS data for Caltrain into the expected folder
uv run python scripts/fetch_gtfs.py
Additional content
Configuration uses a local MCP entry so clients can launch and connect to the server. You can run the server directly via the MCP runner and integrate it into your MCP client setup. The following local startup is supported for MCP clients that use uvx to start the server.
{
"mcpServers": {
"caltrain": {
"command": "uvx",
"args": ["caltrain-mcp"]
}
}
}
This enables the Caltrain MCP Server to be started by an MCP client that supports uvx. If you use a different MCP client, you can start the server with the equivalent command:
uvx caltrain-mcp
`
Available tools
next_trains
Query the next Caltrain departures between two stations, with an optional time, returning times and destinations based on GTFS data.
list_stations
Return the full list of Caltrain stations supported by the MCP server.