npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

socrata-mcp-server

v0.1.5

Published

MCP server that enables a client, such as Claude Desktop, to access open government data through Socrata APIs

Downloads

111

Readme

Socrata MCP Server

A Model Context Protocol (MCP) server that connects AI tools to open data on any Socrata-powered portal — including NYC, Chicago, San Francisco, and hundreds of other cities.

Formerly known as opengov-mcp-server. Renamed to avoid confusion with OpenGov Inc.

What it does

This server gives AI assistants (Claude, Copilot, Cursor, Codex) direct access to public datasets via Socrata's open data API. Instead of the AI guessing at data, it can query real civic data in real time.

Example queries an AI can answer with this server:

  • "What are the top 311 complaint types in Brooklyn this month?"
  • "Show me restaurant inspection trends in Manhattan"
  • "Compare crime data across Chicago neighborhoods"

Quick start

Use with npx (no install needed)

npx socrata-mcp-server --stdio

Claude Desktop configuration

Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "socrata": {
      "command": "npx",
      "args": ["-y", "socrata-mcp-server", "--stdio"],
      "env": {
        "DEFAULT_DOMAIN": "data.cityofnewyork.us"
      }
    }
  }
}

Development

git clone https://github.com/npstorey/socrata-mcp-server.git
cd socrata-mcp-server
npm install
npm run build
npm run dev   # Starts on http://localhost:10000

Environment variables

# .env
PORT=10000
DATA_PORTAL_URL=https://data.cityofnewyork.us  # Default portal (optional)

Available tools

| Tool | Description | |------|-------------| | get_data | Unified data access: catalog search, metadata lookup, SoQL queries, and dataset metrics | | search | Search for datasets or records, returns ID/score pairs | | fetch | Retrieve full dataset metadata or records by ID |

Supported portals

Works with any Socrata-powered open data portal. Some popular ones:

| City | Portal | |------|--------| | New York City | data.cityofnewyork.us | | Chicago | data.cityofchicago.org | | San Francisco | data.sfgov.org | | Seattle | data.seattle.gov | | Los Angeles | data.lacity.org |

Transport

  • stdio — For local use with Claude Code, Cursor, and VS Code Copilot
  • HTTP (Streamable HTTP) — For web applications. Endpoint: POST /mcp

The deployed instance at https://socrata-mcp-server.onrender.com powers civicaitools.org.

Development

npm test          # Run tests
npm run build     # Build TypeScript
npm run dev       # Start dev server
npm run lint      # Lint

Related projects

| Repository | Description | |-----------|-------------| | civic-ai-tools | Starter project that bundles this server with Data Commons MCP for multi-source civic data queries | | civic-ai-tools-website | Demo website at civicaitools.org — side-by-side comparison of AI with and without live data | | odp-mcp | Socrata's official MCP server (similar functionality, different implementation) |

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Disclaimer

This is a personal project and is not affiliated with, endorsed by, or representative of any employer or organization.

License

MIT