io.github.stefanoamorelli/fred-mcp-server

平台与服务

by stefanoamorelli

Federal Reserve Economic Data(FRED)MCP 服务器,可访问 80 多万条经济时间序列数据

什么是 io.github.stefanoamorelli/fred-mcp-server

Federal Reserve Economic Data(FRED)MCP 服务器,可访问 80 多万条经济时间序列数据

README

Federal Reserve Economic Data MCP Server

smithery badge 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:

code
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

Installing via Smithery

To install Federal Reserve Economic Data Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @stefanoamorelli/fred-mcp-server --client claude

Manual Installation

  1. Clone the repository:
    bash
    git clone https://github.com/stefanoamorelli/fred-mcp-server.git
    cd 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 flag
node build/index.js --http

# Or using environment variable
TRANSPORT=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 session
curl -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 requests
curl -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"}'

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:

<details open> <summary><b>Scott G</b> - "One of my breakthrough moments for 'getting' what is possible with Claude was this fred-mcp-server project..."</summary> <br> <a href="https://www.linkedin.com/posts/sgoley_as-many-of-us-continue-to-use-llms-more-and-activity-7372401049669885952-ha6M"> <img src="assets/social/linkedin-sgoley.jpg" alt="LinkedIn post by Scott G - Fintech & Data Analytics Professional" width="600"> </a> <br> <i>Scott G - Fintech & Data Analytics Professional</i> | <a href="https://www.linkedin.com/in/sgoley/">LinkedIn Profile</a> </details> <details open> <summary><b>John Shelburne</b> - "The FRED MCP Server is a game-changer for financial analysis..."</summary> <br> <a href="https://www.linkedin.com/posts/shelburne_ai-finance-innovation-activity-7341141860880478210-JQe4"> <img src="assets/social/linkedin-john-shelburne.jpg" alt="LinkedIn post by John Shelburne" width="600"> </a> <br> <i>John Shelburne - Fixed Income Fintech Leader with 20+ Years of Experience | Machine Learning & Cloud Computing Specialist</i> | <a href="https://www.linkedin.com/in/shelburne/">LinkedIn Profile</a> </details> <!-- Add more social media posts here using the format above -->

Testing

See TESTING.md for more details.

bash
# Run all tests
pnpm test

# Run specific tests
pnpm 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 stefano@amorelli.tech.

© 2025 Stefano Amorelli

常见问题

io.github.stefanoamorelli/fred-mcp-server 是什么?

Federal Reserve Economic Data(FRED)MCP 服务器,可访问 80 多万条经济时间序列数据

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.6k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.0k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.8k

评论