U.S. Census Bureau MCP server for AI agents

Live

API KEY

CENSUS DATA

Analytics

U.S. Census Bureau gives your agent read access to Census data: query American Community Survey, decennial, and time series datasets, and browse datasets, geographies, groups, and variables.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
U.S. Census Bureau
agent · Acme Q3
Run
What is the median household income by county in Texas from the latest ACS 5-year data?
S
censusbureau_data_query
420ms
Census data agent
Pulled median household income for all 254 Texas counties from the ACS 5-year dataset. Loving County is highest and Starr County lowest in the results.
Sources: Census ACS 5-year, 1 query
censusbureau
254 counties
18:29
Message Claude...

Tools your Census data agent reaches for on U.S. Census Bureau, scoped per user.

CALL ANY TOOL
13 tools for Census data in U.S. Census Bureau: query ACS, decennial, and time series datasets, and look up datasets, geographies, groups, and variables.
censusbureau_data_query
Query data
Query statistics from a dataset whose path has two segments, such as acs/acs5, acs/acs1, dec/pl, dec/dhc or pep/population, for a set of variables and geographies. Returns a JSON array of rows: the first row holds the column names (the requested variables, then the geography codes) and each following row one geography's values as strings. Use this for most ACS and decennial queries. Use censusbureau_data_query_table_type for acs/acs5/subject or profile tables, and censusbureau_data_query_single for cbp.
Parameters
Name
Type
Required
Description
dataset
string
Required
Second segment of the dataset path. For acs/acs5 this is acs5; other examples: acs1, acsse, pl, dhc, population. Example: acs5.
get
string
Required
Comma-separated variables to return, at most 50, for example NAME,B01001_001E. Use group(TABLE) to return a whole table, e.g. group(B01001). Find variable names with censusbureau_variables_list or censusbureau_groups_list. Example: NAME,B01001_001E.
program
string
Required
First segment of the dataset path, usually the survey program: acs (American Community Survey), dec (Decennial Census), pep (Population Estimates), abscs, cbp and so on. For acs/acs5 this is acs. Example: acs.
year
string
Required
Vintage (reference year) of the dataset, as four digits. Example: 2022.
descriptive
boolean
Optional
Set to true to add a second header row with each variable's label. Example: true.
for
string
Optional
Geography level and codes to return, as level:code or level:* for all, e.g. state:*, state:06, county:*, place:44000. Leave empty when you use ucgid. Example: state:*.
in
string
Optional
Parent geography that limits the for clause, e.g. state:06 to get counties in California; separate several parents with a space, e.g. state:06 county:037. Example: state:06.
ucgid
string
Optional
Uniform Census Geography Identifier, an alternative to for and in, e.g. 0400000US06 for California or pseudo(0400000US06$0500000) for all its counties. Example: 0400000US06.
censusbureau_data_query_single
Data query single
censusbureau_data_query_table_type
Data query table type
censusbureau_datasets_list
List datasets
censusbureau_geography_list
List geography
censusbureau_group_get
Get group
censusbureau_groups_list
List groups
censusbureau_table_type_group_get
Get table type group
censusbureau_table_type_groups_list
List table type groups
censusbureau_timeseries_datasets_list
List timeseries datasets
censusbureau_timeseries_query
Query timeseries
censusbureau_variable_get
Get variable
censusbureau_variables_list
List variables
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// U.S. Census Bureau tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["censusbureau"], toolNames: [
    "censusbureau_datasets_list",
    "censusbureau_groups_list",
    "censusbureau_data_query"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List the 2022 datasets, find the ACS table for median household income, and query it for every county in Texas" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["censusbureau"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List the 2022 datasets, find the ACS table for median household income, and query it for every county in Texas" }],
  tools,
});

// Execute the tool call with the user's vaulted U.S. Census Bureau API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["censusbureau"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List the 2022 datasets, find the ACS table for median household income, and query it for every county in Texas" }],
  tools,
});

// Tool call runs with the user's vaulted U.S. Census Bureau API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["censusbureau"] }, pageSize: 100,
});

const agent = new Agent({
  name: "census_data_agent",
  model: "gemini-2.5-pro",
  instruction: "U.S. Census Bureau tools scoped to this user",
  tools,
});

await agent.run("List the 2022 datasets, find the ACS table for median household income, and query it for every county in Texas");
Try these prompts
Copy any prompt into your agent. Each maps directly to a U.S. Census Bureau tool. Click to copy, paste into your agent, done.
Query statistics
Copy the prompt
Copied
Get total population by state from the ACS 5-year dataset.
Copy the prompt
Copied
Query county business patterns for a single county.
Copy the prompt
Copied
Pull the ACS subject table for educational attainment in my city.
Find datasets and variables
Copy the prompt
Copied
List every dataset available for the 2022 vintage.
Copy the prompt
Copied
List the tables in the acs/acs5 dataset.
Copy the prompt
Copied
Show the definition of variable B01001_001E.
Geographies and time series
Copy the prompt
Copied
Which geography levels does acs/acs5 support?
Copy the prompt
Copied
List the available time series datasets.
Copy the prompt
Copied
Query small area poverty estimates over time.
SEE HOW AUTH WORKS
Each user connects their own U.S. Census Bureau API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
U.S. Census Bureau
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
U.S. Census Bureau
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
U.S. Census Bureau
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
U.S. Census Bureau
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other analytics and data connectors.
GTM and RevOps Teams
Revenue forecast commentary
Pulls open pipeline from Salesforce and HubSpot, calculates coverage against quota, flags at-risk stages, posts commentary to Slack, and logs every snapshot to Google Sheets.
GTM and RevOps Teams
Competitive intelligence briefing agent
Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
Test other agents
See the same per-user auth pattern across other analytics and data connectors.
GTM
Revenue forecast agent
Score pipeline coverage against quota across Salesforce and HubSpot, post forecast commentary to Slack, log snapshots to Sheets.
GTM
Competitive intelligence briefing agent
Scan Gong calls for competitor mentions, match each one to its Notion battlecard, and DM every affected rep a single Slack digest.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared U.S. Census Bureau API key looks fine in a demo. In production every dataset query looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
U.S. Census Bureau today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access U.S. Census Bureau as the user or through a shared key?
As the user. Each user connects their own U.S. Census Bureau API key once, and Scalekit sends it with every call. Audit logs attribute every query to that user, not a shared service account.
Where is the U.S. Census Bureau API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in U.S. Census Bureau?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the catalog tools such as censusbureau_datasets_list and censusbureau_variables_list without the query tools. All 13 tools are read-only, and Scalekit also enforces scope checks before every API call.
What happens when a user revokes U.S. Census Bureau access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent change any Census data?
No. All 13 tools are read-only. They query datasets and list datasets, geographies, groups, and variables. censusbureau_geography_list shows which geography levels a dataset supports and the parent geographies each requires.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""censusbureau"": {
""url"": ""https://mcp.scalekit.com/censusbureau"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.censusbureau]
url = ""https://mcp.scalekit.com/censusbureau""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""censusbureau"": {
""url"": ""https://mcp.scalekit.com/censusbureau"",
""type"": ""http""
}
}
}