Skip to content

Us Gov Open Data MCP

MCP server + TypeScript SDK for 40+ U.S. government data APIs — 250+ tools. Treasury, FRED, Congress, FDA, CDC, FEC, lobbying, and many more. Works with VS Code Copilot, Claude…

Install

One-click install

Runs locally
Claude Code (no install link, copy and run)
$claude mcp add us-gov-open-data-mcp -- npx -y us-gov-open-data-mcp

Buttons open the app on your computer and ask you to confirm before anything is added.

$npx us-gov-open-data-mcp
mcp.json (Cursor, Claude Desktop, Windsurf)
{
  "mcpServers": {
    "us-gov-open-data-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "us-gov-open-data-mcp"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

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 or domains you need: --modules fred,treasury,congress or --domains economy,health
  • Discovery mode — --tool-mode discovery lists 4 tools instead of 350; the model searches for the one it needs
  • Sources on every result — meta.sources lists 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.

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";

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+13 this week

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Explore related