NYC Open Data Capital Projects MCP Server
Enables AI assistants to query NYC capital project data (schedule, budget, lifecycle) using 16 tools with domain rules like PID↔FMS many-to-many and role-aware agency attribution.
README
NYC Open Data — Capital Projects MCP Server
A local MCP server over the NYC Capital Projects Dashboard (CPD) datasets on NYC Open Data. It ingests four public Socrata datasets into a single local DuckDB and exposes 16 tools so an AI assistant can answer schedule, budget, and lifecycle questions about NYC capital projects — with the domain rules (PID↔FMS many-to-many, role-aware agency attribution, signed variance reporting) baked into the tools instead of left for the caller to rediscover.
Source datasets (Socrata)
| ID | Dataset |
|---|---|
fb86-vt7u |
Citywide Capital Project List Detail (the schedule↔budget edge) |
gyhf-rsr3 |
Citywide Budget & Spend by FY |
qj5n-h5qp |
Citywide Budget Spend History & Variance |
95tx-snak |
Citywide Schedule History & Variance |
Quickstart
Requires Python ≥ 3.12 and uv.
uv sync
uv run od-cpd init # download + materialize all 4 datasets → ./var/cpd.duckdb
uv run od-cpd status # per-dataset freshness vs Socrata
uv run od-cpd update # re-ingest when Socrata publishes a new period
Optional: set OD_CPD_SOCRATA_APP_TOKEN to a free
Socrata app token to avoid
anonymous rate limits during ingest.
Connect an MCP client
The server speaks stdio. With Claude Code:
claude mcp add od-cpd --env PYTHONPATH=/path/to/repo/src -- \
uv run --directory /path/to/repo od-cpd-server
Or in any client's JSON config:
{
"mcpServers": {
"od-cpd": {
"command": "uv",
"args": ["run", "--directory", "/path/to/repo", "od-cpd-server"],
"env": { "PYTHONPATH": "/path/to/repo/src" }
}
}
}
(PYTHONPATH makes the launch robust when uv's editable install is flaky —
e.g. on iCloud-synced paths.)
What's inside
docs/FEATURES.md— the canonical inventory: all 16 tools and every domain rule the server encodes. Start here.
The headline domain rules, briefly:
- "Project" is ambiguous. A PID identifies a schedule; an FMS ID identifies a budget line. They are many-to-many (~3% fan out), so the tools list all counterparts rather than silently picking one.
- Agency attribution is role-aware. "Agency X's projects" means the sponsor (owner) view for normal agencies, but the managing (builder) view for the three construction-manager agencies (DDC/DCAS/EDC).
- Values are reported signed and neutral ("moved 45 days later", "budget grew $2.1M") rather than only surfacing one direction.
Layout
src/od_cpd/— ingest, materialization, and the MCP server + toolsdata/— curated agency/category dictionaries (YAML, tracked)tests/— unit tests + golden evals (uv run pytest)var/,exports/— runtime DuckDB + exports (gitignored, regenerable)
Develop
uv run pytest # fallback: PYTHONPATH=src python -m pytest
Classification is dictionary-driven: edit data/agencies.yaml /
data/categories.yaml (not Python) to adjust agency or category mappings,
then re-materialize. See CLAUDE.md for the atomic-swap pattern that applies
materialization changes without re-downloading.
Data caveats
This is an independent project, not affiliated with the City of New York.
Figures reflect whatever reporting period the underlying Socrata datasets
carry at ingest time; always check dataset_info for the current period and
per-dataset caveats.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.