Census Concept Search MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Census Concept Search MCP
An MCP server that lets an AI assistant explore U.S. Census Bureau surveys and their variables. Built with FastMCP and uv.
Data source: https://api.census.gov/data.json — no API key required.
What it does
The server exposes two tools:
Tool | Purpose |
| Find Census surveys by vintage year range or exact name. Returns each survey's title, year ( |
| Fetch variables for a specific survey. Pass the |
Typical workflow:
Call
identify_surveysto find surveys covering the years or topics of interest.Pick a survey and pass its
c_variablesLinktoidentify_variables.Page through variables using
limit/offsetuntil you find what you need.
Related MCP server: U.S. Census Bureau Data API MCP
Repo structure
census-concept-search-mcp/
├── README.md
├── main.py # Local dev entry point
├── pyproject.toml # Dependencies and package config (uv)
├── requirements.txt # Runtime deps mirror (for buildpack hosts)
├── Dockerfile # Container image (HTTP, port 8080)
├── manifest.yaml # cloud.gov (Cloud Foundry) deploy
├── .env.example # Copy to .env for local development
├── src/
│ └── census_concept_search_mcp/
│ ├── app.py # Creates FastMCP instance, wires everything up
│ ├── config.py # Pydantic settings (transport, host, port)
│ ├── models.py # Shared Pydantic models
│ ├── utils.py # fetch_json(), paginate()
│ ├── routes.py # /health and /version HTTP routes
│ ├── census_api_client_wrapper.py # CensusAPI: fetch, flatten, filter
│ ├── tools/
│ │ ├── __init__.py # register_tools(mcp) aggregator
│ │ └── search_census_api.py # identify_surveys + identify_variables
│ ├── prompts/
│ │ ├── __init__.py
│ │ └── example.py # find_census_variables prompt
│ └── resources/
│ ├── __init__.py
│ └── example.py # census://info/server static resource
├── tests/
│ ├── test_server.py # Smoke + tool discoverability tests
│ ├── test_census_api_client.py # CensusAPI unit tests (CSV fixtures, no network)
│ ├── test_search_census_api.py # Tool helper unit tests (mocked CensusAPI)
│ └── data/ # CSV fixtures used by tests
└── deploy/
├── README.md # Deployment target chooser
├── ibm/
│ └── local-mcp-toolkit/ # watsonx Orchestrate local stdio toolkit
└── databricks/ # Databricks Apps kitGetting started
Prerequisites
uv —
pip install uvorbrew install uv
Install and run
cp .env.example .env
uv sync
uv run python main.pyThe server starts in stdio mode — it speaks JSON-RPC over stdin/stdout and waits for a client to connect. It does not print a listening URL; local MCP servers are launched by the client as a subprocess.
Verify
uv sync --group dev
uv run pytest tests/ -v # 40 tests, all should pass
uv run ruff check . # lintConnect a client
Claude Code
Create or edit .mcp.json in the repo root (or your user MCP settings):
{
"mcpServers": {
"census-concept-search": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/absolute/path/to/census-concept-search-mcp"
}
}
}Claude Desktop
Add the same block to:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop, then ask something like:
"Find Census surveys from 2010 to 2015, then show me variables related to employment in the first one."
HTTP mode (cloud / container)
The server automatically switches to HTTP when a platform injects a port:
# Try it locally:
MCP_TRANSPORT=streamable-http uv run python main.py
# In another terminal:
curl http://localhost:8000/health # {"status":"healthy","service":"census-concept-search-mcp"}Cloud hosts (IBM Code Engine, Databricks Apps, cloud.gov) set DATABRICKS_APP_PORT or PORT automatically — no config change needed.
Pagination
identify_variables returns a standard pagination envelope. When has_more is true, call again with next_offset:
{
"total": 847,
"count": 100,
"offset": 0,
"items": [ ... ],
"has_more": true,
"next_offset": 100
}Deploying
See deploy/README.md for the full chooser. Two options are ready to use:
IBM watsonx Orchestrate (local stdio toolkit)
Ships the server code directly to Orchestrate. No container, no HTTP endpoint — Orchestrate installs deps and runs python server.py over stdio internally.
# 1. Fill in the .env:
cp deploy/ibm/local-mcp-toolkit/.env.example deploy/ibm/local-mcp-toolkit/.env
# Set WXO_INSTANCE_URL and WXO_ENV_NAME.
# 2. Export your API key (never written to disk):
export WXO_API_KEY="<your key>"
# 3. Register:
bash deploy/ibm/local-mcp-toolkit/register-toolkit.shThe script stages a minimal copy of src/census_concept_search_mcp/ alongside server.py and requirements.txt, then calls orchestrate toolkits import. The toolkit is registered as census_concept_search_mcp_local.
Databricks Apps
See deploy/databricks/README.md. The app is gated by workspace authentication.
cloud.gov
The repo root includes a manifest.yaml for Cloud Foundry. Deploy with cf push after cf login / cf target.
Configuration
All settings are read from environment variables or .env. Copy .env.example to get started — the defaults work for local stdio use.
Variable | Default | Description |
|
|
|
|
| Bind address (HTTP mode only) |
|
| Listen port (HTTP mode only) |
The Census API is public and requires no key.
License
MIT. See SECURITY.md for the vulnerability disclosure policy.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query US Census Bureau data: demographics, economics, and housing statistics.
Query U.S. Census Bureau data, variables, and geography via MCP.
Discover statistical indicators and topics in Data Commons. Retrieve observations for specific var…
Census MCP — U.S. Census Bureau housing-relevant APIs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides access to the US Census Bureau API, allowing AI agents to retrieve demographic data and population statistics across thousands of datasets. It enables users to search for datasets, discover variable codes, and query specific geographic data like states and counties.Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to access official Census Bureau statistics through the Census Data API and other official sources, supporting dataset discovery, geography resolution, FIPS lookup, and aggregate data retrieval.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover Census datasets, resolve geographic areas to FIPS codes, and fetch official aggregate statistics from the Census Data API and other Census Bureau sources.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover official datasets, resolve geographic identifiers, and retrieve demographic and statistical data from official U.S. census sources.-