/census-mcp-server:census-guidefrom census-mcp-server
Census Bureau data through the census_* tools: choose the dataset and vintage a question needs, find variable codes for lay concepts (rent burden, poverty rate), reach geographies census_resolve_geography cannot name (tribal areas, school districts, congressional districts), and read ACS margins of error before ranking places, comparing a tract with its county, or comparing years. Use before answering from census_query_data or census_compare_geographies numbers.
Ships in census-mcp-server. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The census_* tools read the Census Bureau Data API: the American Community Survey (ACS) 1-year and 5-year families, the Population Estimates Program's 2023 vintage, the 2000, 2010, and 2020 decennial files, the business datasets (County Business Patterns, Economic Census, Nonemployer Statistics), and geoinfo, the land and water area of every geography level. Census microdata (PUMS) and the Island Areas files are not served.
Dataset discovery, variable search and lookup, geography resolution, and geography listing need no key. census_query_data and census_compare_geographies read the data API, which needs a CENSUS_API_KEY configured on the server. So does census_list_predicate_values for a dimension it enumerates against the data endpoint; one answered from the dataset dictionary (NAICS, POPGROUP) needs no key, though without one its codes come back unchecked against the rows the dataset publishes, and the notice says so. A key error is fixed in the server's configuration, not by retrying the call.
| Identifier | Where it comes from |
|---|---|
| Dataset code and vintage | census_list_datasets. Its available years are the only years the other tools accept. |
| Variable code | Search census_search_variables with a table ID (B25070, S1701) to get the whole table in code order, then confirm the exact code with census_get_variable in every vintage the query will use. Search matches whole words, so use the Census wording in the vocabulary table below rather than a lay term. To pull every column of one table in a single call, pass its ID (the table ID search returns) as census_query_data's group instead of listing codes; see "A whole table" below. |
| FIPS for state, county, county subdivision (town, township), place, tract, ZCTA, metro/micro area, combined statistical area, consolidated city, economic place | census_resolve_geography. |
| Code for any other level (American Indian area, congressional district, school district, urban area, and the rest) | No resolver. Enumerate it: see "Levels the resolver cannot name" below. |
Pick the survey before the variable.
Read the margin before claiming a difference.
Change over time.
* where the change is statistically significant at 90 percent and empty where it is not.Boundaries change between vintages.
Before ranking an enumerated level, drop placeholder rows. County subdivision listings include rows named "County subdivisions not defined", with code 00000 and a population of 0. They distort a ranking unless removed, and an ascending sort puts them first.
For "this tract against its county and state", call census_query_data three times with the same dataset, year, and E and M codes: the tract (with its state, county, and tract codes from census_resolve_geography), then the county, then the state. census_compare_geographies ranks within one level only. Apply the difference test to each pair.
In CT, ME, MA, MI, MN, NH, NJ, NY, PA, RI, VT, and WI, put the state after the name ("Cherry Hill, NJ") and census_resolve_geography returns the town or township as a county subdivision: query it at geography_level "county subdivision" with county_subdivision_fips as geography_fips, state_fips as parent_fips, and county_fips. An exact county name still wins ("Plymouth, MA" is Plymouth County); its notice names the town of that name, and geography_type "county subdivision" resolves the town directly. A name shared across counties ("Springfield, PA") comes back ambiguous: re-call with county_fips. In any other state a county subdivision is never picked automatically: it is a statistical division, or a township that cannot act as an incorporated place does, even where it has a government of its own (Ohio, Illinois). Set geography_type "county subdivision" to resolve one.
"*", requesting GEO_ID, and supply the parents the level still requires. With "*" some levels need fewer parents than a single code does: on the 2020 decennial files county subdivision needs only the state, and the national American Indian area/Alaska Native area/Hawaiian home land level needs none.Towns in the states above are county subdivisions ("Brookline town, Norfolk County, Massachusetts"), not places. To rank every town in a state, call census_compare_geographies at county subdivision within the state, after dropping the placeholder rows.
No count dataset publishes area. Read it from geoinfo (2020 onward; AREALAND_SQMI is land area in square miles): query the count and AREALAND_SQMI at the same level and codes, pass the same explicit year to both calls since defaults differ by dataset, and divide. The recipe is in census_list_datasets under geoinfo. Areas sit on 2020 tracts; a tract count from 2019 or earlier is on 2010 tracts, so a GEOID join drops every tract the 2020 Census redrew and pairs the codes it kept with 2020 areas. A water-only tract has 0 land area. Where geoinfo returns several rows for one geography (ZCTAs, urban areas, and districts in 2020), request GEO_ID and pin one with predicates {"GEO_ID": ""}.
When the answer needs every line of one table (sex by age B01001, a full DP05 profile), call census_query_data with group set to the table ID instead of listing codes, which stops at 49 per call. It comes back in one row per geography: any codes you also list first, then the table's columns with each estimate beside its margin; annotation columns are dropped, and comparison-profile SS columns stay. variable_labels names every column. One table per call, and not on the business datasets, pep/charv, dec/ddhca, dec/ddhcb, or acs/acs1/spp: there, list the codes and set predicates. Keep the geography narrow, since a wide table over every county can run past the data request's time limit; if it does, list only the codes you need in variables.
When the answer is a share the Census does not publish, sum the table's lines yourself:
Codes confirmed in the 2024 vintage; confirm each with census_get_variable in any other vintage before querying.
| Question | Census wording and code |
|---|---|
| Rent burden | "Gross rent as a percentage of household income", B25070 (acs/acs5): lines _007E–_010E are 30.0 percent or more, _011E is "Not computed" |
| Median rent burden | B25071_001E (acs/acs5) |
| Owner cost burden | "Selected monthly owner costs as a percentage of household income", B25091 (acs/acs5): with a mortgage _008E–_011E, without _019E–_022E at 30.0 percent or more; _012E and _023E are "Not computed" |
| Poverty rate | S1701_C03_001E (acs/acs5/subject) |
| Median household income | B19013_001E (acs/acs5) |
| Unemployment rate | S2301_C04_001E (acs/acs5/subject) |
| Uninsured rate | S2701_C05_001E, "Percent Uninsured" (acs/acs5/subject) |
| Bachelor's degree or higher, age 25+ | S1501_C02_015E (acs/acs5/subject); full detail in B15003 (acs/acs5) |
| Renter-occupied share | DP04_0047PE (acs/acs5/profile) |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
census-mcp-server@cyanheads is listed by cyanheads/cyanheads — review the source before installing
npx claudepluginhub cyanheads/cyanheads --plugin census-mcp-server