sodabar
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., "@sodabarHow many rodent complaints are there in each NYC borough?"
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.
sodabar ๐ฅค
An MCP server that puts open data on tap โ four tools that let any LLM client search, inspect, and query 30,000+ civic datasets, with guardrails designed for a model on the other end.
Live demo: usmar-sodabar.static.hf.space โ the same console, answered in your browser straight from the live NYC Open Data API.
The problem โ and why it matters
Socrata powers the open-data portals of NYC, Chicago, Seattle, and hundreds of other governments โ tens of thousands of live, queryable datasets. But an LLM can't use any of it directly: it doesn't know which datasets exist, what their columns are called, or how to write a SoQL query against them. And if you naively hand a model a raw HTTP tool, it will page 500,000 rows into its own context window or paste an HTML error page into its reasoning.
sodabar is a Model Context Protocol server that closes that gap. It exposes the catalog โ schema โ query workflow as four typed tools, with the sharp edges filed off server-side: row caps a tool call cannot exceed, dataset-id validation that fails before a request leaves the machine, and upstream errors rewritten into messages a model can act on ("check the dataset id and domain") rather than tracebacks it will hallucinate around.
Point Claude Desktop, Claude Code, or any MCP client at it:
{
"mcpServers": {
"sodabar": {
"command": "/path/to/sodabar/.venv/bin/python",
"args": ["-m", "sodabar.server"]
}
}
}Related MCP server: data-detective
What an agent session looks like
docs/agent-demo.md is a committed transcript of Gemini driving the server through the real MCP stdio transport. Given only the four tools and the question "Which NYC borough has logged the most 'Rodent' 311 complaints so far in 2026?", the model planned three calls on its own:
search_datasets("311 Complaints")โ founderm2-nwe9get_schema("erm2-nwe9")โ learnedcomplaint_type,created_date,boroughquery_dataset(select="borough, count(*)", where="complaint_type = 'Rodent' AND created_date BETWEEN โฆ", group="borough", order="โฆ DESC", limit=3)
and answered: Brooklyn 5,521 ยท Manhattan 3,528 ยท Queens 3,079. No SoQL was written by a human at any point.
docs/demo-transcript.md is the scripted equivalent โ every tool exercised over a real stdio subprocess session, regenerated with make demo.
The four tools
Tool | What it answers |
| "What datasets exist about X?" โ full-text catalog search |
| "What columns can I query, and what are their types?" |
| SQL-shaped aggregation and filtering via SoQL |
| "What values does this column take?" โ vocabulary before |
domain defaults to data.cityofnewyork.us but accepts any Socrata portal (data.seattle.gov, data.cityofchicago.org, โฆ), so one server covers hundreds of cities.
The playground
make serve starts a FastAPI app whose REST routes mirror the MCP tools one-to-one โ the console shows the exact tools/call envelope and the exact result an LLM client would see:

Guardrails are part of the demo. A malformed tool call gets a readable, actionable error โ not a traceback:

The live static deployment serves the identical HTML with a 4 KB fetch shim that answers the /api/* routes in-browser, straight from the Socrata APIs (which send Access-Control-Allow-Origin: *) โ a zero-backend demo of a backend project.
Key design decisions
Guardrails live server-side, not in the prompt.
$limitis clamped to 1,000 rows no matter what the model asks for; dataset ids must match Socrata'sxxxx-xxxxform (which also blocks path traversal through the resource URL); domains must be bare hostnames. A prompt can be ignored โ a clamp cannot.Errors are written for the model that reads them. A 404 becomes "not found โ check the dataset id and domain"; a SoQL 400 surfaces Socrata's own message with "check your SoQL syntax". The retry policy distinguishes transient failures (429/5xx: three attempts with backoff) from semantic ones (400/404: fail immediately).
One client, three consumers. The MCP server, the FastAPI playground, and the demo scripts share one
SocrataClient, so timeout, retry, and error behavior can't drift between what's tested and what's deployed.Tool descriptions teach the workflow. The server's
instructionsand each tool's docstring steer a model towardsearch โ schema โ queryand toward aggregating withgroupinstead of paging raw rows โ the difference between a 6-row answer and a 6,000-row context spill.Tests mock the transport, not the code. All 54 tests run against
httpx.MockTransportโ CI needs no network and finishes in under a second, while retry logic, error mapping, and the FastAPI lifespan wiring are exercised for real.
Limitations
SoQL clauses are passed through to Socrata after shape checks, not parsed โ a syntactically valid but expensive query (e.g.
groupon a high-cardinality column) is bounded by the row cap and Socrata's own timeouts, nothing stricter.Catalog search relies on Socrata's relevance ranking, which favors title matches; an agent may need two searches with different phrasings.
Anonymous (keyless) Socrata access is throttled upstream; sustained heavy use would need an app token, which the client doesn't currently send.
The committed transcripts hit the live API, so re-running
make demowill show current counts, not the committed ones.
Reproduce it
git clone https://github.com/UsmarHaider/sodabar && cd sodabar
make venv # python3 -m venv + editable install
make test # 54 tests, no network needed
make demo # scripted MCP stdio session โ docs/demo-transcript.md (live API)
make serve # playground at http://127.0.0.1:8012
cp .env.example .env # then fill in GEMINI_API_KEY to run:
make agent-demo # Gemini plans the tool calls โ docs/agent-demo.mdProject layout
sodabar/
โโโ sodabar/
โ โโโ soql.py # query validation: 4x4 ids, domain shape, row caps
โ โโโ client.py # shared Socrata HTTP client: retries, error translation
โ โโโ server.py # the MCP server (4 tools, stdio transport)
โ โโโ service.py # FastAPI playground mirroring the tools over REST
โ โโโ web/index.html # self-contained console UI (no build step, no CDN)
โโโ scripts/
โ โโโ demo_session.py # scripted MCP client session โ docs/demo-transcript.md
โ โโโ agent_demo.py # Gemini function-calling over the MCP session
โ โโโ screenshot.sh # headless-Chrome captures of the console
โ โโโ deploy_space.py # builds + publishes the static HF Space demo
โโโ tests/ # 54 tests, all offline (httpx.MockTransport)
โโโ docs/ # committed transcripts + UI screenshotsAvailable Tools
4 toolsget_schemaA
Get a dataset's name, description, and column names/types. Call this before querying so column names in SoQL clauses are exact.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | data.cityofnewyork.us | |
| dataset_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses what is returned (name, description, column names/types) and prefacing querying implies a read-only operation. However, it doesn't mention return format, pagination, or any other behavioral traits beyond the basics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose and followed by a practical usage hint. Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema, the description covers the essential context: what the tool does and when to use it. The only gap is the meaning of the domain parameter, which is more of a parameter semantics issue than overall completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should compensate for parameter meaning. It implies context for dataset_id via 'dataset's' but leaves domain completely unexplained. The schema default for domain is helpful but the description adds no value in clarifying its purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Get' and clearly states the resource: a dataset's name, description, and column names/types. This distinguishes it from siblings like search_datasets, query_dataset, and profile_column, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to call the tool before querying, explaining that this ensures column names in SoQL clauses are exact. This is a clear usage context, though it doesn't explicitly list exclusions or alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
profile_columnA
Show the most frequent values of one column with counts โ a quick way to learn a column's vocabulary before writing a where clause.
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| column | Yes | ||
| domain | No | data.cityofnewyork.us | |
| dataset_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It states the core behavior (shows frequent values with counts) and implies a read-only operation. However, it does not disclose edge-case behavior such as handling of nulls, the exact meaning of the 'top' parameter, or any limitations on output size. This is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, front-loaded with the action and followed by a purposeful rationale. Every word earns its place, with no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and has an output schema, so return values are covered. However, the lack of parameter explanations and the omission of usage context around dataset_id/domain leaves gaps. The description is complete enough for a basic understanding but not for confident invocation without further inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain parameter meaning. It only hints at 'one column' and 'most frequent values' (implying top), but does not explain 'dataset_id', 'domain', or 'top' explicitly. The description fails to compensate for the complete lack of schema descriptions for any parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Show the most frequent values of one column with counts' โ a specific verb, resource, and output. It also distinguishes itself from siblings by focusing on column vocabulary rather than dataset search, schema retrieval, or arbitrary querying.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear use case: 'a quick way to learn a column's vocabulary before writing a where clause.' This implies when to use it relative to querying but does not explicitly name alternatives or exclusions. It gives enough context to know when it is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_datasetA
Run a SoQL query against a dataset. Clauses mirror SQL: e.g. select='borough, count(*) as n', where="created_date > '2026-01-01'", group='borough', order='n DESC'. Rows are capped at 1000 per call.
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | ||
| limit | No | ||
| order | No | ||
| where | No | ||
| domain | No | data.cityofnewyork.us | |
| offset | No | ||
| select | No | ||
| dataset_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full behavioral burden. It discloses the 1000-row cap per call, which is valuable, but it does not mention pagination via offset, error behavior, or authentication requirements. The transparency is moderate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with purpose, and includes practical examples without any waste. Every word contributes to understanding the tool's function and syntax.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description effectively covers the core query capabilities and the row cap, which are the most critical aspects. The existence of an output schema covers return values, so the description doesn't need to explain them. Minor gaps like offset/limit semantics are not explicitly addressed, but they are intuitive from parameter names.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by providing concrete examples for select, where, group, and order. Other parameters like dataset_id, domain, limit, and offset are self-evident from their names and defaults, so the overall parameter understanding is good.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs a SoQL query against a dataset, which is specific and distinct from sibling tools like search_datasets, get_schema, and profile_column. The examples reinforce this unique purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for querying data with SQL-like clauses, and the examples demonstrate syntax. It does not explicitly state when not to use it or mention alternatives, but the context is clear enough for a knowledgeable agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_datasetsA
Search a Socrata portal's catalog by keyword. Returns dataset ids, names, and descriptions. Use the returned id with get_schema/query_dataset.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| domain | No | data.cityofnewyork.us |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It communicates that this is a read-only search operation and outlines the return fields, which is useful. However, it does not disclose potential behaviors like default domain scope, result limits, or rate limiting, leaving some ambiguity about execution expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loads the core action, and has no wasted words. The second sentence adds essential workflow guidance without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's purpose, return fields, and next steps, but falls short on parameter semantics and lacks any caveats about pagination, default domain, or result size. While an output schema exists, the absence of parameter descriptions and annotations makes the tool incomplete for an agent to invoke correctly without external knowledge.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only mentions 'keyword' which maps to the 'query' parameter, but omits 'limit' and 'domain' entirely. The agent cannot infer the meaning or defaults of these parameters from the description, creating a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Search') and resource ('Socrata portal's catalog'), and explains what it returns (dataset ids, names, descriptions). It also distinguishes itself from siblings by explicitly linking the returned id to get_schema/query_dataset, establishing its role as the entry point.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides workflow context by stating 'Use the returned id with get_schema/query_dataset', which implies when to use this tool and what to do next. However, it does not explicitly mention when not to use it or alternative search strategies, leaving a small gap in exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
get_schema - First observed
profile_column - First observed
query_dataset - First observed
search_datasets
TDQS
Each tool has a clearly distinct role: searching for datasets, retrieving schema details, executing queries, and profiling column values. There is no overlap or ambiguity in purpose.
All tool names follow a consistent verb_noun pattern (search_datasets, get_schema, query_dataset, profile_column), making the API predictable and easy to navigate.
With only 4 tools, the server is well-scoped for its purpose of exploring and querying Socrata datasets. Each tool is essential and contributes to a cohesive workflow.
The tool set covers the full lifecycle of dataset exploration: discover datasets, inspect schema, query data, and understand column vocabulary. No critical operations are missing for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Agent-native MCP server over 49M+ US public and government records, privacy-first, always current.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for discovering, downloading, querying, and analyzing datasets from Ontario's open data portals, allowing natural language questions and high-performance analytics via DuckDB.231MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants the ability to connect to, query, profile, and monitor data sources โ turning any LLM into an interactive data engineering copilot.MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that provides safe, read-only access to Boston's open data portal, enabling natural language exploration of civic datasets.2GPL 3.0
- AlicenseNot gradedqualityCmaintenanceA governed MCP server enabling LLM agents to query BigQuery, inspect GCS, trigger Airflow DAGs, and run data-quality checks with built-in security guardrails like allow-lists, cost ceilings, and audit trails.1MIT
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/UsmarHaider/sodabar'
If you have feedback or need assistance with the MCP directory API, please join our Discord server