nycdata
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nycdatasearch for restaurant inspections"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nycdata
A developer-first CLI and MCP server for discovering, inspecting, querying, and profiling live NYC Open Data.
nycdata sits above NYC's Socrata APIs. It does not mirror datasets or replace NYC as the source of truth. It makes the path from project idea to verified API integration faster and less error-prone.
Repository: https://github.com/HT224/nycdata
Status
Early MVP (0.2.0). Implemented CLI commands:
searchdescribequeryprofile
The MCP server exposes the same capabilities to coding agents. Planned next: generated types, saved queries, and deterministic client generation.
Related MCP server: ontario-data-mcp
Requirements
Node.js 20+
No credentials required for normal public reads
Optional Socrata application token for higher rate limits
Install locally
npm install
npm run build
npm link
nycdata --help
nycdata-mcpFor development without linking:
npm run dev -- search "restaurant inspections"Optional token
export SOCRATA_APP_TOKEN="your-token"The token is sent through the X-App-Token header. It is never added to URLs or generated output.
Discover datasets
nycdata search "restaurant inspections"
nycdata search "motor vehicle crashes" --limit 5
nycdata search "311 complaints" --format jsonInspect schema and metadata
nycdata describe 43nn-pn8j
nycdata describe erm2-nwe9 --format jsonQuery live data
nycdata query 43nn-pn8j --limit 5
nycdata query 43nn-pn8j \
--select "camis,dba,boro,grade,grade_date" \
--where "boro = 'Brooklyn' AND grade = 'A'" \
--order "grade_date DESC" \
--limit 10
nycdata query 43nn-pn8j \
--near "40.6895,-73.9724" \
--radius 1000 \
--location-field location \
--limit 10 \
--show-urlFormats:
nycdata query h9gi-nx95 --limit 10 --format table
nycdata query h9gi-nx95 --limit 10 --format json
nycdata query h9gi-nx95 --limit 10 --format csvProfile before building
nycdata profile 43nn-pn8j
nycdata profile erm2-nwe9 --sample-size 250 --format jsonProfiles are intentionally bounded. Row counts are queried live; null rates and cardinality are explicitly sample-derived so the CLI does not download an entire dataset by accident.
MCP server
nycdata-mcp runs a local stdio MCP server with four read-only tools:
search_datasetsdescribe_datasetquery_datasetprofile_dataset
Each tool uses the same live NYC Open Data client as the CLI. Query results are capped at 1,000 rows per call, profile samples are capped at 1,000 rows, and proximity radii are capped at 50 km.
After building the package, configure an MCP client to run:
{
"mcpServers": {
"nycdata": {
"command": "node",
"args": ["/absolute/path/to/nycdata/dist/mcp.js"],
"env": {
"SOCRATA_APP_TOKEN": ""
}
}
}
}The token entry is optional. The server writes protocol messages to stdout and diagnostics to stderr.
Agent workflow
An agent can:
search for candidate datasets;
inspect the chosen dataset's actual fields and row semantics;
run a small live query;
profile data quality;
build application code from verified results instead of guessed schemas.
Architecture
The CLI is a thin presentation layer over reusable TypeScript modules:
client.ts— catalog, metadata, and SODA requestsquery.ts— dataset validation and SoQL URL constructionprofile.ts— bounded data-quality analysisformat.ts— table, JSON, and CSV outputmcp.ts— stdio MCP transport and safe tool schemasindex.ts— public core exports for future CLI/MCP/scaffold consumers
See plan.md for scope, principles, milestones, and deferred work.
Development
npm run check
npm run test:live-mcpcheck runs lint, TypeScript checks, unit/in-memory MCP tests, and the production build. test:live-mcp launches the built stdio server through a real MCP client and calls all four tools against live NYC data.
Data source
Catalog: https://data.cityofnewyork.us/
API documentation: https://dev.socrata.com/
Dataset schemas and update patterns vary by agency. Always inspect and profile a dataset before treating rows as canonical entities.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HT224/nycdata'
If you have feedback or need assistance with the MCP directory API, please join our Discord server