Houston Open Data MCP
Click on "Deploy 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., "@Houston Open Data MCPFind Houston datasets about 311 service requests"
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.
Houston Open Data MCP
An MCP server that lets an AI assistant search and read public data from the City of Houston Open Data portal, which runs on CKAN.
Built from the GSA MCP hackathon template as a Dataset Access Server. It is read-only, and it needs no key or sign-in.
Hackathon prototype. Not an official City of Houston service.
Tools
Tool | What it does |
| Search the catalog by keyword, department, or topic |
| Open a dataset and list its resources |
| List a table's columns and row count |
| Read rows with filters, sorting, and paging |
| List departments and their dataset counts |
| List topic groups and their dataset counts |
The server also offers two prompts (explore_houston_topic, compare_by_geography)
and two resources (houston://info/server, houston://docs/join-keys).
Related MCP server: Calgary Open Data MCP Server
Run it on your computer
Install uv, then, in PowerShell or any terminal:
uv sync --group dev
uv run pytest tests/ -v
uv run streamlit run streamlit_app.pyThe page opens at http://localhost:8501 and the MCP endpoint is
http://localhost:8501/api/mcp. Check the endpoint from a second terminal:
uv run python scripts/smoke_test.py http://localhost:8501/api/mcpTo run it as a local stdio server for Claude Code instead, use uv run python main.py.
Chat agent
The page's Ask tab is a chat agent that uses Claude and the same read-only tools.
It needs ANTHROPIC_API_KEY and APP_PASSWORD, set as Streamlit secrets or locally in
.streamlit/secrets.toml, which Git ignores. Copy .streamlit/secrets.toml.example to
start. API usage is billed separately from a Claude plan.
Host it
See deploy/streamlit/README.md. One process serves
the Streamlit page at / and MCP at /api/mcp. Streamlit Community Cloud may block
outside MCP clients, so test it with scripts/smoke_test.py. The template's IBM and
Databricks kits are in deploy/, but they haven't been tested with this server.
Repo layout
streamlit_app.py # Streamlit host: page + /api/mcp
Dockerfile.streamlit # Same host, in a container
main.py # Local stdio entry point
src/houston_opendata/
├── app.py # Builds FastMCP, picks the transport
├── portal.py # Read-only CKAN client, shared by the tools and the page
├── page.py # Streamlit page
├── config.py, models.py, utils.py, routes.py
├── tools/ # One file per tool
├── prompts/
└── resources/
scripts/smoke_test.py # Checks a running server with a real MCP client
tests/ # Tests that run without network access
eval/EVALUATION.md # Evaluation write-up for the hackathon submission
deploy/ # Deployment kitsAdd a tool
Create src/houston_opendata/tools/my_tool.py with a register(mcp) function, then
call it from tools/__init__.py. Put any portal call in portal.py.
Security
Tools use only allow-listed CKAN read actions. There is no SQL endpoint and no write action.
The portal address comes from server configuration, never from a tool argument.
Identifiers are validated before any request, and upstream errors are sanitized.
The endpoint has no authentication, which suits public data. Review your agency's requirements before using it beyond the hackathon.
License
MIT. See SECURITY.md.
Available Tools
6 toolshouston_describe_tableDescribe a Houston tableARead-onlyIdempotent
List a queryable resource's columns, types, and total row count.
Call this before houston_query_records so that filters, column lists, and
sorting use real column names. Only works when queryable is true.
| Name | Required | Description | Default |
|---|---|---|---|
| resource_id | Yes | Resource `id` (UUID) from houston_get_dataset. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely new behavioral context the annotations cannot express: the `queryable` precondition that gates whether the call succeeds. It stops short of saying what happens on failure (error vs. empty result), which keeps it from a 5.
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?
Two sentences, no filler. The capability statement comes first and the sequencing advice plus precondition follow, so the agent gets the core fact before the caveats.
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 output schema covers the return value, the single parameter is fully documented, and annotations cover safety, so little is left for the description to carry. The only real omission is the failure behavior when `queryable` is false, which an agent would benefit from knowing.
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 a single parameter at 100% schema coverage, the schema already explains that resource_id is a UUID obtained from houston_get_dataset. The description adds no further meaning about the identifier, so the baseline of 3 applies.
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 names a specific verb (list) and specific outputs (columns, types, total row count) for a named resource, going well beyond the title's 'Describe a Houston table'. An agent can tell this is a schema-introspection tool rather than a data-retrieval or dataset-lookup tool, distinguishing it from houston_query_records and houston_get_dataset.
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 states an explicit ordered usage: call this before houston_query_records so filters, column lists, and sorting use real column names. It also names a precondition for the tool to work at all ('only works when queryable is true'), which functions as a when-not condition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
houston_get_datasetGet a Houston datasetARead-onlyIdempotent
Get a dataset's description, owner, license, and resources.
A dataset can hold several resources (for example one per year). Each
resource reports queryable: when true, use its id with
houston_describe_table and houston_query_records; when false, use its
download_url. last_modified gives the resource's as-of date.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | Dataset `name` or `id` from a search result. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so safety is covered. The description adds genuine semantics beyond them: the dataset-to-resources one-to-many shape, the meaning of `queryable`, and that `last_modified` is the resource's as-of date rather than the dataset's.
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 core action leads, followed by a short paragraph on resource structure and the queryable branch. Every sentence carries operational information and there is no filler or repetition of the schema.
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?
An output schema exists, so return values need not be spelled out, and the description still explains the resource model that the output schema's `queryable` and `download_url` fields depend on. What is missing is minor: no note on what happens with an unknown or ambiguous dataset identifier.
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?
There is a single parameter with 100% schema description coverage, so the schema already explains that `dataset` is a name or id from a search result. The description adds nothing about that parameter (no id-vs-name behavior differences, no format hints), so the baseline of 3 applies.
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?
States a specific verb and resource plus the fields returned (description, owner, license, resources), which is far more than restating the name. It does not explicitly contrast itself with houston_search_datasets, so an agent must infer that search finds the dataset and this one expands it.
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?
Gives concrete downstream routing: if a resource reports `queryable: true`, use its `id` with houston_describe_table and houston_query_records; otherwise use `download_url`. That is real when-to-use guidance tied to named siblings, though it covers post-call branching rather than when to call this tool instead of the search tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
houston_list_groupsList Houston topic groupsARead-onlyIdempotent
List the portal's topic groups and their dataset counts.
Use a group's name as the group filter in
houston_search_datasets.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is fully covered. The description adds only that dataset counts are included, plus the follow-on filter usage; it says nothing about scoping or completeness of the returned list beyond what the output schema supplies.
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?
Two short sentences, purpose first and the actionable cross-reference second, with no redundant restatement of the title or annotations. Every sentence earns its place.
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?
With zero parameters, rich annotations and an output schema, the description carries only what structured fields cannot: what the list contains and how to use the names downstream. The only minor gap is that it does not say whether the result is scoped to a workspace or organization.
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?
The tool takes no parameters, so the parameter baseline of 4 applies. The description correctly implies a no-argument call and instead explains how to consume the returned `name` field, which is the only semantic detail that matters here.
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 gives a specific verb and resource ("List the portal's topic groups") and adds what comes back ("their dataset counts"), which distinguishes it from houston_list_organizations and the dataset-level siblings. An agent knows exactly what this tool produces without opening the schema.
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 gives concrete downstream guidance: use a group's `name` as the `group` filter in houston_search_datasets, which tells the agent where this tool fits in a workflow. It stops short of stating when this tool should be avoided or how it relates to houston_list_organizations, so no explicit exclusion is present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
houston_list_organizationsList Houston organizationsARead-onlyIdempotent
List publishing organizations (departments) and their dataset counts.
Use an organization's name as the organization filter in
houston_search_datasets.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered without the description. The description adds modest value by mentioning that dataset counts are returned alongside each organization, but says nothing about result size, ordering, or pagination behavior.
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?
Two short sentences with no filler: the first states what is returned, the second states how to use the output. It is front-loaded and every clause carries information.
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?
For a zero-parameter read-only list tool with a full output schema and complete annotations, the description supplies purpose and the crucial link to houston_search_datasets. The only meaningful gap is the lack of contrast with houston_list_groups, which matters because both appear in the sibling list.
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?
The tool takes zero parameters, so there is no parameter semantics for the description to explain; the baseline for a no-parameter tool applies. It still conveys the key field an agent will consume (`name`) for use in a sibling tool.
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 a specific verb and resource ("List publishing organizations") and clarifies what an organization is by equating it to departments, plus notes that dataset counts are included. It does not, however, distinguish this tool from the sibling houston_list_groups, which an agent could easily confuse with an organization listing.
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 states the downstream workflow: take an organization's `name` and use it as the `organization` filter in houston_search_datasets, which is genuine when-to-use context. It gives no exclusions, such as when to use houston_list_groups instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
houston_query_recordsQuery Houston recordsARead-onlyIdempotent
Read rows from a queryable resource, with filters and pagination.
Returns at most 100 rows per call. Use total to count matches without
paging through them, for example with a limit of 1. There is no server-side
aggregation, so for sums or averages over many rows, page through
next_offset. Very long text values are truncated.
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Column and direction, such as "YEAR desc". | |
| text | No | Full-text search across all columns in the table. | |
| columns | No | Columns to return. Omit to return all of them. | |
| filters | No | Exact matches by column, such as {"COUNCIL_DISTRICT": "K"}. | |
| pagination | No | ||
| resource_id | Yes | Resource `id` (UUID) from houston_get_dataset. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered, and the description adds genuinely non-obvious traits: a hard 100-row cap per call, the availability of `total` for counting, absence of server-side aggregation, and truncation of long text values. These are exactly the behaviors an agent needs before planning a query. It stops short of 5 because it says nothing about error behavior, rate limits, or the cost of broad scans.
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?
Four short sentences, front-loaded with the core operation and then the operational limits; each sentence carries distinct information (row cap, counting, aggregation workaround, truncation). Minor waste in discussing response fields that the output schema already documents, but nothing is padded.
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?
With an output schema present and 83% schema coverage, the description only needs to supply the operational envelope, which it does: row cap, counting, aggregation strategy, truncation. For a 6-parameter read tool with rich annotations, this is close to complete. The remaining gap is guidance on how resource_id is obtained and what happens on invalid filters or columns.
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 83%, so the schema already explains sort, text, columns, filters, pagination, and resource_id in detail. The description adds no parameter-level semantics of its own and instead references `total` and `next_offset`, which are response fields rather than inputs. Baseline 3 is appropriate when the schema carries the parameter burden.
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?
States a concrete verb and resource ("Read rows from a queryable resource") plus the supported capabilities (filters, pagination). It does not name any sibling, but the siblings are all metadata-oriented (search_datasets, get_dataset, describe_table, list_organizations/groups), so the data-retrieval role is distinguishable. Slightly short of 5 because it never explicitly contrasts with those tools.
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?
Gives useful task-level guidance: use `total` to count matches without paging, and page through `next_offset` for sums/averages since there is no server-side aggregation. However, it gives no guidance on when to choose this over houston_search_datasets or houston_describe_table, nor any prerequisite about first resolving resource_id. Usage is implied rather than explicitly routed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
houston_search_datasetsSearch Houston datasetsARead-onlyIdempotent
Search City of Houston open datasets by keyword, department, or topic.
Start here. Each result's metadata_modified shows when its catalog entry
last changed; update frequency varies by dataset. Results include
harvested GIS datasets. Pass a result's name to houston_get_dataset.
Returns datasets with total, has_more, and next_offset, or an
error with a hint.
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | Group `name` from houston_list_groups. | |
| query | No | Keywords, such as 'council district'. Empty lists everything. | |
| pagination | No | ||
| organization | No | Organization `name` from houston_list_organizations. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, non-destructive, open-world behavior, so the description is not needed for safety. It still adds real value: that `metadata_modified` is the catalog-entry change time (not data freshness), that update frequency varies, and that harvested GIS datasets are included — a caveat an agent could easily get wrong.
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?
Front-loaded with the core purpose, then workflow, then caveats, then return shape — a sensible ordering with no filler. The middle sentence about metadata_modified is slightly dense but carries non-obvious information, so it earns its place.
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?
With an output schema and rich annotations already present, the description covers the remaining agent-relevant ground: entry point, next step, pagination presence, and error hints. The one gap is implicit mapping of 'department'/'topic' to the group/organization parameters.
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 coverage is 75%, so the schema already documents group, query, pagination, and organization adequately. The description's 'keyword, department, or topic' loosely gestures at query/group/organization but never maps those words to the actual parameter names, and pagination is only implied via has_more/next_offset in the return shape.
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?
States a specific verb+resource ('Search City of Houston open datasets') plus the axes searched (keyword, department, topic). It also distinguishes itself from siblings by declaring itself the entry point ('Start here') and naming the follow-up tool houston_get_dataset.
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?
Gives explicit routing guidance: start here, then pass a result's `name` to houston_get_dataset, and 'Empty lists everything' for the no-keyword case. It stops short of stating when to prefer houston_list_groups or houston_list_organizations instead, but the workflow context is clear.
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.
6 tool updates
v0.1.0- First observed
houston_describe_table - First observed
houston_get_dataset - First observed
houston_list_groups - First observed
houston_list_organizations - First observed
houston_query_records - First observed
houston_search_datasets
TDQS
Scored across 6 tools
Each tool targets a distinct step of the same workflow: search → get dataset → describe table → query records, plus two facet-listing tools. The only superficially similar pair (list_organizations vs list_groups) is clearly differentiated by descriptions that explain which filter each name feeds into. No two tools could be reasonably confused.
Every tool follows a uniform `houston_verb_noun` pattern (search_datasets, get_dataset, describe_table, list_organizations, query_records, list_groups) in snake_case throughout. The verb choice also consistently signals the operation type (search/get/describe/list/query).
Six tools is tightly scoped for an open-data catalog: discovery, metadata retrieval, schema inspection, querying, and two facet listings. Every tool has an explicit role in the documented workflow and none appear redundant.
The core lifecycle (find → inspect → describe → query) is fully covered, including pagination and row counts, and non-queryable resources are handled via download_url. Minor gap: no dedicated tool to fetch or preview a resource download, and no aggregation, though both are documented workarounds rather than dead ends.
Maintenance
Related MCP Connectors
Search and query government open-data portals (Socrata SODA API).
Provides access to Civic Plus - See Click Fix, allowing you to interact with your data via an LLM.…
Search 77k public-sector open data APIs across 10 countries. Read-only, no API key.
City of Houston GIS — Houston, Texas open geospatial data (ArcGIS).
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI assistants to search, explore, and query any CKAN open data portal through natural language, making public datasets accessible without requiring knowledge of the portal's API.201,846 npm60MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, explore, and query Calgary's open data portal using SoQL, with tools for dataset discovery, metadata inspection, and data querying.MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying Austin, TX open data from data.austintexas.gov using the Socrata SODA API, allowing AI agents to access municipal datasets through natural language.584 npmMIT
- AlicenseAqualityDmaintenanceProvides AI assistants with plain-English access to official Houston-area public data including weather alerts and school ratings, no API keys required.31Apache 2.0