Socrata MCP Server

Search and query government open-data portals via the Socrata SODA 2.1 and Discovery APIs.

Remote serverstreamable-http

What is the Socrata MCP server?

Search and query government open-data portals via the Socrata SODA 2.1 and Discovery APIs. The socrata mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 8 defined tools rather than through you.

What it actually does

  • Declarative tool, resource, and prompt definitions — single file per primitive, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Adding it to your client

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Its toolset

Everything the assistant can do here goes through one of these:

  • socrata_list_portals — List known Socrata-powered government open-data portals with domain, organization name, and approximate dataset count
  • socrata_find_datasets — Search for datasets across all Socrata portals or scope to one portal via the Discovery API
  • socrata_get_dataset — Fetch full metadata and typed column schema for a dataset by ID — required before writing SoQL queries
  • socrata_query_dataset — Execute a SoQL query against any dataset: search, select, where, group, having, order, with DataCanvas spillover
  • socrata_dataframe_describe — List registered tables in a DataCanvas session — schema, row count, column names
  • socrata_dataframe_query — Run SELECT-only SQL against DataCanvas tables populated by socrata_query_dataset
  • Prerequisites — The Prerequisites tool exposed by this server
  • Installation — The Installation tool exposed by this server

Configuration

You will need 3 environment variables: MCP_TRANSPORT_TYPE, MCP_LOG_LEVEL, SOCRATA_APP_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Bun v1.3.0 or higher (or Node.js v24+). - Optional: A Socrata app token — register for free at any portal (e.g. data.seattle.gov) to get higher rate limits (10 req/s per token vs. shared throttled pool without one).

Caveats

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the socrata mcp server does with a few real requests.

When to reach for it

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Socrata's toolset — socrata_list_portals, socrata_find_datasets, socrata_get_dataset and 5 more — is a fair guide to whether it matches your workflow. It is maintained by cyanheads; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Socrata's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
socrata_list_portalsList known Socrata-powered government open-data portals with domain, organization name, and approximate dataset count
socrata_find_datasetsSearch for datasets across all Socrata portals or scope to one portal via the Discovery API
socrata_get_datasetFetch full metadata and typed column schema for a dataset by ID — required before writing SoQL queries
socrata_query_datasetExecute a SoQL query against any dataset: search, select, where, group, having, order, with DataCanvas spillover
socrata_dataframe_describeList registered tables in a DataCanvas session — schema, row count, column names
socrata_dataframe_queryRun SELECT-only SQL against DataCanvas tables populated by socrata_query_dataset
PrerequisitesThe Prerequisites tool exposed by this server.
InstallationThe Installation tool exposed by this server.

How to install the Socrata MCP server

{
  "mcpServers": {
    "socrata-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/socrata-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Bun v1.3.0 or higher (or Node.js v24+). - Optional: A Socrata app token — register for free at any portal (e.g. data.seattle.gov) to get higher rate limits (10 req/s per token vs. shared throttled pool without one).
VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
SOCRATA_APP_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Socrata to socrata list portals.
  • Use Socrata to socrata find datasets.
  • Use Socrata to socrata get dataset.

Frequently asked questions

It connects Socrata to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (socrata_list_portals, socrata_find_datasets, socrata_get_dataset, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Socrata directly.