Metadata-Version: 2.5
Name: transitlab
Version: 0.1.0
Summary: Query open NYC transit data (subway, bus, taxi, Uber and Lyft) from the command line, with DuckDB. Includes an MCP server for AI agents.
Project-URL: Homepage, https://transitlab.nyc/data
Project-URL: Documentation, https://docs.transitlab.nyc/start/cli-and-mcp
Project-URL: Data, https://data.transitlab.nyc/v1/catalog.json
Author-email: Transit Lab <hello@transitlab.nyc>
License-Expression: MIT
License-File: LICENSE
Keywords: bus,duckdb,mcp,nyc,open-data,parquet,subway,taxi,transit
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Requires-Dist: duckdb>=1.3
Requires-Dist: mcp<2,>=1.9
Description-Content-Type: text/markdown

# transitlab

Query open NYC transit data from [Transit Lab](https://transitlab.nyc/data) on your own computer.
Subway run times and slow zones, bus speeds and lanes, taxi trips, Uber and Lyft trips, service alerts.
It reads our public Parquet files with DuckDB, so there is nothing to sign up for and no key.

```sh
uvx transitlab tables
uvx transitlab describe subway_stop_events
uvx transitlab sql "select route_id, count(*) as stops from subway_stop_events group by 1 order by 2 desc limit 5"
uvx transitlab sql "select * from bus_lanes limit 100" --format csv -o lanes.csv
uvx transitlab download subway_segment_times --from 2026-01 --to 2026-03 -o data
```

Big tables are one file a month or a day. `--from` and `--to` pick which files to read (YYYY-MM-DD or
YYYY-MM). They do not trim rows inside those files; add a `WHERE` for that. Filtering on the `year` and
`month` columns in SQL skips files the same way.

## For AI agents

```sh
claude mcp add transitlab -- uvx transitlab mcp
```

`transitlab mcp --config claude-desktop` and `--config cursor` print the settings for those apps.
The server has four tools: `list_tables`, `describe_table`, `run_sql` (read-only, 1,000 rows, 60 seconds)
and `example_queries`.

Docs: https://docs.transitlab.nyc/start/cli-and-mcp. Data: CC BY 4.0. Credit transitlab.nyc and the
original source (MTA, NYC DOT or NYC TLC).
