An MCP (Model Context Protocol) server that analyzes bicycle crash safety on Pittsburgh streets using GPS routes (GPX/FIT format) and WPRDC Allegheny County crash data.
get_wprdc_crash_data— Fetch all bicycle crash records for Allegheny County (2004–2024)summarize_route_safety— Score each street on a GPX/FIT route from 1 (dangerous) to 10 (safe) based on historical crash countsmatch_crashes_by_street_name— Match crash records to streets within a route's bounding boxhealth_check— Simple monitoring endpoint
pip install fastmcp httpx gpxpy fitparse uvicorn
python server/main.pyServer starts on http://0.0.0.0:8000 (endpoint /mcp).
Requires Python 3.11+.
docker-compose up --build| File | Description |
|---|---|
| QUICKSTART.md | Install, run, test, and deploy instructions |
| MCP_SERVER_GUIDE.md | Detailed API reference, safety score formula, JSON-RPC examples |
| QUICK_REFERENCE.md | Code examples for parse_route_data() and format detection |
| AGENT.md | Workflow for combined DOMI obstruction + safety assessment |
| INDEX.md | Full documentation index for the format detection system |
- API: WPRDC Allegheny County Crash Data
- Filter: Bicycle-involved crashes (
BICYCLE = '1') - Caching: Fetched once per server session and cached in memory
MIT — see LICENSE.md.