FRED Economic Data

by jaldekoa

2 stars
473 downloads
Not rated
GitHub

About

Integrates with the Federal Reserve Economic Data (FRED) API to retrieve economic time series data with customizable parameters for date ranges, frequency aggregation, and data transformations.

Details

Author
jaldekoa
Repository
Jaldekoa/mcp-fredapi
GitHub stars
2
Downloads
473
License
MIT License
Categories
Database, Finance, Other, AI, Design, Developer Tools, Search, API, Frontend, Infrastructure
Tags
#data-analysis, #integration

- Retrieves economic time series data from FRED
- Supports multiple frequency, units, and aggregation options
- Integrates with Claude in Cursor via MCP
- Uses the official FRED API series_observations endpoint
- Provides simple parameter set (6 working parameters)
- Easy configuration with .env file and mcp.json

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name FRED Economic Data
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 /path/to/mcp-fredapi
    • Argument 3 run
    • Argument 4 --with
    • Argument 5 mcp
    • Argument 6 --with
    • Argument 7 httpx
    • Argument 8 mcp
    • Argument 9 run
    • Argument 10 server.py

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To configure Cursor to use this MCP server, add the following to your ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "mcp-fredapi": {
      "command": "uv",
      "args": ["--directory", "/path/to/mcp-fredapi", "run", "--with", "mcp", "--with", "httpx", "mcp", "run", "server.py"]
    }
  }
}

Replace /path/to/mcp-fredapi with the actual path to the repository on your system. For example:

{
  "mcpServers": {
    "mcp-fredapi": {
      "command": "uv",
      "args": ["--directory", "/path/to/mcp-fredapi", "run", "--with", "mcp", "--with", "httpx", "mcp", "run", "server.py"]
    }
  }
}

get_fred_series_observations

Retrieves economic time series observations from FRED. Parameters: series_id (string, required), sort_order (string, optional), units (string, optional), frequency (string, optional), aggregation_method (string, optional), output_type (int, optional).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "fred economic data": {
            "cwd": null,
            "env": {},
            "args": [
                "--directory",
                "/path/to/mcp-fredapi",
                "run",
                "--with",
                "mcp",
                "--with",
                "httpx",
                "mcp",
                "run",
                "server.py"
            ],
            "shell": false,
            "command": "uv"
        }
    }
}

Linux

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/path/to/mcp-fredapi",
        "run",
        "--with",
        "mcp",
        "--with",
        "httpx",
        "mcp",
        "run",
        "server.py"
    ],
    "shell": false,
    "command": "uv"
}

Macos

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/path/to/mcp-fredapi",
        "run",
        "--with",
        "mcp",
        "--with",
        "httpx",
        "mcp",
        "run",
        "server.py"
    ],
    "shell": false,
    "command": "uv"
}

Windows

{
    "cwd": null,
    "env": [],
    "args": [
        "--directory",
        "/path/to/mcp-fredapi",
        "run",
        "--with",
        "mcp",
        "--with",
        "httpx",
        "mcp",
        "run",
        "server.py"
    ],
    "shell": false,
    "command": "uv"
}

FRED (Federal Reserve Economic Data) API integration with Model Context Protocol (MCP)

- Introduction
-
Installation
-
Configuration

- FRED API Key
-
Claude/Cursor Configuration

MCP-FREDAPI provides access to economic data from the Federal Reserve Bank of St. Louis (FRED) through the Model Context Protocol. This integration allows AI assistants like Claude to retrieve economic time series data directly when used with Cursor or other MCP-compatible environments.

This package integrates with theofficial FRED API, focusing specifically on theseries_observations endpointwhich provides time series data for economic indicators.

pip install "mcp[cli]" httpx python-dotenv
git clone https://github.com/Jaldekoa/mcp-fredapi.git cd mcp-fredapi

This method is recommended as it matches the configuration shown in mcp.json.
- First, install uv if you don't have it yet:

git clone https://github.com/Jaldekoa/mcp-fredapi.git cd mcp-fredapi

- Use uv to run the server (no need to install dependencies separately):

uv run --with mcp --with httpx mcp run server.py

You'll need a FRED API key, which you can obtain fromFRED API.

To configure Cursor to use this MCP server, add the following to your~/.cursor/mcp.jsonfile:

{ "mcpServers": { "mcp-fredapi": { "command": "uv", "args": ["--directory", "/path/to/mcp-fredapi", "run", "--with", "mcp", "--with", "httpx", "mcp", "run", "server.py"] } } }

Replace/path/to/mcp-fredapiwith the actual path to the repository on your system. For example:

{ "mcpServers": { "mcp-fredapi": { "command": "uv", "args": ["--directory", "/path/to/mcp-fredapi", "run", "--with", "mcp", "--with", "httpx", "mcp", "run", "server.py"] } } }

Note: On Windows, you can use either forward slashes/or double backslashes\\in the path.

Retrieves economic time series observations from FRED.

When using Claude in Cursor, you can access this tool directly with:

@mcp-fredapi:get_fred_series_observations

Theget_fred_series_observationstool accepts the following parameters. For complete technical details about each parameter, please refer to theofficial FRED API documentation.

Due to current limitations with the MCP implementation, only certain parameters are working properly:

- ✅Working parameters:series_id,sort_order,units,frequency, aggregation_method, andoutput_type.
- ❌Non-working parameters:
realtime_start,realtime_end,limit,offset,observation_start,observation_end, andvintage_dates.

For best results, stick with the working parameters in your queries. Future updates may resolve these limitations.

When using Claude in Cursor, you can ask for GDP data like this:

Can you get the latest GDP data from FRED? @mcp-fredapi:get_fred_series_observations { "series_id": "GDP" }
Can you get the GDP data in descending order (newest first)? @mcp-fredapi:get_fred_series_observations { "series_id": "GDP", "sort_order": "desc" }
Can you get annual GDP data? @mcp-fredapi:get_fred_series_observations { "series_id": "GDP", "frequency": "a" }

To get consumer price index data with percent change:

What's the recent inflation rate in the US? @mcp-fredapi:get_fred_series_observations { "series_id": "CPIAUCSL", "units": "pch", "frequency": "m" }
Show me GDP data in a different format. @mcp-fredapi:get_fred_series_observations { "series_id": "GDP", "output_type": 2 }

Contributions are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Make your changes
- Commit your changes (
git commit -m 'Add an amazing feature')
- Push to the branch (
git push origin feature/amazing-feature`)
- Open a Pull Request

This project is licensed under the MIT License - see the LICENSE file for details.

- FRED API Documentation - Series Observations- Official documentation for the FRED API endpoint used in this project.
-
FRED API- Information on obtaining an API key and general API documentation.
-
Model Context Protocol- Documentation for the Model Context Protocol.

Access Chinese stock market data, including historical prices, real-time quotes, news, and financial statements.

Provides A-share stock market data, including basic info, historical K-lines, financial indicators, and macroeconomic data using Baostock.

AudioAlpha turns 100+ daily finance and crypto podcasts into structured intelligence — α-sentiment scores, narrative signals, asset mentions, transcripts, and market snapshots with 40+ custom metrics. Built for AI-driven research and trading workflows.

Access Binance cryptocurrency market data, including prices, candlestick charts, and order books.

Funding rounds, acquisitions & exec moves — deduped, enriched, typed. Query over REST, stream over webhooks, or hand to your agent over MCP. 50 free credits.

Access data and information from IQ.wiki, the world's largest crypto and blockchain encyclopedia.

Download and query stock market data using the QMT platform.

Access financial statements, including income, balance sheets, and cash flow, for companies listed on the Securities Exchange of Thailand (SET).

MCP (Model Context Protocol) server for Kontomierz.pl — a Polish personal finance platform. Enables AI assistants (Claude Desktop, LibreChat, Cline) to read and manage your bank accounts, transactions, budgets, and scheduled payments — all through a single API. Built in Python, runs locally or in Docker.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.