Hosted MCP server · #46 most used on Smithery

census-mcp-server

cyanheads/census-mcp-server

Query U.S. Census Bureau data, variables, and geography via MCP.

Uses
9.0k
Tools
7
Runs
Hosted
Listed
4mo ago

Get started

Add it to your agent

npx -y @smithery/cli@latest install cyanheads/census-mcp-server --client claude

Swap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.

What it can do

7 tools

census_list_datasets1 paramBrowse available Census Bureau datasets with their supported vintage years. Use as the starting point when the right dataset is unknown —…

Browse available Census Bureau datasets with their supported vintage years. Use as the starting point when the right dataset is unknown — ACS5, ACS1, population estimates, and decennial census serve different use cases. Pass the dataset_id value to the dataset parameter in other census tools.

ParameterTypeDescription
filterstringKeyword to filter datasets by name or description. Omit to list all datasets.
census_list_geographies2 paramsList the geography levels available for a given Census dataset and year, along with the parent geographies each level requires. Use befor…

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.

ParameterTypeDescription
yearnumberVintage year. Defaults to the latest available year for the dataset.
datasetstringDataset code (e.g., "acs/acs5", "acs/acs1"). Use census_list_datasets to discover valid values.
census_search_variables4 paramsSearch Census variables by keyword across variable labels and concept groups. Returns variable codes with human-readable labels — use thi…

Search Census variables by keyword across variable labels and concept groups. 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. Returns both estimate (E suffix) and margin-of-error (M suffix) codes so you can request both. When total_matches exceeds the limit, narrow the query to see more specific results.

ParameterTypeDescription
yearnumberVintage year to search (default: latest available for the dataset).
limitnumberMaximum results to return (default: 20, max: 100). Increase if total_matches greatly exceeds the limit.
querystringKeyword to search (e.g., "median household income", "poverty", "bachelor's degree"). Multi-word queries search for all terms.
datasetstringDataset to search within (default: "acs/acs5"). Use census_list_datasets to discover options.
census_get_variable3 paramsFetch full metadata for one or more Census variable codes — label, concept group, predicate type, universe, and margin-of-error sibling r…

Fetch full metadata for one or more Census variable codes — label, concept group, predicate type, 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. Returns estimate_code and moe_code sibling references where applicable so you can request both without a separate search.

ParameterTypeDescription
yearnumberVintage year (default: latest available for the dataset).
datasetstringDataset the variables belong to (default: "acs/acs5"). Use census_list_datasets to discover valid values.
variablesarrayOne or more variable codes to look up (e.g., ["B19013_001E", "B19013_001M"]). Variable codes are case-sensitive.
census_resolve_geography2 paramsResolve a place name or street address to Census FIPS identifiers (state, county, tract codes). Converts names like "King County, WA" or …

Resolve a place name or street address to Census FIPS identifiers (state, county, tract codes). Converts names like "King County, WA" or "Seattle, WA" to the FIPS 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.

ParameterTypeDescription
namestringPlace name (e.g., "King County, WA", "Seattle, WA", "California") or street address (e.g., "1600 Pennsylvania Ave NW, Washington, DC 20500"). Include the state abbreviation to disambiguate places with
geography_typestringExpected geography type to resolve to. Optional — auto-detected from the name when omitted (county if "County"/"Borough"/"Parish" appears, state for two-letter abbreviations).
census_query_data7 paramsQuery a Census dataset for one or more variables at a specific geography. Accepts FIPS codes for the target geography — use census_resolv…

Query a Census dataset for one or more variables at a specific geography. Accepts FIPS codes for the target geography — use census_resolve_geography to convert place names to FIPS when needed. Labeled estimates and margin-of-error values are returned together. Suppression codes (geography too small, data not collected) are decoded into human-readable reasons rather than passed through as raw negative numbers. Pass geography_fips as "*" to return all geographies at the level within the parent.

ParameterTypeDescription
yearnumberVintage year (default: latest available for the dataset).
datasetstringDataset to query (default: "acs/acs5"). Use census_list_datasets to discover valid values.
variablesarrayVariable codes to retrieve (e.g., ["B19013_001E", "B19013_001M"]). Max 50 per request. Use census_search_variables to find codes. Include the MOE counterpart (swap E → M suffix) to get margin-of-error
county_fipsstringCounty FIPS code (3 digits) when querying tracts or block groups within a specific county (e.g., "033" for King County within WA). Required for tract and block-group queries scoped to a county — use a
parent_fipsstringState FIPS code when querying sub-state levels (e.g., "53" for Washington). Required for county, tract, and block-group queries. census_resolve_geography returns this as state_fips.
geography_fipsstringFIPS code for the target geography (e.g., "033" for a county, "*" for all geographies at the level within the parent). Use census_resolve_geography to obtain this value — it is returned as fips_summar
geography_levelstringLevel of the target geography (e.g., "county", "tract", "state", "zip code tabulation area"). Use census_list_geographies to see valid values for the dataset.
census_compare_geographies10 paramsCompare one or more variables across multiple geographies at the same level — all counties in a state, all states nationally, or a named …

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. Results are sorted and ranked. Covers queries like "rank states by poverty rate", "compare median income across WA counties", or "which census tracts in King County have the highest renter rate." Omit within to compare all geographies nationally at the level. Suppressed values are decoded to human-readable labels rather than passed

ParameterTypeDescription
yearnumberVintage year (default: latest available for the dataset).
limitnumberMaximum geographies to return (default: 50, max: 500). When results are truncated, total_count indicates how many matched.
withinstringState FIPS to constrain results (e.g., "53" to compare counties or tracts within WA only). Omit to compare all geographies at the level nationally. Use census_resolve_geography to get state_fips.
datasetstringDataset to query (default: "acs/acs5"). Use census_list_datasets for valid values.
sort_bystringVariable code to sort by (default: first variable in the list). Must be one of the requested variable codes.
sort_dirstringSort direction (default: "desc" — highest value first).
variablesarrayVariable codes to compare (e.g., ["B17001_002E", "B17001_001E"]). Include MOE counterparts (M suffix) for reliability context.
geographiesarrayOptional list of specific geography FIPS codes to include. When provided, only these geographies are returned. Omit to return all geographies within the level. Use census_resolve_geography for each pl
within_countystringCounty FIPS (3 digits) to constrain tract or block-group comparisons to a single county within the state specified by within (e.g., "033" for King County). Required when geography_level is "tract" or
geography_levelstringThe level to compare across (e.g., "state", "county", "tract"). Use census_list_geographies to see valid values for the dataset.