LU 

lzinga/us-gov-open-data-mcp 是从 https://github.com/lzinga/us-gov-open-data-mcp. 导入的 MCP 服务器候选
概览
lzinga/us-gov-open-data-mcp 是从 https://github.com/lzinga/us-gov-open-data-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
MCP Server + TypeScript SDK for 40+ 美国政府 API
300+工具涵盖经济、财政、健康、教育、能源、环境、游说、住房、专利、安全、银行、消费者保护、工作场所安全、交通、地震、临床试验、药品支付、科研资金、采购及立法数据。
20+ API 不需要密钥 ·其余的使用自由密钥,获取时间不到一分钟
入门指南 ·API参考 ·文档
特色
- 300+工具跨40+个政府API——经济、健康、立法、金融、环境等
- 交叉引用 — 内置指令引导LLM整合多个机构的数据(例如,FDA不良事件+游说支出+竞选捐款)
- 代码模式——WASM沙箱JavaScript执行可将上下文窗口使用率降低98%-100%,用于大型响应
- 选择性加载 — 只加载你需要的模块或域:
--modules fred,treasury,congress或--domains economy,health - 发现模式 —
--tool-mode discovery列出了4个工具,而非350个;模型会搜索它需要的工具 - 每个结果都有来源 — 'meta。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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,congressor--domains economy,health - Discovery mode —
--tool-mode discoverylists 4 tools instead of 350; the model searches for the one it needs - Sources on every result —
meta.sourceslists 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:
安装
npx -y us-gov-open-data-mcp配置
{
"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"
}
}
}
}