
Fred Mcp Server
io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.1.6更新於 Oct 24, 2026
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP.
概覽
讓助理透過 FRED API 搜尋並取得美國聯準會經濟時間序列,包括中介資料、觀測值、分類與發布資訊。
- 可以做什麼
- 透過 FRED API 提供八個工具:可篩選的序列全文搜尋、最多 50 個 ID 的序列中介資料查詢、支援單位轉換與頻率降取樣的日期區間觀測值取得、分類樹瀏覽,以及依 ID 或名稱查詢發布。多序列或較大的觀測結果可寫入 DataCanvas 資料表,以唯讀 DuckDB SQL 查詢、檢視來源與 TTL 資訊,並可選擇刪除。
- 適用情境
- 適合助理需要總體經濟資料進行分析、報告或研究的場景:利率、物價、就業、貨幣供給、住宅、貿易與國際序列。當工作流程需要可重複查詢聯準會官方資料,而非臨時瀏覽網頁時,值得加入。
- 執行需求
- 透過 npm 套件在本機以 stdio 程序(或本機 Streamable HTTP 伺服器)執行,需要 Bun v1.4.0+ 或 Node.js v24+,也可使用 Docker。必須以 FRED_API_KEY 提供免費的 FRED API 金鑰,金鑰限制為每分鐘 120 次請求。DataCanvas SQL 查詢需要設定 CANVAS_PROVIDER_TYPE=duckdb。需要連線至 FRED API 的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Fred Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@cyanheads/federal-reserve-mcp-server
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP. STDIO or Streamable HTTP.
[Version] [License] [Docker] [MCP SDK] [npm] [TypeScript] [Bun]
[Install in Claude Desktop] [Install in Cursor] [Install in VS Code]
Overview
Economic data from FRED, the St. Louis Fed's database of ~800K time series on output, prices, employment, money, rates, housing, and trade. Search series, pull observations, browse categories and releases, and run SQL over large results.
Tools
Capability reference
fedreserve_search_series tool
- Full-text or series-ID search, with
frequency,units,seasonal_adjustment, andtag_namesfilters;filter_variableandfilter_valuemust be supplied together or the call returnsinvalid_filter - Pagination via
limit(default and max 1000) andoffset(max 4999; FRED caps searchable results at 5000) - Output includes
active_filtersandpopularity(0–100) when available; empty results suggest a broader query or category browsing
fedreserve_get_series tool
- Accepts one series ID or up to 50 per call
- Returns title, units, frequency, seasonal adjustment, observation range, popularity, and notes per series
- Failed IDs in a batch land in a
failedarray with error messages; a single unresolved ID throwsseries_not_found
fedreserve_get_observations tool
- Accepts one series ID or up to 10, with
observation_start/observation_end(YYYY-MM-DD), native unit transforms, and frequency downsampling viaaggregation_method(avg,sum,eop) - Returns date/value observations (values are strings that keep trailing zeros) plus per-series failures
- Multi-series or >500-row results go to a DataCanvas table with a 20-row preview; the
noticenamesdataset.nameand thefedreserve_dataframe_describeandfedreserve_dataframe_querycalls to run next. Without canvas, you get a truncated inline preview
fedreserve_browse_categories tool
- Omit
category_idto start at the root (ID 0); returns the category and its children, or up to 10 sample series for a leaf - An unknown
category_idthrowscategory_not_found
fedreserve_get_release tool
- Takes exactly one of
release_idorrelease_search(case-insensitive name substring) - Returns release name, link, notes, the next five scheduled dates, and a paginated series list (
series_limitmax 1000,series_offset) - An ambiguous name returns up to 10
search_alternatives; retry with the exactrelease_id
fedreserve_dataframe_describe tool
- Lists active DataCanvas dataframes, newest first, or one by
name - Each entry carries
source_tool,query_params,created_at,expires_at,row_count,truncated/max_rows, andcolumn_schema
fedreserve_dataframe_query tool
- Runs one read-only DuckDB SELECT against
df_<id>tables (joins, aggregates, window functions, CTEs); external files, system catalogs, and engine-setting functions are blocked row_limitcaps returned rows (default 1000, max 10000) andpreviewsets the inline sample; BIGINT results serialize as stringsregister_assaves the result as a new dataframe with its own TTL
fedreserve_dataframe_drop tool
- Opt-in: enabled by
FRED_DATAFRAME_DROP_ENABLED=true, otherwise registered as disabled - Drops the named dataframe early; returns
dropped: falsewhen it doesn't exist
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
FRED-specific:
- Requires a
FRED_API_KEYfor the FRED API (up to 120 requests/minute) - Unit transforms and frequency downsampling run on FRED's side against the full series history
- Large observation results spill to DataCanvas tables you can query with SQL
- Dataframe tools require
CANVAS_PROVIDER_TYPE=duckdband reportcanvas_unavailableotherwise
Agent-friendly output:
- Partial failures:
fedreserve_get_seriesandfedreserve_get_observationsreturn per-IDfailedrows instead of failing the whole request - Ambiguous release names return
search_alternativesinstead of a guess - Every dataframe carries
source_tool,query_params, and TTL fields - Without DataCanvas,
fedreserve_get_observationsreturns a truncated inline preview with an explanatorymessage
Getting started
Add the following to your MCP client configuration file. Obtain a free FRED API key at research.stlouisfed.org/docs/api/api_key.html.
Or with npx (no Bun required):
Or with Docker:
For Streamable HTTP, set the transport and start the server:
Prerequisites
- Bun v1.4.0 or higher (or Node.js v24+).
- A free FRED API key from stlouisfed.org. The key grants 120 requests/minute.
Installation
- Clone the repository:
- Navigate into the directory:
- Install dependencies:
- Configure environment:
Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
See .env.example for the full list of optional overrides.
Set CANVAS_PROVIDER_TYPE=duckdb to enable SQL over observation tables. npm installs and Docker images include the DuckDB runtime. Portable Claude Desktop bundles omit native bindings; use the npm or Docker installation for canvas mode.
Running the server
Local development
-
Build and run:
-
Run checks and tests:
Docker
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/federal-reserve-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools in
src/mcp-server/tools/definitions/index.ts - Wrap FRED API calls: validate raw response → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
License
Apache-2.0 — see LICENSE for details.
來源:README.md,提交 ae1a9b0
工具
0版本歷史
1- v0.1.6最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。