A comprehensive platform for exploring New York City's procurement data, including vendor information, contracts, solicitations, and spending analysis. Features an AI-powered chatbot and MCP (Model Context Protocol) server for use with Claude Desktop.
- 🔍 Contract Search - Search 55,000+ NYC contracts by agency, vendor, or keyword
- 🏢 Vendor Directory - Browse 34,000+ registered vendors with certification data
- 📋 Solicitation Tracker - Monitor open and closed procurement opportunities
- 💰 Spending Analysis - Analyze 147M+ transactions from Checkbook NYC
- 🤖 AI Chatbot - Natural language queries powered by Google Gemini
- 🔌 MCP Server - Claude Desktop integration for AI-assisted analysis
- Python 3.10+
- pip
# Clone the repository
git clone https://github.com/wegovnyc/nyc-contracting-explorer.git
cd nyc-contracting-explorer
# Install dependencies
pip install -r requirements.txt
# Run the web application
python app.pyVisit http://localhost:5000 to access the explorer.
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"nyc-contracts": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://oce.wegov.nyc/mcp/mcp"
]
}
}
}Restart Claude Desktop, then ask questions like:
- "How many contracts did Parks have in 2023?"
- "Show me vendor certification statistics"
- "What are the top IT vendors for the city?"
| Tool | Description |
|---|---|
get_database_overview |
Complete summary of all procurement data |
get_contract_stats |
Count contracts by agency and/or fiscal year |
get_agency_contracts |
Agency summary with top vendors |
get_vendor_stats |
Vendor breakdown by certification type |
get_solicitation_stats |
Solicitation trends by status and method |
get_yearly_trends |
Year-over-year procurement trends |
| Tool | Description |
|---|---|
search_vendors |
Find vendors by name |
search_contracts |
Search contracts by agency, vendor, status |
search_solicitations |
Find solicitations by status or agency |
| Tool | Description |
|---|---|
get_spending_by_year |
Checkbook NYC spending by fiscal year |
get_vendor_spending |
Spending history for specific vendor |
The spending data is available in a public S3 bucket for direct analysis:
Bucket: s3://nyc-databook-spending
-
AWS CLI (no credentials needed):
aws s3 ls s3://nyc-databook-spending/ --no-sign-request aws s3 cp s3://nyc-databook-spending/fiscal_year=2024/chunk_0001.parquet . --no-sign-request -
Direct HTTPS:
https://nyc-databook-spending.s3.amazonaws.com/fiscal_year=2024/chunk_0001.parquet -
DuckDB (for analysis):
INSTALL httpfs; LOAD httpfs; SELECT * FROM 's3://nyc-databook-spending/fiscal_year=2024/*.parquet' LIMIT 10;
| Path | Contents |
|---|---|
fiscal_year=YYYY/ |
Spending transactions (Parquet, chunked) |
contracts/fiscal_year=YYYY/ |
Contract data (Parquet) |
Data spans FY2010-FY2026 with 147M+ spending transactions.
- PASSPort (MOCS) - Vendor registrations, contracts, solicitations
- Checkbook NYC - City spending transactions
- City Record Online - Public notices and procurement announcements
nyc-contracting-explorer/
├── app.py # Flask web application
├── mcp_server.py # MCP server for Claude Desktop
├── serve_sse.py # Streamable HTTP server with OAuth
├── chatbot.py # Gemini-powered AI chatbot
├── build_database.py # Database construction scripts
├── daily_update.py # Daily data refresh
├── templates/ # Jinja2 HTML templates
├── static/ # CSS, JS, images
└── requirements.txt # Python dependencies
See Deployment Guide for production setup with nginx and systemd.
Contributions are welcome! Please read our Contributing Guidelines before submitting PRs.
This project is licensed under the MIT License - see the LICENSE file for details.
- Live Demo: oce.wegov.nyc
- WeGov NYC: wegov.nyc