socrata-mcp-server
Search and query government open-data portals (Socrata SODA API) via MCP. STDIO or Streamable HTTP.
Install / Use
claude mcp add cyanheads -- npx -y github:cyanheads/socrata-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
MarketingSupported Platforms
Tags
Our assessment of socrata-mcp-server
socrata-mcp-server scores 80/100 on our quality scale, 537th of 573 Marketing skills we index.
Its MCP Server is 20 KB long, well organised into 31 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated yesterday, so socrata-mcp-server is actively maintained.
- Our last check on 2026-09-12 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 87/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-10. Automated pattern scan on 2026-10-10. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
socrata-mcp-server compared with similar skills
All 4 of these similar skills score higher than socrata-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| socrata-mcp-server (this skill)by cyanheads | 80 | 3 | 1d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 106.0k | 4d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.2k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.7k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 90.3k | today | MCP Server |
Frequently asked questions
- How do I install socrata-mcp-server?
- Run
claude mcp add cyanheads -- npx -y github:cyanheads/socrata-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does socrata-mcp-server work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is socrata-mcp-server safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 87/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is socrata-mcp-server still maintained?
- The repository was last updated yesterday, so socrata-mcp-server is actively maintained.
Skill content
View source on GitHubPublic Hosted Server: https://socrata.caseyjhand.com/mcp
</div>Overview
Government open-data portals — searched and queried via the Socrata SODA 2.1 API and Discovery API. Discover portals and datasets, inspect typed column schemas, and run SoQL queries or DuckDB-powered SQL over large result sets, from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
| Tool | Description |
|:---|:---|
| 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 |
| socrata_dataframe_drop | Drop a DataCanvas canvas, or one table on it — opt-in via SOCRATA_DATAFRAME_DROP_ENABLED=true |
Resources
| Resource | Description |
|:---|:---|
| socrata://datasets/{domain}/{datasetId} | Fetch full metadata and column schema for a dataset by stable URI — same payload as socrata_get_dataset |
| socrata://portals | Paginated list of known Socrata portals with organization name and approximate dataset count |
All resource data is also reachable via tools. Use the corresponding tool for agent workflows — resources are for clients that support URI-addressable data.
Prompts
| Prompt | Description |
|:---|:---|
| explore_open_data | Structured six-step civic data investigation workflow: find portal → discover datasets → inspect schema → query → aggregate → synthesize |
Capability reference
socrata_list_portals <sub>tool</sub>
- Curated catalog of 39 well-known city, county, state, and federal portals — every member verified live in the Discovery catalog
- Per-portal dataset counts fetched live from the Discovery API, cached ~24 hours (
0means the portal exposes no dataset assets to the catalog;nullmeans the count is temporarily unavailable) - Client-side substring filtering on domain or organization name; pagination up to 200 per page with offset
- Returns domain (pass to
socrata_find_datasets), organization name, and approximate dataset count; the count includes datasets a portal federates from another Socrata tenant (Austin, Illinois, Mesa, and San Francisco publish through a data hub; Seattle catalogs under a sibling tenant) - Never fails on an upstream error — a count that cannot be fetched comes back
nulland the listing still returns
socrata_find_datasets <sub>tool</sub>
- Full-text query across dataset names/descriptions; scope with
domain, filter bycategories/tags, restrictonlyto an asset type (datasets, maps, files, calendars, stories) - Sort by relevance, page views, created date, or updated date; up to 100 per page with offset pagination
- Returns dataset IDs, names, domains, tags, update timestamps, and
column_names— the API field names SoQL takes (cuisine_description, not the display labelCUISINE DESCRIPTION), computed-region columns dropped — callsocrata_get_datasetfor typed schema before writing queries - Recovery hints on empty results — echoes applied filters and suggests how to broaden
domaintakes a bare hostname; URL forms (https://data.cdc.gov/) are reduced to the host. A scoped search covers every dataset the portal publishes, including ones federated from another Socrata tenant, reported under the portal's own domain- Typed errors:
rate_limited(retryable) when the Discovery API returns 429,unknown_domainwhen the Discovery catalog does not index the domain,invalid_domainwhen the domain is not a hostname
socrata_get_dataset <sub>tool</sub>
- Returns field names, Socrata data types, descriptions, row count (with
row_count_sourceprovenance), and licensing when available - Column
data_typedetermines WHERE clause syntax:Number→ bare literals (year=2023),Text→ single-quoted strings (year='2023') - Excludes computed region columns (
:@computed_region_*) to reduce noise; includes per-column non-null counts when available - Dataset IDs are portal-scoped — pass the
domainfrom the samesocrata_find_datasetsresult; URL-form domains are reduced to the host - Typed errors:
invalid_id(malformed four-by-four ID),not_found(no such dataset on the domain queried — the message names the ID and domain, and the recovery names the portal that holds the ID when the Discovery catalog knows it),unknown_domain(the domain is not serving the Socrata API — it does not resolve, is not a Socrata portal, or redirects elsewhere; fails on the first attempt),invalid_domain(not a hostname),rate_limited(retryable; honors the upstreamRetry-After) - Always call before writing a
socrata_query_datasetWHERE clause
socrata_query_dataset <sub>tool</sub>
searchfor quick full-text lookup ($q), or combineselect/where/group/having/orderfor full analytical control — clauses reference columns by API field name (field_namefromsocrata_get_dataset), never the display label; operators=,!=,>,<,LIKE,IN(...),BETWEEN,IS NULL,starts_with(),contains(),AND,OR,NOT- Aggregation via
count(*),sum(),avg(),min(),max()withgroup/having - Up to 5000 rows per call with offset pagination;
total_countreturned when a plain row query is truncated (absent for grouped/aggregate queries) assembled_queryechoes the SoQL string for learning the syntax; all SODA 2.1 row values are strings except geo/location columns, which return nested objects- When
CANVAS_PROVIDER_TYPE=duckdband the page fillslimit, up to 50,000 matching rows spill to a DataCanvas table whatever thelimit(canvas_id,table_name,canvas_row_count) — list its columns withsocrata_dataframe_describe, then run SQL withsocrata_dataframe_query. A smalllimit(e.g. 10) stages a large match without a large inline page - Typed errors:
invalid_id,not_found(names the ID, the domain queried, and the portal holding the ID when known),unknown_domain,invalid_domain,soql_error(bad SoQL, unknown column, or type mismatch — carries the upstreamsocrataCodeand, when upstream names it, the offendingcolumn; the recovery hint matches the code: API field names for a parse error, both fixes for an unknown identifier, the quoting rule for a type mismatch),rate_limited(retryable; honors the upstreamRetry-After)
socrata_dataframe_describe <sub>tool</sub>
- Requires
canvas_idfrom a priorsocrata_query_datasetspill — canvases cannot be enumerated, so omitting it fails withcanvas_id_requiredrather than listing tables - Shows table name, row count, and DuckDB column types for each registered table (SODA
number→DOUBLE) - Only meaningful when
CANVAS_PROVIDER_TYPE=duckdbis set - Typed errors:
canvas_id_required,canvas_not_found(expired or unknown token — re-runsocrata_query_datasetto stage a fresh canvas)
socrata_dataframe_query <sub>tool</sub>
- SELECT-only SQL against a
canvas_idtable staged bysocrata_query_dataset; DDL, DML, and file-reading functions (read_csv,read_parquet) are rejected - Spilled columns are typed from the SODA response headers:
numbercolumns (aggregate aliases included) areDOUBLE, so numeric comparisons work without a cast (year > 2020,amount < 500); text and timestamp columns stayVARCHAR— compare times withCAST(date AS TIMESTAMP) - Up to 10,000 rows per call, default 1000
- Typed errors:
canvas_disabled(CANVAS_PROVIDER_TYPEnot set),canvas_not_found,table_not_found,sql_rejected(non-SELECT, system catalog access, or a denied function) - Works out of the box when
CANVAS_PROVIDER_TYPE=duckdbis set — DuckDB ships as a regular dependency
socrata_dataframe_drop <sub>tool</sub>
- Opt-in: listed as disabled until
SOCRATA_DATAFRAME_DROP_ENABLED=true; also needsCANVAS_PROVIDER_TYPE=duckdb - Without
table_name, drops the whole canvas — itscanvas_idstops resolving forsocrata_dataframe_describeandsocrata_dataframe_query. Withtable_name, drops that one table and leaves the canvas and its other tables in place - Reports the dropped tables with their row counts and the tables still on the canvas
- Deletes only the staged copy —
socrata_query_datasetcan stage the data again - Typed errors:
canvas_disabled(CANVAS_PROVIDER_TYPEnot set),canvas_not_found(unknown, expired, or already dropped),table_not_found(carries the canvas'savailableTables)
socrata://datasets/{domain}/{datasetId} <sub>resource</sub>
- Returns the same payload as
socrata_get_dataset— field names, data types, descriptions, row count, licensing domainanddatasetIdcome fromsocrata_find_datasets;datasetIdmust match the four-by-four pattern (e.g.kzjm-xkqj)- Fails validation on a malformed ID, and not-found when the dataset doesn't exist on the domain (naming the portal that holds the ID when the Discovery catalog knows it)
socrata://portals <sub>resource</sub>
- Curated catalog of 39 known Socrata portals, cursor-paginated (
cursorparam, default 50 per page, capped at 200) - Returns domain, or
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
106.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
78.2kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.7kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
90.3k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
