
U.S. Government Open Data
io.github.lzingav2026.10.8Updated Oct 8, 2026
Open data from 40+ U.S. government APIs: economy, spending, Congress, health, energy, disasters
Overview
Lets an assistant query 40+ U.S. government open-data APIs through 300+ tools covering the economy, health, legislation, spending, energy and more.
- What it does
- Exposes 300+ tools over 40+ official U.S. government and international APIs, spanning economic indicators, fiscal and procurement data, Congress and lobbying, health and safety, environment and weather, education, patents and demographics. Built-in guidance encourages cross-referencing several agencies in one answer, and each result lists its upstream API requests. A WASM-sandboxed code mode runs JavaScript to trim large responses, and selective loading or discovery mode can reduce the number of exposed tools.
- When to use it
- Useful when an assistant needs authoritative U.S. public data for research, reporting, policy or analysis questions, especially when combining sources such as economic indicators with legislative or health data. Overkill for one-off lookups that a single API call would cover.
- Requirements
- Runs locally over stdio via npx and needs Node.js 22 or later. Many APIs work without a key; others need free keys supplied as environment variables such as FRED_API_KEY, DATA_GOV_API_KEY, CENSUS_API_KEY, BLS_API_KEY, EIA_API_KEY, NOAA_API_KEY and others. AQS_EMAIL, SEC_CONTACT_EMAIL and NWS_USER_AGENT identify the caller. Network access to the government APIs is required.
Installation
In SourceWeft
- Open U.S. Government Open Data in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
US Government Open Data MCP
MCP Server + TypeScript SDK for 40+ U.S. Government APIs
[npm version] [npm downloads] [License: MIT]
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
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,health - Discovery mode —
--tool-mode discoverylists 4 tools instead of 350; the model searches for the one it needs - Sources on every result —
meta.sourceslists the upstream API requests behind each answer - Dual 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
Quick Start
MCP Server
Requires Node.js 22 or later.
Add to .vscode/mcp.json for VS Code / Copilot:
Add to claude_desktop_config.json for Claude Desktop:
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
No MCP server required. All functions include caching, retry, and rate limiting.
Documentation
Full documentation at lzinga.github.io/us-gov-open-data-mcp
Data Sources
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
Source: README.md at commit 06df35c
Tools
0Version history
1- v2026.10.8LatestOct 8, 2026


