跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 FRED,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
来自圣路易斯联邦储备银行数据库 FRED 的经济数据:搜索约 80 万条美国及国际时间序列(GDP、通胀、失业率、利率、汇率),读取经过转换的数值,查看统计发布及其日历和数据修订。只读,API 密钥免费。
试试这样问
FRED 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → FRED、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
FRED + Gemini
来自圣路易斯联邦储备银行数据库 FRED 的经济数据:搜索约 80 万条美国及国际时间序列(GDP、通胀、失业率、利率、汇率),读取经过转换的数值,查看统计发布及其日历和数据修订。只读,API 密钥免费。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
FRED_API_KEY
步骤 1 — 获取凭证
设置大约需要 2 分钟,完全免费。你需要一个免费的 FRED 账户。
- 在 https://fredaccount.stlouisfed.org 登录或创建免费账户。
- 打开 API Keys(https://fredaccount.stlouisfed.org/apikeys),申请一个密钥并用一句话说明用途。密钥是 32 个字符的小写字符串,会立即发放。
- 把它粘贴到
FRED_API_KEY。它作为查询参数api_key发送。 - 安装连接器;检查会用
fred_get_category读取根分类。然后试试用UNRATE和limit1 调用fred_get_observations,获取美国最新的失业率。
查找序列:fred_search_series 搜索标题、单位、说明和标签;order_by 设为 popularity 时主要序列排在前面,search_type 设为 series_id 时按 ID 匹配,并支持 DGS* 这样的通配符。常用 ID:GDP、GDPC1(实际 GDP)、UNRATE、PAYEMS(非农就业)、CPIAUCSL、CPILFESL(核心 CPI)、PCEPI、FEDFUNDS、DGS10、T10Y2Y、MORTGAGE30US、SP500、VIXCLS、DCOILWTICO、DEXUSEU(每欧元兑美元)、M2SL。你也可以从根分类 0 开始浏览分类树、列出某个统计发布的序列,或用 fred_list_tag_series 组合 gdp;germany 这样的标签。
读取的数据:序列的数值,最新的在前(默认最近 1000 条,或用 observation_start 和 observation_end 指定时段);序列的元数据(单位、频率、季节调整、说明、最后更新)及其分类、所属统计发布和标签;分类及其序列;统计发布、其序列和发布日期,以及包含未来日期的全部统计发布日历;数据来源及其统计发布;标签;最近更新的序列;以及序列发布或修订的历史版本日期。数据来自 100 多个来源,如 BEA、BLS、美联储理事会、人口普查局、OECD、IMF 和 Eurostat。
数值转换:units 可把水平值转换为变化量、变化百分比、同比变化百分比(pc1)、复合年化率或自然对数。frequency 配合 aggregation_method(平均、求和或期末)可聚合到更低的频率,例如把每日利率转为月均值;不能高于序列本身的频率。
修订:fred_list_vintage_dates 列出序列发布或修订的日期(ALFRED)。调用 fred_get_observations 时把 realtime_start 和 realtime_end 设为同一个版本日期,就能看到当天已知的数据,例如某季度 GDP 的首次估计。
数据格式:数值是以序列单位表示的字符串,因此 AI 在比较两个序列前会先核对单位和季节调整。值为 "." 表示该日期没有观测值,例如节假日。日期格式为 YYYY-MM-DD,表示时段的起始日(2026 年第二季度为 2026-04-01)。月度和季度序列有发布滞后,因此 AI 会给出最新观测值的日期,而不是今天的日期。fred_list_series_updates 的时间窗口是美国中部时间的 YYYYMMDDHhmm。AI 会注明 FRED 以及序列说明中的原始来源;部分序列受原始来源的版权保护,说明中会注明。
只读:所有工具都只读,因此没有需要确认的操作,安装时也没有被关闭的工具。
限制:每个密钥每分钟最多 120 次请求。列表通过 limit 和 offset 分页。
常见错误:FRED 返回 400 并附带说明问题的 error_message:密钥错误或缺失时为 "api_key is not registered",未知 ID 时为 "The series does not exist",或是无效参数,例如频率高于序列本身的频率。429 表示达到速率限制:请等一分钟。
该连接器不包括 GeoFRED 地图和区域边界、FRED v2 批量下载以及序列组。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
FRED的工具。
可用工具
| Tool | What it does |
|---|---|
fred_search_series | Search FRED economic data series by words or by series id: GDP, inflation, unemployment, interest rates, exchange rates, house prices and… |
fred_get_series | Get the metadata of one FRED series: title, frequency, units, seasonal adjustment, first and last observation date, last update, popularity… |
fred_get_observations | Get the data values of a FRED series (date and value), newest first by default |
fred_get_series_categories | List the FRED categories a series belongs to (id, name, parent_id), to find related series with fred_list_category_series |
fred_get_series_release | Get the statistical release a FRED series is published in (id, name, press release flag, link), e.g |
fred_get_series_tags | List the tags of a FRED series (name, group such as geo, freq, src, seas, notes, popularity, series count) |
fred_list_vintage_dates | List the vintage dates of a FRED series: the dates on which its data was published or revised (ALFRED) |
fred_list_series_updates | List FRED series updated recently, latest first: what changed today or within a time window |
fred_get_category | Get one FRED category (id, name, parent_id) |
fred_list_category_children | List the subcategories of a FRED category (id, name, parent_id), to browse the topic tree from the root (0) down to the series |
fred_list_category_series | List the series in a FRED category (id, title, frequency, units, seasonal adjustment, date range, popularity), optionally filtered by… |
fred_list_releases | List the statistical releases in FRED (id, name, press release flag, link), e.g |
fred_list_release_dates | Release calendar across all FRED releases: which release came out, or is scheduled, on which date |
fred_get_release | Get one FRED release (id, name, press release flag, link to the publisher's page) |
fred_get_release_dates | Publication dates of one FRED release, all history by default |
fred_list_release_series | List the series published in one FRED release (id, title, frequency, units, seasonal adjustment, date range, popularity), optionally… |
fred_list_sources | List the data sources in FRED (id, name, link), e.g |
fred_get_source | Get one FRED data source (id, name, link to the agency or publisher), e.g. 22 for the Bureau of Labor Statistics |
fred_list_source_releases | List the releases of one FRED data source (id, name, press release flag, link) |
fred_search_tags | Search or list FRED tags (name, group, notes, popularity, number of series) |
fred_list_tag_series | List the FRED series that have all the given tags, e.g. gdp;germany or cpi;monthly;sa, with id, title, frequency, units, seasonal… |
示例提示
- “FRED 中美国最新的失业率是多少,对应哪个月份?”
- “给我看最近 24 个月美国 CPI 通胀的同比数据。”
- “以月均值比较过去一年美国 10 年期和 2 年期国债收益率。”
- “下一次就业形势报告(Employment Situation)计划在什么时候发布?”
- “2026 年第一季度美国实际 GDP 首次公布的数值是多少,之后又是如何修订的?”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?