Fred Mcp Server

io.github.stefanoamorelli由 GitHub 账号 stefanoamorelli 发布v1.0.1更新于 Oct 24, 2026

Federal Reserve Economic Data (FRED) MCP Server - Access all 800,000+ economic time series

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

概览

AI 生成的概览

让助手浏览、搜索并获取美联储经济数据(FRED)时间序列,包括 GDP、失业率和通胀等指标。

可以做什么
通过三个工具访问 FRED 的 80 万多条经济时间序列。fred_browse 可浏览分类、发布和来源,或列出某分类或发布下的序列。fred_search 可按关键词、序列 ID 或标签查找序列,并按频率、单位和季节性调整筛选。fred_get_series 按序列 ID 获取观测值,支持日期范围、频率聚合以及百分比变化、自然对数等变换。
适用场景
适合助手需要美国官方宏观经济数据用于研究、报告或分析的场景,例如获取 GDP 或 CPI 历史数据、比较指标,或查找某个主题下有哪些序列。
运行要求
作为本地 Node.js 进程运行(npm 包 fred-mcp-server),也可用 Docker 运行;需要 FRED API 密钥,通过环境变量 FRED_API_KEY 提供。需要访问 FRED API 的网络连接。可通过 TRANSPORT、HOST 和 PORT 启用可选的 HTTP 传输模式。
安装前请注意
需要 FRED_API_KEY 密钥,该密钥通过环境变量传入,Docker 示例中还会出现在命令行上。服务器对 FRED 数据只读,不会修改任何内容。可选的 HTTP 模式默认绑定所有网络接口,若要在本机之外暴露,应限制 HOST。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Federal Reserve Economic Data MCP Server

[npm version] [DOI] [License: AGPL v3] [Tests] [Documentation]

[!IMPORTANT] Disclaimer: This open-source project is not affiliated with, sponsored by, or endorsed by the Federal Reserve or the Federal Reserve Bank of St. Louis. "FRED" is a registered trademark of the Federal Reserve Bank of St. Louis, used here for descriptive purposes only.

A Model Context Protocol (MCP) server providing universal access to all 800,000+ Federal Reserve Economic Data (FRED®) time series through three powerful tools.

https://github.com/user-attachments/assets/66c7f3ad-7b0e-4930-b1c5-a675a7eb1e09

[!TIP] If you use this project in your research or work, please cite it using the CITATION.cff file, or use the following citation:

APA Format:

Amorelli, S. (2025). Federal Reserve Economic Data MCP (Model Context Protocol) Server (Version 1.0.2) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.14536707

BibTeX:

bibtex
@software{amorelli_2025_14536707,  author       = {Amorelli, Stefano},  title        = {{Federal Reserve Economic Data MCP (Model Context                   Protocol) Server}},  month        = jan,  year         = 2025,  publisher    = {Zenodo},  version      = {1.0.2},  doi          = {10.5281/zenodo.14536707},  url          = {https://doi.org/10.5281/zenodo.14536707}}

Installation

Manual Installation

  1. Clone the repository:
    bash
    git clone https://github.com/stefanoamorelli/fred-mcp-server.gitcd fred-mcp-server
  2. Install dependencies:
    bash
    pnpm install
  3. Build the project:
    bash
    pnpm build

Configuration

This server requires a FRED® API key. You can obtain one from the FRED® website.

Install the server, for example, on Claude Desktop, modify the claude_desktop_config.json file and add the following configuration:

json
{  "mcpServers": {    "FRED MCP Server": {      "command": "/usr/bin/node",      "args": [        "<PATH_TO_YOUR_CLONED_REPO>/fred-mcp-server/build/index.js"      ],      "env": {        "FRED_API_KEY": "<YOUR_API_KEY>"      }    }  }}

Using Docker

You can also run the FRED MCP Server using Docker. Add this configuration to your claude_desktop_config.json:

json
{  "mcpServers": {    "fred-mcp": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "-e",        "FRED_API_KEY=<your-key-here>",        "stefanoamorelli/fred-mcp-server:latest"      ],      "env": {}    }  }}

Replace <your-key-here> with your actual FRED API key.

Using Streamable HTTP Transport

For network deployments, you can run the server with Streamable HTTP transport instead of stdio:

bash
# Using CLI flagnode build/index.js --http
# Or using environment variableTRANSPORT=http node build/index.js
# Custom port (default is 3000)PORT=8080 node build/index.js --http

The server will be available at http://localhost:3000/mcp (or your custom port).

Example client request:

bash
# Initialize sessioncurl -X POST http://localhost:3000/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}'
# Use the mcp-session-id from the response header for subsequent requestscurl -X POST http://localhost:3000/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -H "mcp-session-id: <session-id-from-init>" \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

A GET /healthz endpoint reports active sessions, cache statistics, and uptime for load balancers and orchestrators.

Configuration

All settings are environment variables with sensible defaults:

VariableDefaultDescription
FRED_API_KEY(required)Your FRED API key
FRED_API_TIMEOUT_MS30000Per-request timeout against the FRED API
FRED_API_MAX_RETRIES3Retries for 429/5xx/network failures (exponential backoff with jitter, honors Retry-After)
FRED_API_RETRY_BASE_DELAY_MS500Base delay for retry backoff
FRED_RATE_LIMIT_PER_MINUTE120Client-side token bucket matching FRED's per-key quota
FRED_CACHE_TTL_MS60000TTL for cached API responses (0 disables caching)
FRED_CACHE_MAX_ENTRIES500LRU cache capacity
TRANSPORTstdioSet to http for Streamable HTTP transport
HOST(all interfaces)HTTP bind address
PORT3000HTTP port
MCP_MAX_SESSIONS100Maximum concurrent MCP sessions (new sessions get 503 beyond this)
MCP_SESSION_TTL_MS1800000Idle time before a session is reaped
MCP_SESSION_SWEEP_INTERVAL_MS60000How often the idle-session reaper runs
MCP_BODY_LIMIT1mbMaximum accepted JSON body size
LOG_LEVELinfoerror, warn, info, or debug (logs go to stderr)

Identical concurrent requests are coalesced into a single upstream call, and successful responses are cached, so multiple sessions share one rate-limit budget efficiently.

Available Tools

This MCP server provides three comprehensive tools to access all 800,000+ FRED® economic data series:

fred_browse

Description: Browse FRED's complete catalog through categories, releases, or sources.

Parameters:

  • browse_type (required): Type of browsing - "categories", "releases", "sources", "category_series", "release_series"
  • category_id (optional): Category ID for browsing subcategories or series within a category
  • release_id (optional): Release ID for browsing series within a release
  • limit (optional): Maximum number of results (default: 50)
  • offset (optional): Number of results to skip for pagination
  • order_by (optional): Field to order results by
  • sort_order (optional): "asc" or "desc"

fred_search

Description: Search for FRED economic data series by keywords, tags, or filters.

Parameters:

  • search_text (optional): Text to search for in series titles and descriptions
  • search_type (optional): "full_text" or "series_id"
  • tag_names (optional): Comma-separated list of tag names to filter by
  • exclude_tag_names (optional): Comma-separated list of tag names to exclude
  • limit (optional): Maximum number of results (default: 25)
  • offset (optional): Number of results to skip for pagination
  • order_by (optional): Field to order by (e.g., "popularity", "last_updated")
  • sort_order (optional): "asc" or "desc"
  • filter_variable (optional): Filter by "frequency", "units", or "seasonal_adjustment"
  • filter_value (optional): Value to filter the variable by

fred_get_series

Description: Retrieve data for any FRED series by its ID with support for transformations and date ranges.

Parameters:

  • series_id (required): The FRED series ID (e.g., "GDP", "UNRATE", "CPIAUCSL")
  • observation_start (optional): Start date in YYYY-MM-DD format
  • observation_end (optional): End date in YYYY-MM-DD format
  • limit (optional): Maximum number of observations
  • offset (optional): Number of observations to skip
  • sort_order (optional): "asc" or "desc"
  • units (optional): Data transformation:
    • "lin" (levels/no transformation)
    • "chg" (change from previous period)
    • "ch1" (change from year ago)
    • "pch" (percent change)
    • "pc1" (percent change from year ago)
    • "pca" (compounded annual rate of change)
    • "cch" (continuously compounded rate of change)
    • "log" (natural log)
  • frequency (optional): Frequency aggregation ("d", "w", "m", "q", "a")
  • aggregation_method (optional): "avg" (average), "sum", or "eop" (end of period)

Example Usage

With these three tools, you can:

  • Browse all economic categories and discover available data
  • Search for specific indicators by keywords or tags
  • Retrieve any of the 800,000+ series with custom transformations
  • Access real-time economic data including GDP, unemployment, inflation, interest rates, and more

Social Media Shoutouts 📣

[!NOTE] Want to be featured? Tag Stefano Amorelli on LinkedIn or @stefanoamorelli on X in your post about using FRED MCP Server, or submit a PR to add your shoutout!

We're grateful for the community support! Here are some mentions from amazing people:

Scott G - "One of my breakthrough moments for 'getting' what is possible with Claude was this fred-mcp-server project..."
[LinkedIn post by Scott G - Fintech & Data Analytics Professional]
Scott G - Fintech & Data Analytics Professional | LinkedIn Profile
John Shelburne - "The FRED MCP Server is a game-changer for financial analysis..."
[LinkedIn post by John Shelburne]
John Shelburne - Fixed Income Fintech Leader with 20+ Years of Experience | Machine Learning & Cloud Computing Specialist | LinkedIn Profile

Testing

See TESTING.md for more details.

bash
# Run all testspnpm test
# Run specific testspnpm test:registry

License ⚖️

This open-source project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:

  • You can use, modify, and distribute this software
  • If you modify and distribute it, you must release your changes under AGPL-3.0
  • If you run a modified version on a server, you must provide the source code to users
  • See the LICENSE file for full details

For commercial licensing options or other licensing inquiries, please contact [email protected].

© 2025 Stefano Amorelli

来源:README.md,提交 cb1db30

工具

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

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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