Ferric Fred Mcp

io.github.ojhermann-org由 GitHub 账号 ojhermann-org 发布v0.3.11更新于 Oct 24, 2026

MCP server for FRED (Federal Reserve Economic Data): full read API plus GeoFRED, 34 tools.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

通过 34 个只读工具向助手提供 FRED 经济数据,涵盖序列、搜索、发布、标签以及 GeoFRED 区域数据。

可以做什么
这是一个基于 stdio 的本地 MCP 服务器,封装了 FRED 的全部读取端点:序列与观测值(包括通过实时窗口获取的 ALFRED 时点/版本数据)、搜索、分类、发布及其嵌套的发布表、来源和标签。它还通过 get_regional_data、get_series_data、get_series_group 等工具覆盖 GeoFRED/Maps API 的区域数据。每个工具都声明了输入输出模式和行为注解,自动分页可将端点遍历至穷尽,也可惰性流式返回结果。
适用场景
当助手需要查询美国及区域经济指标、历史序列或时点版本数据来回答问题或撰写分析时适用。适合研究、报告和数据探索场景,让助手直接从 FRED 获取数字,而不是依赖记忆。
运行要求
作为本地进程运行,使用 cargo install ferric-fred-mcp 安装(需要 Rust 工具链)。需要免费的 FRED API 密钥,通过环境变量 FRED_API_KEY 提供;缺少该变量服务器无法启动。每次数据调用都需要访问 FRED 的网络连接。
安装前请注意
环境变量 FRED_API_KEY 是密钥,必须提供才能启动服务器;不要将其提交到版本控制或共享配置中。所述工具对 FRED 均为只读,不会代用户写入、发送或删除数据,但查询内容和密钥会发送到圣路易斯联储的服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Ferric Fred Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ferric-fred

[CI] [License: MIT OR Apache-2.0] [ferric-fred MCP server]

A strongly-typed Rust client for FRED — the Federal Reserve Economic Data service from the Federal Reserve Bank of St. Louis — plus a CLI (with TUI charts) and an MCP server built on top of it.

ferric (iron oxide → rust) + FRED. Iron-clad, typed access to economic data.

Workspace

A Cargo workspace of three crates — each with its own README (the crates.io / docs.rs landing page) that carries the full usage detail:

CrateBinaryWhat it isDetails
ferric-fred—Strongly-typed async FRED clientREADME · docs.rs
ferric-fred-clifredCommand-line tool with ratatui TUI chartsREADME
ferric-fred-mcpfred-mcpMCP server exposing FRED to MCP clientsREADME

Published versions (these badges are the source of truth — the crates version independently, so they can drift out of lockstep):

[ferric-fred] [ferric-fred-cli] [ferric-fred-mcp]

Consumers depend on the library by workspace path, so a breaking change in the library cannot compile-pass its consumers without updating them — that compile-time coupling is the primary "stay in sync" guarantee (versions are managed on top; see the ADRs).

What it covers

The library wraps all of FRED's read endpoints — series and observations (including ALFRED point-in-time / vintage data via a real-time window), search, categories, releases (including the nested release-table tree, with optional inline observation values), sources, and tags — plus the GeoFRED / Maps API (regional data and the geographic shape files to map it, ADR-0025) — behind ergonomic builders, with newtype identifiers, typed enums for FRED's closed value sets, a non-panicking error taxonomy, and auto-pagination (Paginate::send_all walks an endpoint to exhaustion, Paginate::stream yields lazily; --all on the CLI). See ADR-0020 and ADR-0021.

GeoFRED support spans the library, CLI (fred geofred), and MCP (get_regional_data, get_series_data, get_series_group) layers. The one exception is the geographic shapes/file endpoint, which is library/CLI-only — a large projected-GeoJSON blob is poor ergonomics for an MCP tool caller (ADR-0025).

Pick an entry point:

  • Library — cargo add ferric-fred; typed async access from your own code. See the crate README and docs.rs.
  • CLI (fred) — cargo install ferric-fred-cli; search, show metadata, print or chart observations in the terminal, browse categories, releases, sources, and tags, and pull GeoFRED regional data and map shapes (fred geofred). See the crate README or fred <command> --help.
  • MCP server (fred-mcp) — cargo install ferric-fred-mcp; 34 tools over stdio covering the same read surface, for MCP-capable clients (ADR-0010). Each tool declares input and output schemas plus behavioural annotations (ADR-0023). See the crate README.

The MCP server is listed and scored on Glama:

[ferric-fred MCP server]

Development

A Nix flake provides a reproducible toolchain (nix develop, or direnv allow once), but the project builds with a plain Rust toolchain too — Nix supplies the environment, not the build (ADR-0008).

Contributor setup, the fmt/clippy/test/prose gate, the tracked git hooks, and the workflow for adding an endpoint live in CONTRIBUTING.md. CI (ci.yml) runs that same offline gate on every push and PR; a dormant live.yml runs the live FRED tests once an Infisical machine identity is configured (ADR-0016).

Benchmarks

Performance tooling from the org Tech Radar pilot (ADR-0026, issue #42):

sh
# Deserialization microbenches (divan) — the observations parse hot path.cargo bench -p ferric-fred --bench deserialization# Same workload under criterion (the divan-vs-criterion baseline).cargo bench -p ferric-fred --bench deserialization_criterion
# Headless `fred chart` render cost (divan + ratatui TestBackend, no tty).cargo bench -p ferric-fred-cli --bench render
# CLI wall-clock timing (hyperfine): startup + a live fetch-and-render.# The fetch benchmark needs FRED_API_KEY; startup runs offline.scripts/bench-cli.sh                    # add --json DIR to export hyperfine JSON

CI keeps the benches compiling on every PR (cargo bench --no-run), and a separate bench.yml uploads results to Bencher (hosted project ferric-fred) to track them over time and flag regressions on PRs. Bencher has no divan adapter, so it ingests the criterion mirror (rust_criterion) and hyperfine startup (shell_hyperfine); divan stays the fast local harness. BENCHER_API_TOKEN comes from Infisical, so the upload is a no-op until the machine identity is configured — see ADR-0026.

Secrets

The client reads a free FRED API key from the FRED_API_KEY environment variable (get one at https://fredaccount.stlouisfed.org/apikeys). Locally, secrets are injected via Infisical + direnv (ADR-0009):

sh
cp .envrc.example .envrc     # local, git-ignored entry pointinfisical login             # user auth (opens a browser)infisical init              # link this dir → projectdirenv allow                # load the shell + inject secrets on cd-in

Store the key with infisical secrets set FRED_API_KEY="…" --env=dev --path=/shared. No Infisical? Just set it directly in your git-ignored .envrc: export FRED_API_KEY="…" — the library only reads the env var and has no dependency on Infisical.

Architecture decisions

Design decisions are recorded as ADRs in docs/adr/. Start with the index.

License

Dual-licensed under MIT OR Apache-2.0, at your option — the Rust ecosystem default (ADR-0006). See LICENSE-MIT and LICENSE-APACHE. Unless you state otherwise, any contribution you submit is licensed under the same dual terms (see CONTRIBUTING.md).

This covers our code; FRED data itself is subject to the St. Louis Fed's terms of use, and you supply your own API key — the project ships no data and no key.

来源:README.md,提交 46887a7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.11最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分