MCP server · npm · MIT
U.S. government economic data MCP server
data-analyst-mcp is an open-source Model Context Protocol (MCP) server that gives Claude, Cursor, VS Code, Codex and any other MCP client access to official U.S. government data from 77 federal sources, including FRED, BLS, BEA, Census, Treasury, CDC, FDA and EPA. It asks the questions that change the answer first, fetches straight from the agency, and cites every number.
Install
Requires Node.js 22 or later. Most sources need no API key.
Claude Code
claude mcp add data-analyst -- npx -y data-analyst-mcp
Claude Desktop, Cursor and other MCP clients
{
"mcpServers": {
"data-analyst": { "command": "npx", "args": ["-y", "data-analyst-mcp"] }
}
}
Free API keys raise rate limits for FRED, BLS, BEA, Census and api.data.gov sources. Store one with
npx -y data-analyst-mcp setup <source>; the key never appears in a tool result.
Questions it answers
- How has the unemployment rate compared with CPI inflation since 2020?
- What is the median household income in each county of Ohio?
- Which drugs had the most reported adverse events last year?
- How much did each federal agency spend in fiscal year 2024?
- How many unhealthy air-quality days did Phoenix have in 2023?
What makes it different
- Asks before it fetches. The server blocks
fetchuntil the model has read the source's brief and recorded how each critical question (which measure, which years, which population) was settled. - Every number is cited. Each result carries a citation with the publisher, page and retrieval date, and the list of upstream requests.
- Audited answers.
audit_answerchecks that every number in the answer is a registered fact and that the analysis reproduces;build_reportwrites an HTML report and a replication ZIP. - Keys stay private. Results are redacted for every key the server can find, and keys go only to their own agency.
- Local or hosted. Runs over stdio, or as a streamable-HTTP server with OAuth for claude.ai and teams.