Skip to main content
Glama
brockwebb

Open Census MCP Server

by brockwebb

Open Census MCP Server

Unofficial Project

Disclaimer

This is an independent, open-source experiment. It is not affiliated with, endorsed by, or sponsored by the U.S. Census Bureau or the Department of Commerce.

Data retrieved through this project remains subject to the terms of the original data providers (e.g., Census API Terms of Service).

Related MCP server: mcp-census

What Is This?

An AI-powered statistical consultant for U.S. Census data. Ask questions in plain English, get accurate demographic data with proper statistical context, methodology guidance, and fitness-for-use caveats.

The insight: Census data has a pragmatics problem, not a search problem. Knowing WHICH data to use and HOW to interpret it matters more than finding it. This system encodes statistical consulting expertise into the AI interaction layer.

Status

🔬 Active Research & Rebuild — v3 architecture in progress. See docs/lessons_learned/ for the v1/v2 journey.

Vision

Census data influences billions in policy decisions, but accessing it effectively requires specialized knowledge. This project aims to make America's most valuable public dataset as easy to use as asking a question — with the statistical rigor of a professional consultant.

The opportunity: Every city council member, journalist, nonprofit director, and curious citizen should be able to fact-check claims and understand their communities with the same ease an eighth-grader uses a search engine. The data is public. The expertise to use it properly shouldn't be gatekept by technical complexity.

Architecture (v3)

Pure Python MCP server with pragmatic rules engine. No R dependency.

  • Pragmatic Rules Layer: Fitness-for-use constraints (MOE thresholds, coverage bias, temporal validity, source selection)

  • Census API Integration: Direct Python calls to Census Bureau APIs

  • Knowledge Base: Methodology documentation for RAG-enhanced guidance

Details: docs/architecture/ (coming soon)

Project Structure

docs/                  # Systems engineering documentation
  requirements/        # ConOps, SRS
  architecture/        # System architecture
  decisions/           # ADRs, trade studies
  design/              # Detailed design
  verification/        # V&V, evaluation results
  lessons_learned/     # Project narrative & lessons
knowledge-base/        # Source docs & pragmatic rules
  source-docs/         # Census methodology PDFs (gitignored)
  rules/               # Extracted pragmatic rules
  methodology/         # Processed methodology content
src/                   # MCP server source code
tests/                 # Evaluation harness & unit tests
scripts/               # Build & utility scripts

Acknowledgments

  • U.S. Census Bureau — for collecting and maintaining vital public data

  • Kyle Walker — Analyzing US Census Data textbook as knowledge base source

  • Anthropic — Model Context Protocol enabling AI tool integration

Contributing

Contributions welcome, especially:

  • Domain expertise from Census data veterans

  • Statistical methodology review

  • Evaluation test cases (real-world query scenarios)

License

MIT License - see LICENSE file for details.

Available Tools

3 tools
explore_variablesA

Discover Census variables by concept or keyword.

Use when the user describes what they want in plain language and you need to identify the correct variable codes.

Returns matching variables with descriptions and table context.

NOTE: Variable search is a known weak spot. This provides basic keyword matching. Results may be incomplete.

ParametersJSON Schema
NameRequiredDescriptionDefault
conceptYesNatural language description e.g. "household income", "poverty rate"
yearNoData year (default 2024)
productNo"acs5" or "acs1" (default "acs5")acs5

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It successfully discloses return values ('Returns matching variables with descriptions and table context') and honestly warns about limitations ('known weak spot', 'basic keyword matching', 'Results may be incomplete'). Minor gap: does not explicitly confirm this is read-only, though implied by 'Discover'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Perfectly structured with four discrete sentences: purpose (1), usage guidelines (2), return value (3), and limitations (4). No redundancy or filler; every sentence earns its place with high information density.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter discovery tool with 100% schema coverage and no output schema, the description adequately covers purpose, usage context, return behavior, and reliability warnings. Sufficient for an agent to invoke correctly, though could mention authentication or rate limiting if applicable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing a baseline of 3. The description mentions 'concept or keyword' which aligns with the concept parameter, but does not add syntax details, validation rules, or semantic nuances beyond what the schema already provides via its examples and default values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb ('Discover') + resource ('Census variables') + mechanism ('by concept or keyword'), clearly distinguishing it from sibling 'get_census_data' (which presumably fetches data by known codes rather than discovering them).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('when the user describes what they want in plain language and you need to identify the correct variable codes'), effectively implying the alternative (use get_census_data when codes are already known). However, it does not explicitly name the sibling alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_census_dataA

Retrieve Census data with statistical methodology guidance.

Returns estimates, margins of error, and pragmatic context about fitness-for-use, reliability, and interpretation caveats.

Use this after grounding with get_methodology_guidance. Always review the pragmatics field before interpreting results.

ParametersJSON Schema
NameRequiredDescriptionDefault
variablesYesCensus variable codes e.g. ["B01003_001E", "B19013_001E"]
stateYesState FIPS code e.g. "42"
countyNoCounty FIPS code (optional)
placeNoPlace FIPS code (optional)
tractNoTract code (optional). REQUIRES county to also be specified. Use '*' to enumerate all tracts in a county.
yearNoData year (default 2024)
productNo"acs5" or "acs1" (default "acs5")acs5

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden and successfully discloses that the tool returns statistical nuance (margins of error, fitness-for-use caveats) rather than raw data. However, it lacks explicit safety hints (though 'Retrieve' implies read-only) or error behavior documentation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences with zero waste: purpose statement, return value specification, prerequisite workflow, and interpretation warning. Information is front-loaded and every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema, the description adequately explains return values (estimates, margins of error, pragmatics field) and contextualizes the statistical nature of Census data. Minor gap in not addressing rate limits or error states, but strong overall for a 7-parameter data retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema fully documents all 7 parameters including FIPS code formats and wildcard usage. The description adds no parameter-specific semantics, which is appropriate given the high schema coverage baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Retrieve' with the resource 'Census data' and clearly distinguishes this from sibling get_methodology_guidance by stating it returns 'statistical methodology guidance,' 'estimates, margins of error, and pragmatic context'—indicating this is the data retrieval step as opposed to the guidance step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow sequencing ('Use this after grounding with get_methodology_guidance') and mandatory post-processing instructions ('Always review the pragmatics field before interpreting results'), clearly establishing when and how to use the tool relative to its sibling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_methodology_guidanceA

Query statistical methodology guidance by topic.

Call this FIRST for every query to ground your orientation.

Topics include:

  • small_area: Population thresholds, estimate availability

  • temporal_comparison: Comparing across years, overlapping periods

  • margin_of_error: Reliability, coefficient of variation, precision

  • dollar_values: Inflation adjustment for income/rent/value comparisons

  • geography: Boundary changes, jurisdiction types, PUMA/tract availability

  • period_estimate: ACS period vs point-in-time interpretation

  • suppression: Data availability and reliability-based suppression

  • comparison: Rules for comparing estimates across products or geographies

  • population_threshold: Minimum population for data product availability

When in doubt, request more topics rather than fewer.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicsYesList of topic tags e.g. ["small_area", "margin_of_error"]
domainNoOptional domain filter: "acs", "census", or "general"

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the topical coverage domain through the 9 enumerated topics, but omits mutation characteristics, caching behavior, or return format details that would be necessary for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Excellent structure with purpose front-loaded, followed by usage priority, scannable bulleted taxonomy of topics, and tactical closing advice. No wasted words; every sentence provides actionable guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter lookup tool without output schema, the description adequately covers scope through the topic taxonomy and workflow positioning. A brief description of return value format would elevate this to a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While schema coverage is 100% (baseline 3), the description significantly enriches the 'topics' parameter by enumerating 9 specific valid values with semantic descriptions (e.g., 'small_area: Population thresholds...'). However, it completely omits discussion of the 'domain' parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb-resource pair ('Query statistical methodology guidance') and explicitly positions the tool as the first step ('Call this FIRST') to distinguish it from sibling data retrieval tools like get_census_data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow guidance ('Call this FIRST for every query to ground your orientation') and parameter strategy ('When in doubt, request more topics rather than fewer'). Lacks explicit 'when not to use' or named sibling alternatives, preventing a 5.

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.

  1. 3 tool updatesv3.0.0
    • First observedexplore_variables
    • First observedget_census_data
    • First observedget_methodology_guidance

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: explore_variables for variable discovery, get_methodology_guidance for statistical methodology orientation, and get_census_data for data retrieval. The descriptions explicitly guide when to use each tool, eliminating any ambiguity.

Naming Consistency5/5

All three tools follow a consistent verb_noun pattern with underscores: explore_variables, get_methodology_guidance, and get_census_data. The naming is uniform and predictable across the set.

Tool Count3/5

With only 3 tools, the set feels thin for a Census data domain that typically involves complex workflows like filtering, aggregation, or visualization. While the tools cover core functions, the low count may limit agent capabilities for comprehensive analysis.

Completeness4/5

The tools cover key aspects: methodology guidance, variable discovery, and data retrieval, forming a logical workflow. However, there are minor gaps such as no tools for data transformation, geographic mapping, or advanced filtering, which agents might need to work around.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables access to U.S. Census Bureau data including demographics, population, income, and housing statistics. Users can query specific variables, search datasets, and retrieve geographic FIPS codes across various surveys like the American Community Survey and Decennial Census.
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying UK Office for National Statistics datasets and their editions through natural language, with no authentication required.
    14
    MIT

Latest Blog Posts

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/brockwebb/open-census-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server