tods-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tods-mcp validate the TODS feed at ./test/fixtures/sample-tods-feed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tods-mcp π
Transit Operational Data Standard (TODS v2.1.0) Model Context Protocol (MCP) server, validator, supplement merge engine, and interactive CLI.
Standardized by MobilityData, TODS extends public GTFS to represent the internal operational reality of transit systems: crew run cuts, pieces of work, driver reliefs, deadheads / yard moves, and dated vehicle block rosters.
tods-mcp connects LLMs (Antigravity, Claude Desktop, Cursor, Claude Code) and developers directly to transit operations datasets.
π Features
β‘ Official Supplement Merge Engine: Executes the TODS v2.1.0 supplement overlay algorithm (
_supplement.txton GTFS files) with support for row updates, insertions, andTODS_delete=1removals.π©Ί Automated Validator: Checks primary key uniqueness, foreign key consistency against supplemented tables, temporal continuity (
start_time <= end_time), and ensures operators are never scheduled for overlapping trips.π§ββοΈ Crew Run Inspector: Decodes
run_events.txtinto chronological duties (report, clear, deadhead, trips, breaks, reliefs) with duty hour calculations.π Fleet & Block Assignments: Queries physical fleet rosters and vehicle assignments to blocks by service date.
π€ Built-in Agent Skill (
SKILL.md): Complete agent guide included for authoring and reasoning about TODS feeds.π₯οΈ Dual Mode: Runs as an MCP server via stdio or as an interactive CLI utility (
inspect,validate,merge,runs).
Related MCP server: bus-scheduling-mcp
π¦ Installation & CLI Usage
Build from source
git clone https://github.com/amin/tods-mcp.git # or local folder
cd tods-mcp
npm install
npm run buildInspect a feed
node dist/index.js inspect ./test/fixtures/sample-tods-feed
# Or if installed globally / linked:
tods inspect ./path/to/feed.zipValidate a feed
node dist/index.js validate ./test/fixtures/sample-tods-feedView effective supplement merge diffs
node dist/index.js merge ./test/fixtures/sample-tods-feed --table stops.txtList crew runs
node dist/index.js runs ./test/fixtures/sample-tods-feedπ οΈ MCP Tools Reference
Tool | Parameters | Description |
|
| High-level audit of GTFS base rows, supplement tables, crew runs, and vehicle counts. |
|
| Merges supplement files onto GTFS base tables and provides diffs of added, modified, and deleted rows. |
|
| Validates primary/foreign keys, non-overlapping trip assignments, and time integrity. |
|
| Returns chronological events for crew runs including duty durations and relief handoffs. |
|
| Returns fleet vehicle assignments mapped to vehicle blocks. |
|
| Lists non-revenue positioning trips, yard pulls, and depot moves. |
βοΈ MCP Configuration
Add to your mcp_config.json (Claude Desktop, Antigravity, Cursor, etc.):
{
"mcpServers": {
"tods-mcp": {
"command": "node",
"args": ["E:/development/tods-mcp/dist/index.js", "serve"]
}
}
}π License
MIT Β© Amin
Available Tools
6 toolstods_get_deadheadsC
Extracts deadheads, yard pulls, non-revenue positioning trips, and depot movements identified in trips_supplement.txt or run_events.txt.
Inputs: feed_path (required).
tods_get_runsA
Queries operational crew runs from run_events.txt. Returns chronological duty events, report/clear times, pieces of work, and total duty duration.
Inputs: feed_path (required), run_id, piece_id, service_id.
tods_get_vehicle_assignmentsC
Queries fleet vehicle assignments to blocks and dates from vehicle_assignments.txt and vehicles.txt.
Inputs: feed_path (required), date, block_id, vehicle_id.
tods_inspect_feedA
Inspects a TODS (Transit Operational Data Standard) directory or .zip feed. Returns high-level statistics, table list, supplement counts, crew runs, and fleet totals.
Inputs: feed_path (required).
tods_merge_supplementsC
Applies the official TODS v2.1.0 supplement merge algorithm (_supplement.txt files onto base GTFS files). Returns merge summary, additions, deletions, updates, and diffs.
Inputs: feed_path (required), table_name, sample_limit.
tods_validate_feedB
Runs comprehensive TODS v2.1.0 validation against the dataset: primary key uniqueness, foreign key consistency (run_events -> supplemented calendar/trips/stops), non-overlapping trip runs, time format/chronology, and TODS_delete rules.
Inputs: feed_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
Each tool targets a distinct operation: inspection, merging, validation, and entity-specific queries for runs, vehicle assignments, and deadheads. There is no meaningful overlap because inspect/validate/merge have clearly different outputs and each get_ tool is scoped to a different TODS entity.
All tools consistently use the tods_ prefix followed by a verb_noun pattern: inspect_feed, merge_supplements, validate_feed, get_runs, get_vehicle_assignments, get_deadheads. No mixed casing, inconsistent verbs, or irregular naming conventions are present.
Six tools is a well-scoped count for a TODS-specific server. The set covers feed-level operations and targeted queries without redundancy or unnecessary bloat.
The surface covers the main TODS workflows: inspect, merge supplements, validate, and query core operational entities. Minor conveniences like a dedicated vehicle-only query or raw table access are missing, but these are workaroundable and do not create dead ends.
Maintenance
Related MCP Connectors
Free MCP tools to validate multi-agent coordination thread turns and retrieve schema/samples.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Convert, lint and generate LLM tool schemas for OpenAI, Anthropic, Gemini and MCP
Build, validate, deploy β HTTP APIs, cron jobs, webhooks and MCP tools β from your AI client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools for querying live transit data (stops, departures, routes, vehicles, alerts) from any WP GTFS Pro site, enabling AI assistants to answer rider questions.16 npmGPL 2.0
- FlicenseAqualityDmaintenanceEnables LLM clients to access scheduling data, KPIs, routes, and trigger optimization algorithms via MCP.9-
- FlicenseAqualityDmaintenanceMCP server for St. Louis transit developer tooling, providing 45 tools for GTFS and GTFS-Realtime inspection, feed surveillance, schedule and arrival queries, assertions, drift detection, and golden-fixture generation for the Light Phone 3 Kotlin transit app, all backed by public unauthenticated sources.45-
- AlicenseAqualityDmaintenanceExposes Victoria's public transport (PTV) GTFS timetable data as MCP tools, allowing LLMs to answer natural-language questions about routes, stops, and departure times.4MIT