US Government Public Data MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
US Government Public Data MCP
MCP Server + TypeScript SDK for 40+ U.S. Government APIs
300+ tools covering economic, fiscal, health, education, energy, environment, lobbying, housing, patents, safety, banking, consumer protection, workplace safety, transportation, seismic, clinical trials, pharma payments, research funding, procurement, and legislative data.
20+ APIs require no key · The rest use free keys that take under a minute to get
Getting Started · API Reference · Documentation
Features
300+ tools across 40+ government APIs — economic, health, legislative, financial, environmental, and more
Cross-referencing — built-in instructions guide the LLM to combine data from multiple agencies (e.g., FDA adverse events + lobbying spend + campaign contributions)
Code mode — WASM-sandboxed JavaScript execution reduces context window usage by 98-100% for large responses
Selective loading — load only the modules or domains you need:
--modules fred,treasury,congressor--domains economy,healthDiscovery mode —
--tool-mode discoverylists 4 tools instead of 350; the model searches for the one it needsSources on every result —
meta.sourceslists the upstream API requests behind each answerDual transport — stdio for desktop clients, HTTP Stream for web/remote (bearer-token auth off loopback)
TypeScript SDK — every API is importable as a standalone typed client, no MCP required
Disk-backed caching — responses cached to disk, survives restarts
Rate limiting + retry — token-bucket rate limiter with exponential backoff on 429/503
Related MCP server: mcp-brasil
Quick Start
MCP Server
Requires Node.js 22 or later.
npx us-gov-public-dataAdd to .vscode/mcp.json for VS Code / Copilot:
{
"servers": {
"us-gov-public-data": {
"command": "npx",
"args": ["-y", "us-gov-public-data"],
"env": {
"FRED_API_KEY": "your_key",
"DATA_GOV_API_KEY": "your_key"
}
}
}
}Add to claude_desktop_config.json for Claude Desktop:
{
"mcpServers": {
"us-gov-public-data": {
"command": "npx",
"args": ["-y", "us-gov-public-data"],
"env": {
"FRED_API_KEY": "your_key",
"DATA_GOV_API_KEY": "your_key"
}
}
}
}Example Prompts
Once connected, ask your AI assistant natural language questions:
Economic: "What's the current state of the U.S. economy? Show me GDP, unemployment, inflation, and interest rates."
Health: "Show me the adverse event profile for Ozempic including clinical trials, FDA reports, and pharma payments to doctors."
Legislative: "What happened with the Inflation Reduction Act? Who sponsored it, how did the vote break down by party?"
Follow the money: "Which banking PACs gave money to members of the Senate Banking Committee, and how did those members vote on banking deregulation?"
Cross-reference: "How has federal spending on healthcare changed over the last 5 years, and what health outcomes has it produced?"
TypeScript SDK
npm install us-gov-public-dataimport { getObservations } from "us-gov-public-data/sdk/fred";
import { searchBills } from "us-gov-public-data/sdk/congress";
const gdp = await getObservations("GDP", { sort: "desc", limit: 5 });No MCP server required. All functions include caching, retry, and rate limiting.
Documentation
Full documentation at docs.us-public-data.org
MCP setup, SDK install, client configs | |
Which APIs need keys, where to get them | |
All 40+ APIs grouped by category | |
Auto-generated from TypeScript — every function and type | |
SDK code, MCP prompts, analysis showcases | |
How the system works | |
Add a new API — just create a folder |
Data Sources
Category | APIs |
Economic | Treasury, FRED, BLS, BEA, EIA |
Legislative | Congress.gov, Federal Register, GovInfo, Regulations.gov |
Financial | FEC, Senate Lobbying, SEC, FDIC, CFPB |
Spending & Procurement | USAspending, Open Payments, GSA CALC+ |
Health & Safety | CDC, FDA, CMS, ClinicalTrials.gov, NIH, NHTSA, DOL |
Environment & Weather | EPA, EPA AQS, NOAA, NWS, NREL, USGS |
Justice | FBI Crime Data, DOJ News |
Education & Research | NAEP, College Scorecard, USPTO |
Demographics | Census, HUD, FEMA |
Other | BTS, USDA NASS, USDA FoodData, World Bank |
Disclaimer
This project integrates a significant number of government APIs, many of which have large, complex, or inconsistently documented schemas. AI is used as a tool throughout this project to help parse API documentation, generate type definitions, and scaffold tool implementations — making it possible to cover this much surface area and get people access to government data faster than would otherwise be feasible. While every effort has been made to ensure accuracy, some endpoints may return unexpected results, have incomplete parameter coverage, or behave differently than documented.
This is a community-driven effort — if you find something that's broken or could be improved, please open an issue or submit a PR. Contributions that fix edge cases, improve schema accuracy, or expand coverage are especially welcome. The goal is to make U.S. government data as accessible and reliable as possible, together.
All data is sourced from official U.S. government and international APIs — the server does not generate, modify, or editorialize any data.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
US government data as clean JSON for AI agents: SAM.gov contract opportunities, USAspending awards, Grants.gov grants, House STOCK Act trades, and SEC EDGAR filings (Form 4 insider trades, 8-K events, 13F holdings, 13D/G stakes, XBRL fundamentals, 10-K/10-Q sections). 19 read-only tools. Data is as fresh as each source publishes; congressional trades lag up to 45 days and report dollar ranges (House only). Free tier, no card.
U.S. civic data for AI agents: reps, votes, bills, finance, lobbying, cited gov sources. 47 tools.
Search and call 422 official public-data APIs: elections, courts, permits, SEC filings.
Search US grants + federal contracts (Grants.gov + SAM.gov) from any LLM.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server + TypeScript SDK for 36 U.S. government data APIs — 188 tools. Treasury, FRED, Congress, FDA, CDC, FEC, lobbying, and more. Works with VS Code Copilot, Claude Desktop, Cursor.345631 npm114MIT
- AlicenseNot gradedqualityNot gradedmaintenanceConnects AI agents to 28 Brazilian public APIs, providing over 200 tools to access data on economy, legislation, transparency, and the judiciary. It enables complex queries and cross-referencing of government datasets like IBGE, the Central Bank, and the National Congress through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query normalized US government data from SAM.gov, USAspending, Grants.gov, US House STOCK Act trades, and SEC EDGAR through 19 read-only tools covering contracts, awards, grants, congressional trades, insider filings, holdings, and financial fundamentals.1MIT No Attribution
- AlicenseAqualityBmaintenanceEnables assistants to query official U.S. government economic and statistical data across roughly 77 federal agencies (FRED, BLS, BEA, Census, Treasury, FDA, CDC, EPA and more), fetch datasets into a workspace, and compute exhibits from the full tables. It enforces asking critical questions before fetching and gates releases on audited, reproducible citations.22907 npmMIT