Skip to main content
MCP server CX Codex

U.S. Government Open Data — Claude Code MCP server: features and setup

Connect an AI agent to U.S. government APIs covering topics from the economy to health and legislation. Useful when a question calls for combining records from multiple agencies.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env DATA_GOV_API_KEY=<DATA_GOV_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --transport stdio us-government-open-data -- npx -y us-gov-open-data-mcp
Open on GitHub

What U.S. Government Open Data does

The server gives an agent tools for querying more than 40 U.S. government APIs. It covers economic indicators, public spending, legislation, health, the environment, and other areas. Built-in guidance helps the model relate information from different agencies, and results include details of the API requests behind them.

Connections can use stdio or HTTP Stream, and large responses can be handled with JavaScript in a WASM sandbox. Load only the modules or domains you need. Node.js 22 or later is required. Claude Code setup passes DATA_GOV_API_KEY, FRED_API_KEY, CENSUS_API_KEY, BLS_API_KEY, and BEA_API_KEY; some APIs can be queried without a key. Individual endpoints can return unexpected results, so check the cited sources when the details matter.

What it helps with

  • compare economic indicators from separate government APIs
  • look up a bill and examine its vote by party
  • review FDA reports alongside clinical-trial records
  • trace federal spending in a chosen area
  • find lobbying and campaign contribution records

Example prompts for the agent

  • Compare U.S. GDP, unemployment, inflation, and interest rates using government data.
  • Find information on the Inflation Reduction Act and explain how the vote split by party.
  • Compare federal healthcare spending with health outcome data.

How to install U.S. Government Open Data

Platform CLI

claude mcp add --env DATA_GOV_API_KEY=<DATA_GOV_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --transport stdio us-government-open-data -- npx -y us-gov-open-data-mcp

Replace <…> with your own values. 16 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about U.S. Government Open Data

How do I install U.S. Government Open Data in Claude Code?

Run `claude mcp add --env DATA_GOV_API_KEY=<DATA_GOV_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --transport stdio us-government-open-data -- npx -y us-gov-open-data-mcp`. Node.js 22 or later is required.

What does U.S. Government Open Data do?

It connects an agent to more than 40 U.S. government APIs for searching and combining information across agencies. Results include details about the source requests.

Does the server require API keys?

The Claude Code setup accepts DATA_GOV_API_KEY, FRED_API_KEY, CENSUS_API_KEY, BLS_API_KEY, and BEA_API_KEY. Some APIs work without a key.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor