US Government Open Data MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add us-government-open-data -- npx -y us-gov-open-data-mcp
README.md

MCP Server + TypeScript SDK for 40+ U.S. Government APIs

US Government Open 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 you need: --modules fred,treasury,congress
  • Dual transport — stdio for desktop clients, HTTP Stream for web/remote
  • 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

npx us-gov-open-data-mcp

Add to .vscode/mcp.json for VS Code / Copilot:

{
  "servers": {
    "us-gov-open-data": {
      "command": "npx",
      "args": ["-y", "us-gov-open-data-mcp"],
      "env": {
        "FRED_API_KEY": "your_key",
        "DATA_GOV_API_KEY": "your_key"
      }
    }
  }
}

Add to claude_desktop_config.json for Claude Desktop:

{
  "mcpServers": {
    "us-gov-open-data": {
      "command": "npx",
      "args": ["-y", "us-gov-open-data-mcp"],
      "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-open-data-mcp
import { getObservations } from "us-gov-open-data-mcp/sdk/fred";
import { searchBills } from "us-gov-open-data-mcp/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 lzinga.github.io/us-gov-open-data-mcp

Getting Started MCP setup, SDK install, client configs
API Keys Which APIs need keys, where to get them
Data Sources All 40+ APIs grouped by category
API Reference Auto-generated from TypeScript — every function and type
Examples SDK code, MCP prompts, analysis showcases
Architecture How the system works
Adding Modules 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 USAspending, Open Payments
**Health &

Tools (2)

getObservationsRetrieve economic data observations from FRED
searchBillsSearch for legislative bills from Congress.gov

Environment Variables

FRED_API_KEYAPI key for Federal Reserve Economic Data
DATA_GOV_API_KEYAPI key for Data.gov services

Configuration

claude_desktop_config.json
{"mcpServers": {"us-gov-open-data": {"command": "npx", "args": ["-y", "us-gov-open-data-mcp"], "env": {"FRED_API_KEY": "your_key", "DATA_GOV_API_KEY": "your_key"}}}}

Try it

What's the current state of the U.S. economy? Show me GDP, unemployment, inflation, and interest rates.
Show me the adverse event profile for Ozempic including clinical trials, FDA reports, and pharma payments to doctors.
What happened with the Inflation Reduction Act? Who sponsored it, how did the vote break down by party?
Which banking PACs gave money to members of the Senate Banking Committee, and how did those members vote on banking deregulation?
How has federal spending on healthcare changed over the last 5 years, and what health outcomes has it produced?

Frequently Asked Questions

What are the key features of US Government Open Data MCP?

Access to 300+ tools across 40+ government APIs. Cross-referencing capabilities for multi-agency data analysis. WASM-sandboxed JavaScript execution for efficient large response handling. Selective module loading to optimize performance. Disk-backed caching and built-in rate limiting with retry logic.

What can I use US Government Open Data MCP for?

Analyzing economic trends by combining GDP, inflation, and interest rate data. Investigating the relationship between pharmaceutical payments and clinical trial outcomes. Tracking legislative history and voting records for specific bills. Auditing federal spending and lobbying contributions for specific committees. Researching public health data and adverse event reports.

How do I install US Government Open Data MCP?

Install US Government Open Data MCP by running: npx us-gov-open-data-mcp

What MCP clients work with US Government Open Data MCP?

US Government Open Data MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep US Government Open Data MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare