Skip to content
MCP server

US Government Data Analyst

Cited, audited U.S. government data from 77 federal agencies

Runs locally

US Government Data Analyst is an open-source MCP server for legal and government. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, API
Runs
Locally
Version
0.13.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add data-analyst-mcp --env DATA_GOV_API_KEY='<DATA_GOV_API_KEY>' --env FRED_API_KEY='<FRED_API_KEY>' --env BLS_API_KEY='<BLS_API_KEY>' --env BEA_API_KEY='<BEA_API_KEY>' --env CENSUS_API_KEY='<CENSUS_API_KEY>' -- npx -y data-analyst-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "data-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ],
      "env": {
        "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
        "FRED_API_KEY": "<FRED_API_KEY>",
        "BLS_API_KEY": "<BLS_API_KEY>",
        "BEA_API_KEY": "<BEA_API_KEY>",
        "CENSUS_API_KEY": "<CENSUS_API_KEY>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "data-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ],
      "env": {
        "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
        "FRED_API_KEY": "<FRED_API_KEY>",
        "BLS_API_KEY": "<BLS_API_KEY>",
        "BEA_API_KEY": "<BEA_API_KEY>",
        "CENSUS_API_KEY": "<CENSUS_API_KEY>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "data-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ],
      "env": {
        "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
        "FRED_API_KEY": "<FRED_API_KEY>",
        "BLS_API_KEY": "<BLS_API_KEY>",
        "BEA_API_KEY": "<BEA_API_KEY>",
        "CENSUS_API_KEY": "<CENSUS_API_KEY>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "data-analyst-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ],
      "env": {
        "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
        "FRED_API_KEY": "<FRED_API_KEY>",
        "BLS_API_KEY": "<BLS_API_KEY>",
        "BEA_API_KEY": "<BEA_API_KEY>",
        "CENSUS_API_KEY": "<CENSUS_API_KEY>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add data-analyst-mcp --env DATA_GOV_API_KEY='<DATA_GOV_API_KEY>' --env FRED_API_KEY='<FRED_API_KEY>' --env BLS_API_KEY='<BLS_API_KEY>' --env BEA_API_KEY='<BEA_API_KEY>' --env CENSUS_API_KEY='<CENSUS_API_KEY>' -- npx -y data-analyst-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.data-analyst-mcp]
command = "npx"
args = ["-y", "data-analyst-mcp"]
env = { DATA_GOV_API_KEY = "<DATA_GOV_API_KEY>", FRED_API_KEY = "<FRED_API_KEY>", BLS_API_KEY = "<BLS_API_KEY>", BEA_API_KEY = "<BEA_API_KEY>", CENSUS_API_KEY = "<CENSUS_API_KEY>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "data-analyst-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ],
      "env": {
        "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
        "FRED_API_KEY": "<FRED_API_KEY>",
        "BLS_API_KEY": "<BLS_API_KEY>",
        "BEA_API_KEY": "<BEA_API_KEY>",
        "CENSUS_API_KEY": "<CENSUS_API_KEY>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e DATA_GOV_API_KEY='<DATA_GOV_API_KEY>' -e FRED_API_KEY='<FRED_API_KEY>' -e BLS_API_KEY='<BLS_API_KEY>' -e BEA_API_KEY='<BEA_API_KEY>' -e CENSUS_API_KEY='<CENSUS_API_KEY>' data-analyst-mcp npx -- -y data-analyst-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "data-analyst-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ],
          "env": {
            "DATA_GOV_API_KEY": "<DATA_GOV_API_KEY>",
            "FRED_API_KEY": "<FRED_API_KEY>",
            "BLS_API_KEY": "<BLS_API_KEY>",
            "BEA_API_KEY": "<BEA_API_KEY>",
            "CENSUS_API_KEY": "<CENSUS_API_KEY>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • DATA_GOV_API_KEYFree api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEYFree FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEYFree BLS key for higher limits and annual averages; optional
  • BEA_API_KEYFree BEA key for the API-only datasets; optional
  • CENSUS_API_KEYFree Census key; without it Census offers a manual download; optional

About US Government Data Analyst

data-analyst-mcp is an open-source MCP server for official U.S. government data, covering FRED, BLS, BEA, Census, Treasury, CDC, FDA, EPA and dozens more agencies. It runs locally over stdio through npx and needs Node.js 22 or later; most sections need no API key, and free keys raise rate limits for FRED, BLS, BEA, Census and api.data.gov.

Its approach is to ask first and fetch second. The server blocks fetching until the model has read an agency's brief and recorded how each critical question, such as which measure, years and population, was settled. Every result carries a citation with the publisher, page and retrieval date plus the upstream requests.

An audit step checks that each number in an answer is a registered fact and that the analysis reproduces, and a report builder writes an HTML report with a replication ZIP. Keys stay private and are redacted from results. It can also run as a streamable-HTTP server with OAuth for teams.

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 names don't say.

From the server's own tool labels and tool names; not verified by us.

audit_answer
Checks that every number in an answer is a registered fact and that the analysis reproduces.
build_report
Writes an HTML report and a replication ZIP.

What it does

77 federal data sets
Reaches FRED, BLS, BEA, Census, Treasury, CDC, FDA, EPA, NOAA, USGS and many more agencies.
Ask before fetch
Blocks fetching until the source brief is read and the key questions are settled.
Cited numbers
Each result carries the publisher, page, retrieval date and upstream requests.
Answer audit
audit_answer checks every number is a registered fact and the analysis reproduces.
Report builder
build_report writes an HTML report and a replication ZIP.
Local or hosted
Runs over stdio or as a streamable-HTTP server with OAuth.

Good for

  • Compare unemployment and inflation over time
  • Look up median household income by county
  • Find drug adverse-event counts from FDA data
  • See federal agency spending by fiscal year
  • Produce a reproducible, cited economic report

Pricing

Open source

Free and open source (MIT); optional free agency API keys

Prices change. Check zsu.github.io before you buy.

US Government Data Analyst FAQ

Is US Government Data Analyst free and open source?

Yes, it is MIT licensed and published on npm.

Do I need API keys?

Most sources need none; free keys for FRED, BLS, BEA, Census and api.data.gov raise limits or unlock some datasets.

What does US Government Data Analyst require?

Node.js 22 or later.

How are API keys protected?

Results are redacted for every key the server can find, and keys go only to their own agency.

How do I add US Government Data Analyst to Claude Code?

Run this command in your terminal: claude mcp add data-analyst-mcp --env DATA_GOV_API_KEY='<DATA_GOV_API_KEY>' --env FRED_API_KEY='<FRED_API_KEY>' --env BLS_API_KEY='<BLS_API_KEY>' --env BEA_API_KEY='<BEA_API_KEY>' --env CENSUS_API_KEY='<CENSUS_API_KEY>' -- npx -y data-analyst-mcp

What are the best alternatives to US Government Data Analyst?

The closest alternatives to US Government Data Analyst are MCP Sam Gov, U.S. Government Open Data, UK Data: US politics and government, DataScoop public data and US & UK Public Records MCP.

Where this comes from

  • Description: written from the project's README, the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers