# socrata-mcp-server

MCP server for querying open government data through Socrata SODA API — portals at city, county, state, and federal levels.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 1882 installs · ★ 4 repo stars
- Author: cyanheads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cyanheads/socrata-mcp-server
- Updated: 2026-10-04
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/socrata-mcp-server

## What it does

The server provides seven tools: portal and dataset search, column schema retrieval, SoQL query execution, and SQL aggregation via DataCanvas. The catalog holds 39 verified U.S. portals spanning municipal to federal scope, with dataset counts refreshed daily. Before querying, fetch the schema with `socrata_get_dataset`: it returns data types (`Number`, `Text`) that determine WHERE clause syntax.

\`socrata_query_dataset` runs SoQL queries with filtering, grouping, and sorting; for large result sets, data spills into DataCanvas where `socrata_dataframe_query` accepts standard SQL. Table deletion (`socrata_dataframe_drop`) requires the `SOCRATA_DATAFRAME_DROP_ENABLED=true` flag. The server runs over HTTP with no local dependencies.

## Requirements
- Remote server: `https://socrata-mcp-server--cyanheads.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http socrata-mcp-server https://socrata-mcp-server--cyanheads.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add socrata-mcp-server --url https://socrata-mcp-server--cyanheads.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "socrata-mcp-server": {
            "url": "https://socrata-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "socrata-mcp-server": {
            "type": "http",
            "url": "https://socrata-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http socrata-mcp-server https://socrata-mcp-server--cyanheads.run.tools
```

## When to use it
- locate datasets by keywords across thousands of portals
- inspect column schema before writing queries
- run SoQL queries with filters and grouping
- aggregate large result sets with SQL
- compare data from multiple datasets in one session

## Example prompts
- Show portals for Illinois state
- Find datasets about restaurant inspections in Chicago
- Get schema for dataset `rmc7-nv7g` on domain `data.cityofchicago.org`

## Similar
- [opendata-cat](https://affpapa.org/en/nevibecode/mcp/opendata-cat.md) — MCP server · ★ 22 repo stars
- [cdc-health-mcp-server](https://affpapa.org/en/nevibecode/mcp/cdc-health-mcp-server.md) — MCP server · ★ 5 repo stars
- [EcuDataMCP](https://affpapa.org/en/nevibecode/mcp/ecudatamcp.md) — MCP server · ★ 14 repo stars
- [NY Data Registry](https://affpapa.org/en/nevibecode/mcp/ny-data-registry.md) — MCP server · ★ 14 repo stars
- [Dados Abertos Senado BR MCP](https://affpapa.org/en/nevibecode/mcp/dados-abertos-senado-br-mcp.md) — MCP server · ★ 7 repo stars
- [Boletín Claro](https://affpapa.org/en/nevibecode/mcp/boletin-claro.md) — MCP server

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
