census-mcp-server
Server Details
Query U.S. Census Bureau data, variables, and geography via MCP.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- Repository
- cyanheads/census-mcp-server
- GitHub Stars
- 3
- Server Listing
- census-mcp-server
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 8 tools
Each tool targets a distinct phase of the Census workflow: discovery (list_datasets, list_geographies, search_variables, list_predicate_values), resolution (resolve_geography), retrieval (query_data), ranking (compare_geographies), and metadata (get_variable). The only real overlap is between get_variable and search_variables, since both can look up a known variable code, but the descriptions draw a clear line (metadata/validation vs. keyword search).
All eight tools use a uniform census_ prefix followed by a verb_noun snake_case pattern (get_variable, list_datasets, query_data, resolve_geography, etc.). The only variation is singular/plural nouns (variable vs. datasets), which is grammatically appropriate rather than inconsistent.
Eight tools is well scoped for a read-only public data API: enough to cover discovery, resolution, retrieval, and ranking without redundancy. Each tool has a clear place in the workflow and none feels padded.
The surface covers the full read lifecycle: discover datasets and geography levels, find variables and predicate values, resolve place names to FIPS, then query and rank. Minor gaps remain—there is no dedicated way to enumerate all tables/variables of a dataset without a keyword or a known table code, and no explicit vintage/table listing tool—but agents can work around these via search_variables and list_datasets.
Available Tools
8 toolscensus_compare_geographiesCompare Census GeographiesARead-onlyInspect
Compare one or more variables across multiple geographies at the same level — all counties in a state, all states nationally, or a named set of specific geographies — ranked on the value of one of them. Covers queries like "compare median income across WA counties" or "which states have the most people below the poverty line." A count ranks geographies by size, not by rate, so to rank a rate, rank a published percentage: S1701_C03_001E (percent below the poverty level, dataset acs/acs5/subject), DP03_0128PE (the same percentage, acs/acs5/profile), or DP04_0047PE (percent of occupied housing units that are renter-occupied, acs/acs5/profile). Profile and subject tables reach tracts but not block groups. Omit within to compare all geographies nationally at the level. Suppressed values are decoded to human-readable labels rather than passed through as raw negative sentinels. On the business datasets (cbp, ecnbasic, nonemp), pep/charv, dec/ddhca, dec/ddhcb, and acs/acs1/spp, use predicates to rank within one industry, size class, or population group — a comparison that omits one ranks on a default the Census API picks, which is an all-categories total on some dimensions and a single category on others. Each row names the defaults that were applied in applied_filters, and census_list_predicate_values enumerates the codes a dimension accepts. Some dec/ddhca and dec/ddhcb tables split the population groups between them, publishing each group at a geography in only one table of the family, so a ranking on one of them leaves out the geographies whose group sits in a sibling table — the notice names those tables. A dataset that publishes several records per geography cannot be ranked until one is pinned: pep/charv publishes an April estimates base and a July estimate, so a comparison that pins neither fails with ambiguous_rows rather than giving every geography two ranks — pass predicates {"MONTH": "7"} for the July estimate.
Inputs: variables (required), geography_level (required), year, limit, +8 more. Returns: rows, year, error, notice, +7 more
census_get_variableGet Census Variable MetadataARead-onlyInspect
Fetch full metadata for one or more Census variable codes — label, concept group, predicate type, the table's universe, and margin-of-error sibling references. Use to confirm a variable code before building a query, or to look up what a known code means. On ACS datasets it returns estimate_code and moe_code sibling references so you can request both without a separate search, and a margin-of-error code carries attribute_of (its estimate) and attribute_type MARGIN_OF_ERROR; the ACS comparison profiles (acs/acs5/cprofile, acs/acs1/cprofile) and the other dataset families publish no margins of error and carry none of these fields. It also resolves the annotation and flag columns the data tools accept, such as B19013_001EA or EMP_F, naming the column each one belongs to, and predicate codes such as NAICS2017 or SEX, confirming a filter dimension exists in a dataset before a query uses it — for the values a dimension accepts rather than the dimension itself, call census_list_predicate_values.
Inputs: variables (required), year, dataset. Returns: year, error, notice, dataset, +1 more
census_list_datasetsList Census DatasetsARead-onlyInspect
Browse available Census Bureau datasets with their supported vintage years. Use as the starting point when the right dataset is unknown — ACS5, ACS1, and their profile, subject, and comparison tables, population estimates, the decennial census files, the business datasets (County Business Patterns, Economic Census, Nonemployer Statistics), and geoinfo (land area and internal points, the denominator for population density) serve different use cases. Pass the dataset_id value to the dataset parameter in other census tools. Each description names the predicates a dataset requires and the geography levels it publishes, both of which vary by dataset.
Inputs: filter. Returns: error, notice, datasets, totalCount, +1 more
census_list_geographiesList Census Geography LevelsARead-onlyInspect
List the geography levels available for a given Census dataset and year, along with the parent geographies each level requires. Use before querying to confirm that the target geography level exists — ACS1 omits many sub-state levels, and not all datasets support tracts or block groups. The geography_level values returned here are the valid inputs to the geography_level parameter in census_query_data and census_compare_geographies.
Inputs: dataset (required), year. Returns: year, error, dataset, totalLevels, +1 more
census_list_predicate_valuesList Census Predicate ValuesARead-onlyInspect
List the codes a Census filter dimension accepts, so a predicates map can be written without guessing. Answers the question left open when census_query_data or census_compare_geographies reports that a dimension was left unset. Which route a dimension takes depends on the vintage: NAICS and POPGROUP always publish a value list in the dataset dictionary, and on the current vintages EMPSZES, LFO, RCPSZES, TAXSTAT, and TYPOP publish none and are enumerated here against the live data endpoint instead, which needs the server's Census API key. A dictionary value list is a classification shared across Census products rather than a list of what one dataset serves, and roughly half of its codes typically return no rows anywhere — those are checked against the dataset's own published rows and dropped, a check that also reads the data endpoint and so needs the key; without a working key the dictionary list comes back unchecked, and the response source field says whether that check ran. The dictionary lists run to thousands of codes and are best narrowed with query. Pass the returned code as the dimension's value in predicates.
Inputs: dataset (required), predicate (required), year, limit, +4 more. Returns: year, error, notice, source, +8 more
census_query_dataQuery Census DataARead-onlyInspect
Query a Census dataset for one or more variables at one geography, a list of geographies at the same level, or every geography at a level. Pass group with a table ID (e.g. "B01001") to retrieve every column of one table in a single call, beside or in place of variables and outside the 49-code limit. Accepts FIPS codes for the target geography — use census_resolve_geography to convert place names to FIPS when needed. On ACS datasets, labeled estimates and margin-of-error values are returned together (the comparison profiles publish no margins), and the negative sentinel values the Census writes for an estimate or margin of error it cannot publish are decoded into the meanings the Census gives them rather than passed through as raw numbers. A value cbp, ecnbasic, or nonemp withheld is stored as 0 beside a flag, and is reported as withheld, with the meaning of its flag, rather than as a zero. Pass geography_fips as "*" for every geography at the level within the parent, or as a comma-separated list of codes ("06,53") for several: rows come back in GEOID order, up to limit per call (default 50, max 500), with totalCount giving how many matched and offset reaching the rest — the order is not a ranking, so use census_compare_geographies to rank. The notice names any listed code that no row came back for. On the business datasets (cbp, ecnbasic, nonemp), pep/charv, dec/ddhca, dec/ddhcb, and acs/acs1/spp, use predicates to filter by industry, size class, or population group — a query that omits one is answered with a default the Census API picks, which is an all-categories total on some dimensions and a single category on others. Each row names the defaults that were applied in applied_filters, and census_list_predicate_values enumerates the codes a dimension accepts. Some dec/ddhca and dec/ddhcb tables split the population groups between them, publishing each group at a geography in only one table of the family, so where a result can be missing a group, a geography, or a value, the notice names the sibling tables to look in. One geography can also come back on more than one row: pep/charv publishes an April estimates base alongside its July estimate, and each row carries a record field saying which it is.
Inputs: geography_fips (required), geography_level (required), year, group, +8 more. Returns: rows, year, error, notice, +6 more
census_resolve_geographyResolve Census GeographyARead-onlyInspect
Resolve a place name, ZIP code, or street address to Census FIPS identifiers. Converts names like "King County, WA", "Seattle, WA", or "Seattle-Tacoma-Bellevue, WA", and ZIPs like "98109", to the codes required by census_query_data and census_compare_geographies. Use before querying when you have a place name rather than raw FIPS codes — state_fips maps to parent_fips and fips_summary maps to geography_fips in downstream tools, and geography_type is itself the geography_level to query at.
Inputs: name (required), county_fips, geography_type. Returns: name, error, notice, place_fips, +8 more
census_search_variablesSearch Census VariablesARead-onlyInspect
Search Census variables by keyword across variable labels and concept groups, or look one up by its code. Returns variable codes with human-readable labels — use this to go from a concept like "median household income" to the variable code B19013_001E needed for data queries. A query that is one variable or table code, such as B19013_001E or B19013, returns that variable or the table's variables, in code order, ahead of any keyword matches; a code the dataset does not publish gets a notice naming the dataset that does, when one is confirmed. To retrieve every column of a table, pass its ID to census_query_data as group rather than listing its codes. On ACS datasets it returns both estimate (E suffix) and margin-of-error (M suffix) codes so you can request both; the ACS comparison profiles (acs/acs5/cprofile, acs/acs1/cprofile) and the other dataset families publish no margins of error. Also use it to find the predicate codes a dataset filters on, such as NAICS2017 in cbp. Adding a word narrows the results, since every word must match. Use offset to continue the same search beyond limit; nextOffset names the next page.
Inputs: query (required), year, limit, offset, +1 more. Returns: cap, year, error, shown, +7 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Query US Census Bureau data: demographics, economics, and housing statistics.
Access U.S. congressional data (bills, votes, members, committees) via MCP.
Query US Treasury national debt, interest rates, exchange rates, and fiscal datasets via MCP.
Census MCP — U.S. Census Bureau housing-relevant APIs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceQuery SEC EDGAR filings, XBRL financials, and company data through MCP.811 npm12Apache 2.0
- AlicenseNot gradedqualityBmaintenanceSearch and query government open-data portals (Socrata SODA API) via MCP.592 npm4Apache 2.0
- FlicenseNot gradedqualityCmaintenanceA production-grade MCP server for querying U.S. Census Bureau data (ACS 5-Year and Decennial) with tools for geographic fuzzy matching, variable search, and batched data retrieval, backed by a PostgreSQL cache for performance.-
- AlicenseNot gradedqualityBmaintenanceAccess FCC broadband availability, coverage analysis, and digital divide data for US geographies and census blocks via MCP.103 npm1Apache 2.0
Glama MCP Gateway
Add one secure layer between your agents and this server.