MCP.so
ログイン

Caltrain MCP Server

@davidyen1124

基本情報

カテゴリ

生産性

ライセンス

NOASSERTION

トランスポート

stdio

作者

davidyen1124

投稿者

David

Caltrain MCP Server について

A Model Context Protocol (MCP) server for Caltrain schedules. Get real-time train departures using GTFS data, designed for Claude Desktop and other MCP clients.

#caltrain#mcp#train-schedules

Caltrain MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "caltrain": {
      "command": "uvx",
      "args": [
        "caltrain-mcp"
      ]
    }
  }
}

Caltrain MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

上のボタンで一時的なサンドボックスでこのサーバーを実行し、ツール一覧を取得できます。

概要

What is caltrain-mcp?

caltrain-mcp is a Model Context Protocol server that provides Caltrain schedule information using official GTFS data. It is intended for users of MCP-compatible clients (like Claude Desktop) who need to look up train departures, stations, and travel times between any two Caltrain stops.

How to use caltrain-mcp?

Configure caltrain-mcp in your MCP client (e.g., Claude Desktop) by adding "caltrain": { "command": "uvx", "args": ["caltrain-mcp"] } to the MCP configuration file. The server can also be tested directly via Python imports or started with uvx caltrain-mcp. It relies on local GTFS data that must be fetched first by running fetch_gtfs.py.

Key features of caltrain-mcp

  • Real‑time (GTFS‑based) train schedules between any two stations
  • Look up all 31 Caltrain stations by full name, short name, or abbreviation
  • Query departures at a specific time using the when_iso parameter
  • Smart partial matching of station names (e.g., "diridon" matches "San Jose Diridon")
  • Supports weekday/weekend service calendars from official GTFS data

Use cases of caltrain-mcp

  • Ask your AI assistant for the next trains from San Jose Diridon to San Francisco
  • Find all available Caltrain stations without memorizing names
  • Plan a commute at a precise time and date, using GTFS data
  • Get departure times for the Gilroy extension line

よくある質問

1

What GTFS data does caltrain-mcp use?

It uses official Caltrain GTFS data, including `stops.txt`, `trips.txt`, `stop_times.txt`, and `calendar.txt`, which are downloaded by running `fetch_gtfs.py`.

2

How do I install and run caltrain-mcp?

Install the `uv` package manager, run `uv sync` to install dependencies, then download the GTFS data with `uv run python scripts/fetch_gtfs.py`. Finally, configure your MCP client to run `uvx caltrain-mcp`.

3

What tools does caltrain-mcp expose?

It exposes two tools: `next_trains(origin, destination, when_iso=None)` to get upcoming departures, and `list_stations()` to list all 31 Caltrain stations.

4

How does caltrain-mcp communicate?

The server communicates via stdin/stdout using the Model Context Protocol (MCP). It does nothing when run directly in a terminal.

5

Are there any known limitations?

The README notes that actual arrival times may vary and that the server relies on the official GTFS data, so accuracy depends on that data. It handles mixed integer/string GTFS fields and supports 24+ hour time format.

コメント

「生産性」の他のコンテンツ