U.S. Census Bureau Data APIBLOCK
The U.S. Census Bureau Data API MCP connects AI Assistants with official Census Bureau statistics.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://github.com/uscensusbureau/us-census-bureau-data-api-mcp/blob/main/LICENSE) [](https://github.com/uscensusbureau/us-census-bureau-data-api-mcp/actions/workflows/build.yml) [](https://github.com/uscensusbureau/us-census-bureau-data-api-mcp/actions/workflows/lint.yml) [](https://github.com/uscensusbureau/us-census-bureau-data-api-mcp/actions/workflows/test.yml) [](https://github.com/uscensusbureau/us-census-bureau-data-api-mcp/actions/workflows/test-db.yml)
Bringing official Census Bureau statistics to AI assistants everywhere.
The U.S. Census Bureau Data API MCP is a Model Context Protocol (MCP) server that connects AI assistants with data from the Census Data API and other official Census Bureau sources. This project is built using the MCP Typescript SDK.
Contents
- Getting Started
- Using the MCP Server
- How the MCP Server Works
- Development
- [MCP Server Architecture](#mcp-server-a
b24ba2300a82OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-server-census-api --env CENSUS_API_KEY=${CENSUS_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"mcp-server-census-api": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"CENSUS_API_KEY": "${CENSUS_API_KEY}"
}
}
}
}Exposed tools (11)
11 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
County | read | Counties and county equivalents |
Dataset | read | A great dataset. |
Nation | read | United States total |
Population | read | Population data about the United States. |
State | read | States and State equivalents |
count | read | Number of times to repeat |
geography_name | read | Name of the geographic area (city, state, county, etc.) |
message | read | Message parameter |
mock-prompt | read | Mock prompt for testing |
test-prompt | read | A test prompt for testing purposes |
value | read | A number value |
Trust audit
BLOCKgrade D · trust 60/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (19)
DATABASE_URL: postgresql://mcp_user:mcp_pass@census-mcp-db:5432/mcp_db
DATABASE_URL: postgresql://mcp_user:mcp_pass@census-mcp-db:5432/mcp_db
DATABASE_URL: postgresql://mcp_user_dev:mcp_pass_dev@census-mcp-db-dev:5432/mcp_db_dev
DATABASE_URL: postgresql://mcp_user_test:mcp_pass_test@localhost:5434/mcp_db_test
DATABASE_URL: postgresql://mcp_user_test:mcp_pass_test@localhost:5434/mcp_db_test
.prettierignore
.prettierignore
console.log(args, apiKey)
console.log(args, apiKey)
console.log(args, apiKey)
console.log(args, apiKey)
import { SeedConfig } from '../../schema/seed-config.schema.js'import { transformComponentData } from '../../schema/components.schema.js'import { DivisionRegionMappingsType } from '../../schema/division_region_mappings.schema.js'} from '../../schema/seed-config.schema.js'
import { createGeographyYear } from '../../helpers/geography-years.helper.js'csv-parse, dotenv, node-pg-migrate, pg, title-case, tsx, typescript, zod
@modelcontextprotocol/sdk, dotenv, node-fetch, pg, zod, @eslint/js, @types/node, @types/pg
mcp-db/data/concept.csv
Gates applied: no_behavioural_pass.
b24ba2300a82full audit observations/trust-audit/mcp-server/uscensusbureau__u-s-census-bureau-data-api.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | b24ba2300a82 | BLOCK | D | 60 | first audit |
Questions
What is the U.S. Census Bureau Data API MCP server?
The U.S. Census Bureau Data API MCP connects AI Assistants with official Census Bureau statistics.
What tools does U.S. Census Bureau Data API expose?
11 in total: 11 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is U.S. Census Bureau Data API safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (60/100) and found 3 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does U.S. Census Bureau Data API need?
It reads CENSUS_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does U.S. Census Bureau Data API run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-server-census-api at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (b24ba2300a82), read on 2026-10-07. The repository is watched and re-audited when it changes.