Census API MCP Server

Access U.S. Census Bureau data including demographics, population, and income.

README.md

Census API MCP Server

Access U.S. Census Bureau data including demographics, population, income, housing, and more.

Data Available

  • American Community Survey (ACS) - Detailed demographic and socioeconomic data
    • 1-year estimates (acs/acs1) - Areas with 65,000+ population
    • 5-year estimates (acs/acs5) - All areas, more reliable for small populations
  • Decennial Census (dec/pl) - Official population counts every 10 years
  • Economic Census - Business and industry statistics
  • Population Estimates - Annual population estimates between censuses

Setup

  1. Get a free API key at: https://api.census.gov/data/key_signup.html
  2. Add to your MCP config:
{
  "census": {
    "command": "node",
    "args": ["/path/to/census-api/dist/index.js"],
    "env": {
      "CENSUS_API_KEY": "your-api-key"
    }
  }
}

Tools

`query`

Fetch Census data with full control over variables and geography.

Parameter Required Description
year Yes Data year (e.g., "2022")
dataset Yes Dataset path (e.g., "acs/acs1", "acs/acs5", "dec/pl")
variables Yes Comma-separated variable codes (e.g., "NAME,B19013_001E")
forClause Yes Geography to fetch (e.g., "state:", "county:", "state:06")
inClause No Parent geography for nested queries (e.g., "state:06" when getting counties)

Example: Get median household income for all states

year: "2022"
dataset: "acs/acs5"
variables: "NAME,B19013_001E"
forClause: "state:*"

`list_datasets`

List available Census datasets for a given year.

Parameter Required Description
year Yes Year to list datasets for

`list_variables`

Search for variables in a dataset. Useful for finding the right variable codes.

Parameter Required Description
year Yes Data year
dataset Yes Dataset path
search No Keyword to filter (e.g., "income", "population")
limit No Max results (default 50)

Example: Find income-related variables

year: "2022"
dataset: "acs/acs5"
search: "income"

`list_geographies`

List available geographic levels for a dataset.

Parameter Required Description
year Yes Data year
dataset Yes Dataset path

`get_fips`

Get FIPS codes for states, counties, or other geographies.

Parameter Required Description
year Yes Data year
dataset Yes Dataset path
geography Yes Level (e.g., "state", "county")
inClause No Parent geography filter

Example: Get all county FIPS codes in California

year: "2022"
dataset: "acs/acs5"
geography: "county"
inClause: "state:06"

Common Variables

Variable Description
B01003_001E Total Population
B19013_001E Median Household Income
B25077_001E Median Home Value
B23025_005E Unemployed Population
B15003_022E Bachelor's Degree holders
B25064_001E Median Gross Rent

Rate Limits

  • No strict rate limit with API key
  • Without key: 500 requests/day

Documentation

Tools 5

queryFetch Census data with full control over variables and geography.
list_datasetsList available Census datasets for a given year.
list_variablesSearch for variables in a dataset.
list_geographiesList available geographic levels for a dataset.
get_fipsGet FIPS codes for states, counties, or other geographies.

Environment Variables

CENSUS_API_KEYrequiredAPI key obtained from the U.S. Census Bureau website.

Try it

What is the total population of California based on the 2022 ACS 5-year estimates?
Find the median household income variable code for the 2022 ACS dataset.
List all available geographic levels for the 2022 Decennial Census.
Get the FIPS codes for all counties in California using the 2022 ACS data.

Frequently Asked Questions

What are the key features of Census API MCP Server?

Access to American Community Survey (ACS) 1-year and 5-year estimates. Retrieval of Decennial Census population counts. Search functionality for specific demographic and socioeconomic variables. Geographic FIPS code lookup for states and counties. Support for Economic Census and annual population estimates.

What can I use Census API MCP Server for?

Researchers analyzing socioeconomic trends across different U.S. states. Urban planners gathering housing and population data for specific regions. Data analysts building reports on median income and home values. Students performing demographic research using official government statistics.

How do I install Census API MCP Server?

Install Census API MCP Server by running: node /path/to/census-api/dist/index.js

What MCP clients work with Census API MCP Server?

Census API MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Census API MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare