原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚 登录

US Government Data Analyst

作者:zsu版本 0.11.2i★ 0i在你的电脑上运行官方网站 ↗
注册名称io.github.zsu/data-analyst-mcp

安装方法

能做什么

U.S. government economic data (FRED, BLS, BEA, Census, Treasury and more), cited and audited.

作者提供的原文

  • 连接方式 在你的电脑上运行
  • 账号或密钥 无需密钥
  • 分类 法律与政府数据

为什么排在这里

列表按使用分(满分 100)排序,由以下部分组成

热度0/80GitHub 星标或每周下载量:较大的计 60,较小的计 20
新鲜度12/1230 天内有发布或代码更新得满分
仍在响应0/8上次检查时云端端点有响应
使用分12/100

质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)

安装

选择你使用的 AI 应用,然后复制设置。

用一句话让 AI 帮你安装

请帮我安装 US Government Data Analyst。按照 https://mcp.popnx.com/i/zsu-data-analyst-mcp.md 操作,先把命令给我看,等我同意后再运行。

粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文

通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月21日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

让 AI 帮你安装

把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude 安装 MCP server US Government Data Analyst,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "data-analyst": { "command": "npx", "args": [ "-y", "data-analyst-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 US Government Data Analyst 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开电脑版 Claude 应用的设置文件

    SettingsDeveloperEdit Config

  3. 粘贴这些设置并保存文件

    {
      "mcpServers": {
        "data-analyst": {
          "command": "npx",
          "args": [
            "-y",
            "data-analyst-mcp"
          ]
        }
      }
    }
  4. 退出 Claude 再重新打开

  5. 试一试

    用 US Government Data Analyst 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 US Government Data Analyst,或回答中出现 US Government Data Analyst 的工具名称,就表示连接成功

5 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • DATA_GOV_API_KEY 免费的 api.data.gov 密钥(适用于 Congress.gov、FDA、FEC、GovInfo 等 6 项服务);可选
    查看英文原文Free api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEY 用于搜索、vintages 和 GeoFRED 的免费 FRED 密钥;可选
    查看英文原文Free FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEY 免费的 BLS 密钥,用于更高的限额和年平均值;可选
    查看英文原文Free BLS key for higher limits and annual averages; optional
  • BEA_API_KEY 用于仅限 API 的数据集的免费 BEA 密钥;可选
    查看英文原文Free BEA key for the API-only datasets; optional
  • CENSUS_API_KEY 免费的 Census 密钥;没有它时 Census 提供手动下载;可选
    查看英文原文Free Census key; without it Census offers a manual download; optional

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 US Government Data Analyst

US Government Data Analyst 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 US Government Data Analyst 的应用

  • 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要先在电脑上安装 Node.js(只需一次)
  • 需要先在电脑上安装 Node.js(只需一次)
  • 需要先在电脑上安装 Node.js(只需一次)

B · 法律与政府数据 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude Code 安装 MCP server US Government Data Analyst,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user data-analyst -- npx -y data-analyst-mcp 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 US Government Data Analyst 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  3. 粘贴这条命令并按 Enter

    claude mcp add --scope user data-analyst -- npx -y data-analyst-mcp
  4. 在 Claude Code 中输入 /mcp

    应能看到 US Government Data Analyst 在列表中并显示已连接

  5. 试一试

    用 US Government Data Analyst 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 US Government Data Analyst,或回答中出现 US Government Data Analyst 的工具名称,就表示连接成功

5 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • DATA_GOV_API_KEY 免费的 api.data.gov 密钥(适用于 Congress.gov、FDA、FEC、GovInfo 等 6 项服务);可选
    查看英文原文Free api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEY 用于搜索、vintages 和 GeoFRED 的免费 FRED 密钥;可选
    查看英文原文Free FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEY 免费的 BLS 密钥,用于更高的限额和年平均值;可选
    查看英文原文Free BLS key for higher limits and annual averages; optional
  • BEA_API_KEY 用于仅限 API 的数据集的免费 BEA 密钥;可选
    查看英文原文Free BEA key for the API-only datasets; optional
  • CENSUS_API_KEY 免费的 Census 密钥;没有它时 Census 提供手动下载;可选
    查看英文原文Free Census key; without it Census offers a manual download; optional

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Cursor 安装 MCP server US Government Data Analyst,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "data-analyst": { "command": "npx", "args": [ "-y", "data-analyst-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 US Government Data Analyst 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  3. 在 Cursor 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 US Government Data Analyst 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 US Government Data Analyst,或回答中出现 US Government Data Analyst 的工具名称,就表示连接成功

5 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • DATA_GOV_API_KEY 免费的 api.data.gov 密钥(适用于 Congress.gov、FDA、FEC、GovInfo 等 6 项服务);可选
    查看英文原文Free api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEY 用于搜索、vintages 和 GeoFRED 的免费 FRED 密钥;可选
    查看英文原文Free FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEY 免费的 BLS 密钥,用于更高的限额和年平均值;可选
    查看英文原文Free BLS key for higher limits and annual averages; optional
  • BEA_API_KEY 用于仅限 API 的数据集的免费 BEA 密钥;可选
    查看英文原文Free BEA key for the API-only datasets; optional
  • CENSUS_API_KEY 免费的 Census 密钥;没有它时 Census 提供手动下载;可选
    查看英文原文Free Census key; without it Census offers a manual download; optional

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 VS Code 安装 MCP server US Government Data Analyst,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "data-analyst": { "type": "stdio", "command": "npx", "args": [ "-y", "data-analyst-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 US Government Data Analyst 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  3. 在 VS Code 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 US Government Data Analyst 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 US Government Data Analyst,或回答中出现 US Government Data Analyst 的工具名称,就表示连接成功

5 项可选设置(不填也能用)

上面的命令不填这些也能用。想调整时再按开发者的说明添加。

  • DATA_GOV_API_KEY 免费的 api.data.gov 密钥(适用于 Congress.gov、FDA、FEC、GovInfo 等 6 项服务);可选
    查看英文原文Free api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEY 用于搜索、vintages 和 GeoFRED 的免费 FRED 密钥;可选
    查看英文原文Free FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEY 免费的 BLS 密钥,用于更高的限额和年平均值;可选
    查看英文原文Free BLS key for higher limits and annual averages; optional
  • BEA_API_KEY 用于仅限 API 的数据集的免费 BEA 密钥;可选
    查看英文原文Free BEA key for the API-only datasets; optional
  • CENSUS_API_KEY 免费的 Census 密钥;没有它时 Census 提供手动下载;可选
    查看英文原文Free Census key; without it Census offers a manual download; optional

说明为自动翻译,变量名保持原样;不确定时请查看原文。

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 US Government Data Analyst 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add --scope user data-analyst -- npx -y data-analyst-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "data-analyst": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "data-analyst": {
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "data-analyst": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "data-analyst-mcp"
      ]
    }
  }
}

需要你填写的值

  • DATA_GOV_API_KEY 机密 env
    免费的 api.data.gov 密钥(适用于 Congress.gov、FDA、FEC、GovInfo 等 6 项服务);可选
    查看英文原文Free api.data.gov key (Congress.gov, FDA, FEC, GovInfo and 6 more); optional
  • FRED_API_KEY 机密 env
    用于搜索、vintages 和 GeoFRED 的免费 FRED 密钥;可选
    查看英文原文Free FRED key for search, vintages and GeoFRED; optional
  • BLS_API_KEY 机密 env
    免费的 BLS 密钥,用于更高的限额和年平均值;可选
    查看英文原文Free BLS key for higher limits and annual averages; optional
  • BEA_API_KEY 机密 env
    用于仅限 API 的数据集的免费 BEA 密钥;可选
    查看英文原文Free BEA key for the API-only datasets; optional
  • CENSUS_API_KEY 机密 env
    免费的 Census 密钥;没有它时 Census 提供手动下载;可选
    查看英文原文Free Census key; without it Census offers a manual download; optional

说明为自动翻译,变量名保持原样;不确定时请查看原文。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
226/周
连接方式
在你的电脑上运行
最新版本i
0.11.2
发布到注册中心i
2026年11月21日
代码最后更新i
2026年11月21日
作者
zsu
软件包
npm: data-analyst-mcp
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月21日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 zsu 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于今天

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

已公开的漏洞(OSV.dev)

OSV.dev 中没有 data-analyst-mcp@0.11.2 的记录

只检查这个版本的包本身,不包括所有依赖 · 检查于 2026年11月21日

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/zsu-data-analyst-mcp.svg)](https://mcp.popnx.com/en/servers/zsu-data-analyst-mcp)

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“法律与政府数据”中的其他服务器比较i

  • 星标数多于此分类中其他 1993 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 1993 个服务器的 99% 更新
  • 基础检查结果等于或优于此分类中其他 1993 个服务器的 99%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

US Government Data Analyst 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于今天,最新版本(0.11.2)于今天进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Global law

The law of nearly every country on earth, any date: read it, see what changed it, check citations.

作者:lexifina广泛使用★ 215311天前更新

在云端运行✓ lexifina.com

LibreJustice

Search French-language and European case law and French legal texts (codes, statutes, treaties).

作者:librejustice起步阶段★ 382个月前更新

在云端运行✓ 服务方 · librejustice.fr

InfraNode

Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.

作者:street1983nk起步阶段★ 185个月前更新

在云端运行✓ 服务方 · infranode.dev
与相似项目对比
本项
US Government Data Analyst
Global lawOpen Legal Data (Germany)LibreJusticeInfraNodeFedlex Connector
运行位置需要安装在电脑上在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装在云端运行,无需安装
需要密钥否否否否否否
可在 Claude 中按 + 添加否否否否否否
基础检查3/34/44/44/44/44/4
许可证MITNOASSERTIONMITApache-2.0Apache-2.0MIT
价格登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用登记中未列出费用

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

US Economic Analysis MCP Server (data-analyst-mcp)

A Model Context Protocol (MCP) server for U.S. economic analysis and official U.S. government data across 77 federal agencies (FRED, BLS, BEA, Census, Treasury, Congress.gov, FDA, CDC, EPA, and more).

Install

Requires Node.js 22 or later. Most sources need no key, so steps 2 and 3 are optional.

1. Add the server to your client

Claude Code

claude mcp add data-analyst -- npx -y data-analyst-mcp

Add --scope user to make it available in every project. To pass a key here, put -e before the --, for example claude mcp add data-analyst -e DATA_GOV_API_KEY=your-key -- npx -y data-analyst-mcp.

Claude Desktop: claude_desktop_config.json, in ~/Library/Application Support/Claude/ (macOS) or %APPDATA%\Claude\ (Windows). Settings → Developer → Edit Config opens it. Restart Claude Desktop after editing.

{

"mcpServers": { "data-analyst": { "command": "npx", "args": ["-y", "data-analyst-mcp"], "env": { "DATA_GOV_API_KEY": "your-key" } } } }

Cursor: the same mcpServers block in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project).

VS Code: .vscode/mcp.json uses servers instead of mcpServers. An inputs entry makes VS Code ask for the key once and store it, so the key is not written into a file you might commit.

{

"inputs": [ { "type": "promptString", "id": "data-gov-key", "description": "api.data.gov API key", "password": true } ], "servers": { "data-analyst": { "type": "stdio", "command": "npx", "args": ["-y", "data-analyst-mcp"], "env": { "DATA_GOV_API_KEY": "${input:data-gov-key}" } } } }

Codex: ~/.codex/config.toml

[mcp_servers.data-analyst]

command = "npx" args = ["-y", "data-analyst-mcp"]

[mcp_servers.data-analyst.env] DATA_GOV_API_KEY = "your-key"

Leave out the env block if you have no keys, or if you store them with setup (step 2).

To run from a clone instead of npm, build it and point the client at the build:

git clone https://github.com/zsu/data-analyst-mcp.git
cd data-analyst-mcp && npm install && npm run build

Then use "command": "node", "args": [" /data-analyst-mcp/dist/bin/cli.js"] in the configs above, and node dist/bin/cli.js setup in place of npx -y data-analyst-mcp setup below.

2. Add keys (optional)

Each key is free. Without a key, a source either falls back to a keyless route with lower limits, or offers a manual download (manual_bundle): the user downloads the files in a browser, and the server packages them.

VariableSourcesWithout itFree key
AQS_API_KEY + AQS_EMAILepa-aqsmanual download onlyaqs.epa.gov
BEA_API_KEYbeabulk files for the main tables; the API-only datasets need the keyapps.bea.gov
BLS_API_KEYbls25 queries a day, 25 series and 10 years each; no annual averages or catalog titlesdata.bls.gov
CENSUS_API_KEYcensusmanual download onlyapi.census.gov
DATA_GOV_API_KEYcollege-scorecard, congress, fbi, fda, fec, govinfo, nrel, regulations, usda-fooddata, usgsDEMO_KEY or keyless, at a few requests an hour (fda: 1,000 a day; usgs earthquakes never need a key)api.data.gov
DOL_API_KEYdolcatalog and field lists only; data queries need the keydataportal.dol.gov
EIA_API_KEYeiaDEMO_KEY, about 10 requests an houreia.gov
FRED_API_KEYfredobservations only; search, vintages, revision history and GeoFRED need the keyfredaccount.stlouisfed.org
HUD_USER_TOKENhudmanual download onlyhuduser.gov
IPUMS_API_KEYipumsbuild the extract on the IPUMS website (free account)account.ipums.org
LDA_API_KEYsenate-lobbying15 requests a minute instead of 120lda.gov
NOAA_API_KEYnoaathe keyless data and station-search endpoints; Climate Data Online v2 needs the keyncei.noaa.gov
USDA_NASS_API_KEYusda-nassmanual download onlyquickstats.nass.usda.gov
USPTO_API_KEYusptomanual download onlydata.uspto.gov

Two settings are not keys. SEC asks every client to identify itself, so set SEC_USER_AGENT to your name and email ("Jane Doe jane@example.com"). NWS_USER_AGENT is optional and does the same for the weather service.

Store a key with `setup` (recommended). It shows the signup link, reads the key with hidden input, and writes it to ~/.config/data-analyst/keys.json. The key stays out of client config files, and every client reads it. It works mid-session, with no restart.

npx -y data-analyst-mcp setup congress

setup takes any source that uses the key: setup congress stores DATA_GOV_API_KEY, and all 10 api.data.gov sources use it. setup epa-aqs also asks for AQS_EMAIL. Or put the variables in the client's env block, as in step 1. API keys lists every place the server looks.

3. Check it

Ask your assistant: *"Is my api.data.gov key set up?"* The check_key tool reports whether the key was found and where, never its value. For census, eia, epa-aqs, noaa, usgs, bea, fred and ipums it also tests the key with one small call to the agency's own site and says whether it was accepted, rejected or the site could not be reached. To list only the sources you can use, start the server with --hide-unconfigured (see Options).

4. Try it
  • *"How has the unemployment rate compared with CPI inflation since 2020?"*
  • *"What is the median household income in each county of Ohio?"*
  • *"Which drugs had the most reported adverse events last year?"*
  • *"How much did each federal agency spend in fiscal year 2024?"*
  • *"How many unhealthy air-quality days did Phoenix have in 2023?"*

The assistant asks the questions that change the answer first (which measure, which years, which population), then fetches, computes and cites.

To host the server for claude.ai or a team, see docs/hosting.md.

How it works

ToolWhat it does
guidethe method: framing, asking only critical questions, the accuracy checklist, combining sources
find_sourcesranks the sources for a question, or lists them all
source_briefone source's playbook, its questions_to_ask, key status, rules and request index
request_schemafull parameters of the requests to use; searches a source's catalog
record_decisionshow each critical question was settled (answered, Don't know, skipped, not asked and why)
fetchdownloads into the session workspace; returns a summary, the files, the citation and notes
manual_bundle, ingesta one-command download for the user's own computer, then packaging what they downloaded
computebuilds exhibits from the full tables with declarative steps (a whitelisted expression language, no eval); the steps are recorded for rerun
facts, write_table, citeregister the numbers cited, write the benchmark and sensitivity tables, snapshot cited pages
audit_answer, rerunthe release gate: every number in the answer is a registered fact, the method record is complete, and the analysis reproduces
build_report, style_check, audit_reportan HTML report and replication ZIP, only when asked
handoffthe per-source data hand-off
check_keywhether a key is set up (never shows it), and tested live where the source allows
read_filea small text file from the workspace
open_workspaceafter a server restart (which starts a new, empty workspace), lists the earlier workspaces and reopens one (local server only)

Asking before fetching is enforced, not just suggested. fetch returns gate_blocked until, for that source, the model has read source_brief and the schemas of the requests it uses, and has recorded how each critical question was settled. The model asks the questions in chat, in one round. A blocking question that the user skips is asked once more. The server also exposes an analyze prompt and source:// resources, for clients that let users pick prompts or attach resources.

Results have one shape. Success: {status: "ok" | "partial", summary, files, citation, notes}. Failure: {status: "error", code, message, fix, retry_after_s?}. The codes are invalid_request, not_found, not_supported, agency_rejected, agency_unavailable, key_missing, key_rejected, rate_limited, gate_blocked, in_progress and server_error. in_progress comes from a rerun (rerun, or an audit with rerun: true) that needs longer than a client waits for one call: the replay continues in a worker thread, the same call made again waits on that same replay, and the finished result is kept until the workspace changes. DATA_ANALYST_RERUN_WAIT_S sets how long a call waits first (default 45 seconds). The replay gets its own heap, DATA_ANALYST_RERUN_HEAP_MB (default: 60 percent of the memory the process may use, a container's limit when it has one); if it runs out, the audit reports that, and the server keeps running.

Options

Option (flag / environment)What it does
--sources fred,treasury / DATA_ANALYST_SOURCESserve only these sources
--domains economy,health / DATA_ANALYST_DOMAINSserve only the sources in these domains
--hide-unconfigured / DATA_ANALYST_HIDE_UNCONFIGURED=1leave out of listings the sources whose required key is not set up
--workspace / DATA_ANALYST_WORKSPACE(stdio) one fixed analysis folder, so a fetch is reused after a restart
{ "mcpServers": { "data-analyst": { "command": "npx", "args": ["-y", "data-analyst-mcp", "--domains", "economy,health"] } } }

The tool list stays the same size whatever is enabled: sources are found with find_sources, not loaded as tools.

Every result lists its upstream requests (requests: method, credential-free URL, status, cached, time), and citation names the publisher, page and retrieval date. Requests are rate-limited per host (a token bucket), retried with backoff on 429 and 5xx (honoring Retry-After), and kept within each agency's per-minute budgets.

Caching follows each source's terms.

  • A source whose policy allows persistent copies (cache.mode: persistent) can be cached on disk in DATA_ANALYST_CACHE (default ~/.cache/data-analyst). census and bea do; opm's terms allow it, but its port downloads again for now.
  • Most sources allow reuse only inside the analysis folder, and FRED none at all. For those, a fixed --workspace gives reuse across restarts without keeping copies anywhere else.

As a library

import { route, brief, fetchSource, compute, registerFacts } from "data-analyst-mcp";

const r = await fetchSource("cdc", { description: "NY deaths 2017", requests: [{ name: "ny", endpoint: "query", params: { dataset: "leading_death", $where: "state = 'New York' AND year = '2017'" } }] }, { out: "./out/ny" }); console.log(r.summary.tables[0].rows, r.citation.text);

  • The functions: the same sources, engine, analysis and audits as the server. The exports are listSources, route, brief, requestSchema, fetchSource, ingest, manualBundle, compute,

只显示了开头部分;其余内容请在仓库中阅读