Skip to content
Back to search

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 Desktop, Cursor.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lzinga--us-gov-open-data-mcp/badge.svg)](/listings/lzinga--us-gov-open-data-mcp)

HTML

<a href="/listings/lzinga--us-gov-open-data-mcp"><img src="/api/listings/lzinga--us-gov-open-data-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 146 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # US Government Open Data MCP
  3. **MCP Server + TypeScript SDK for 40+ U.S. Government APIs**
  4. [![npm version](https://img.shields.io/npm/v/us-gov-open-data-mcp)](https://www.npmjs.com/package/us-gov-open-data-mcp)
  5. [![npm downloads](https://img.shields.io/npm/dm/us-gov-open-data-mcp)](https://www.npmjs.com/package/us-gov-open-data-mcp)
  6. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  7. 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.
  8. **20+ APIs require no key** · The rest use free keys that take under a minute to get
  9. [Getting Started](https://lzinga.github.io/us-gov-open-data-mcp/guide/getting-started) · [API Reference](https://lzinga.github.io/us-gov-open-data-mcp/api/) · [Documentation](https://lzinga.github.io/us-gov-open-data-mcp/)
  10. </div>
  11. ---
  12. ## Features
  13. - **300+ tools** across 40+ government APIs — economic, health, legislative, financial, environmental, and more
  14. - **Cross-referencing** — built-in instructions guide the LLM to combine data from multiple agencies (e.g., FDA adverse events + lobbying spend + campaign contributions)
  15. - **Code mode** — WASM-sandboxed JavaScript execution reduces context window usage by 98-100% for large responses
  16. - **Selective loading** — load only the modules or domains you need: `--modules fred,treasury,congress` or `--domains economy,health`
  17. - **Discovery mode** — `--tool-mode discovery` lists 4 tools instead of 350; the model searches for the one it needs
  18. - **Sources on every result** — `meta.sources` lists the upstream API requests behind each answer
  19. - **Dual transport** — stdio for desktop clients, HTTP Stream for web/remote (bearer-token auth off loopback)
  20. - **TypeScript SDK** — every API is importable as a standalone typed client, no MCP required
  21. - **Disk-backed caching** — responses cached to disk, survives restarts
  22. - **Rate limiting + retry** — token-bucket rate limiter with exponential backoff on 429/503
  23. ## Quick Start
  24. ### MCP Server
  25. Requires Node.js 22 or later.
  26. ```bash
  27. npx us-gov-open-data-mcp
  28. ```
  29. Add to `.vscode/mcp.json` for VS Code / Copilot:
  30. ```json
  31. {
  32. "servers": {
  33. "us-gov-open-data": {
  34. "command": "npx",
  35. "args": ["-y", "us-gov-open-data-mcp"],
  36. "env": {
  37. "FRED_API_KEY": "your_key",
  38. "DATA_GOV_API_KEY": "your_key"
  39. }
  40. }
  41. }
  42. }
  43. ```
  44. Add to `claude_desktop_config.json` for Claude Desktop:
  45. ```json
  46. {
  47. "mcpServers": {
  48. "us-gov-open-data": {
  49. "command": "npx",
  50. "args": ["-y", "us-gov-open-data-mcp"],
  51. "env": {
  52. "FRED_API_KEY": "your_key",
  53. "DATA_GOV_API_KEY": "your_key"
  54. }
  55. }
  56. }
  57. }
  58. ```
  59. ## Example Prompts
  60. Once connected, ask your AI assistant natural language questions:
  61. > **Economic:** "What's the current state of the U.S. economy? Show me GDP, unemployment, inflation, and interest rates."
  62. > **Health:** "Show me the adverse event profile for Ozempic including clinical trials, FDA reports, and pharma payments to doctors."
  63. > **Legislative:** "What happened with the Inflation Reduction Act? Who sponsored it, how did the vote break down by party?"
  64. > **Follow the money:** "Which banking PACs gave money to members of the Senate Banking Committee, and how did those members vote on banking deregulation?"
  65. > **Cross-reference:** "How has federal spending on healthcare changed over the last 5 years, and what health outcomes has it produced?"
  66. ### TypeScript SDK
  67. ```bash
  68. npm install us-gov-open-data-mcp
  69. ```
  70. ```typescript
  71. import { getObservations } from "us-gov-open-data-mcp/sdk/fred";
  72. import { searchBills } from "us-gov-open-data-mcp/sdk/congress";
  73. const gdp = await getObservations("GDP", { sort: "desc", limit: 5 });
  74. ```
  75. No MCP server required. All functions include caching, retry, and rate limiting.
  76. ## Documentation
  77. Full documentation at **[lzinga.github.io/us-gov-open-data-mcp](https://lzinga.github.io/us-gov-open-data-mcp/)**
  78. | | |
  79. |---|---|
  80. | [Getting Started](https://lzinga.github.io/us-gov-open-data-mcp/guide/getting-started) | MCP setup, SDK install, client configs |
  81. | [API Keys](https://lzinga.github.io/us-gov-open-data-mcp/guide/api-keys) | Which APIs need keys, where to get them |
  82. | [Data Sources](https://lzinga.github.io/us-gov-open-data-mcp/guide/data-sources) | All 40+ APIs grouped by category |
  83. | [API Reference](https://lzinga.github.io/us-gov-open-data-mcp/api/) | Auto-generated from TypeScript — every function and type |
  84. | [Examples](https://lzinga.github.io/us-gov-open-data-mcp/guide/sdk-usage) | SDK code, MCP prompts, analysis showcases |
  85. | [Architecture](https://lzinga.github.io/us-gov-open-data-mcp/guide/architecture) | How the system works |
  86. | [Adding Modules](https://lzinga.github.io/us-gov-open-data-mcp/guide/adding-modules) | Add a new API — just create a folder |
  87. ## Data Sources
  88. | Category | APIs |
  89. |----------|------|
  90. | **Economic** | Treasury, FRED, BLS, BEA, EIA |
  91. | **Legislative** | Congress.gov, Federal Register, GovInfo, Regulations.gov |
  92. | **Financial** | FEC, Senate Lobbying, SEC, FDIC, CFPB |
  93. | **Spending & Procurement** | USAspending, Open Payments, GSA CALC+ |
  94. | **Health & Safety** | CDC, FDA, CMS, ClinicalTrials.gov, NIH, NHTSA, DOL |
  95. | **Environment & Weather** | EPA, EPA AQS, NOAA, NWS, NREL, USGS |
  96. | **Justice** | FBI Crime Data, DOJ News |
  97. | **Education & Research** | NAEP, College Scorecard, USPTO |
  98. | **Demographics** | Census, HUD, FEMA |
  99. | **Other** | BTS, USDA NASS, USDA FoodData, World Bank |
  100. ## Disclaimer
  101. 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.
  102. 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.
  103. All data is sourced from official U.S. government and international APIs — the server does not generate, modify, or editorialize any data.
  104. ## License
  105. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.