Skip to content

bp4151/SafePghStreetsMCPServer

Repository files navigation

SafePghStreets MCP Server

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.

Features

  • 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 counts
  • match_crashes_by_street_name — Match crash records to streets within a route's bounding box
  • health_check — Simple monitoring endpoint

Quick Start

pip install fastmcp httpx gpxpy fitparse uvicorn
python server/main.py

Server starts on http://0.0.0.0:8000 (endpoint /mcp).

Requires Python 3.11+.

Docker

docker-compose up --build

Documentation

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

Data Source

License

MIT — see LICENSE.md.

About

Safe Streets Pittsburgh MCP Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors