MCP-FREDAPI logo

MCP-FREDAPI

Community
Jaldekoa

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

PublisherJaldekoa
Repositorymcp-fredapi
LanguagePython
Forks
6
Stars
6
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP-FREDAPI exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    6 stars and 6 forks from the linked repository.

MCP-FREDAPI

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

Table of Contents

Introduction

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 the official FRED API, focusing specifically on the series_observations endpoint which provides time series data for economic indicators.

Installation

There are two installation methods:

Method 1: Using pip

Install the required dependencies:

terminal
pip install "mcp[cli]" httpx python-dotenv

Clone this repository:

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

Method 2: Using uv (Recommended)

This method is recommended as it matches the configuration shown in mcp.json.

  1. First, install uv if you don't have it yet:
terminal
pip install uv
  1. Clone this repository:
terminal
git clone https://github.com/Jaldekoa/mcp-fredapi.git
cd mcp-fredapi
  1. Use uv to run the server (no need to install dependencies separately):
terminal
uv run --with mcp --with httpx mcp run server.py

Configuration

FRED API Key

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

Create a .env file in the project root:

FRED_API_KEY=your_api_key_here

Claude/Cursor Configuration

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

json
{
  "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:

json
{
  "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.

Available Tools

get_fred_series_observations

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

Parameters

The get_fred_series_observations tool accepts the following parameters. For complete technical details about each parameter, please refer to the official FRED API documentation.

ParameterTypeDescriptionAllowed ValuesDefault ValueStatus
series_idstrThe ID of the economic series-(Required)✅ Works
sort_orderstrSort order of observations'asc', 'desc''asc'✅ Works
unitsstrData value transformation'lin', 'chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log''lin'✅ Works
frequencystrFrequency of observations'd', 'w', 'bw', 'm', 'q', 'sa', 'a', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem'None✅ Works
aggregation_methodstrAggregation method for frequency'avg', 'sum', 'eop''avg'✅ Works
output_typeintOutput type of observations1, 2, 3, 41✅ Works
realtime_startstrStart of real-time period (YYYY-MM-DD)-None❌ Not working
realtime_endstrEnd of real-time period (YYYY-MM-DD)-None❌ Not working
limitint/strMaximum number of observations to returnBetween 1 and 10000010❌ Not working
offsetint/strNumber of observations to skip from the beginning-0❌ Not working
observation_startstrStart date of observations (YYYY-MM-DD)-None❌ Not working
observation_endstrEnd date of observations (YYYY-MM-DD)-None❌ Not working
vintage_datesstrComma-separated list of vintage dates-None❌ Not working

[!WARNING]

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

  • ✅ Working parameters: series_id, sort_order, units, frequency , aggregation_method, and output_type`.
  • ❌ Non-working parameters: realtime_start, realtime_end, limit, offset, observation_start, observation_end, and vintage_dates.

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

Examples

Getting US GDP Data

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"
}

Getting GDP Data in Descending Order

Can you get the GDP data in descending order (newest first)?

@mcp-fredapi:get_fred_series_observations
{
  "series_id": "GDP",
  "sort_order": "desc"
}

Getting Annual GDP Data

Can you get annual GDP data?

@mcp-fredapi:get_fred_series_observations
{
  "series_id": "GDP",
  "frequency": "a"
}

Getting Inflation Rate

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"
}

Different Output Format

Show me GDP data in a different format.

@mcp-fredapi:get_fred_series_observations
{
  "series_id": "GDP",
  "output_type": 2
}

Contributing

Contributions are welcome. Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add an amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

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

References

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "jaldekoa-mcp-fredapi": {
      "command": "uvx",
      "args": [
        "mcp-fredapi"
      ]
    }
  }
}

Use MCP-FREDAPI MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP-FREDAPI is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP-FREDAPI as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP-FREDAPI MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "jaldekoa-mcp-fredapi": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-fredapi"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP-FREDAPI MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP-FREDAPI MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP-FREDAPI to help me with this task?
MCP-FREDAPI
Sure. I read it.
Here is what I found using MCP-FREDAPI.

Frequently asked questions

What is the MCP-FREDAPI MCP server used for?

MCP-FREDAPI is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP-FREDAPI MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP-FREDAPI with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP-FREDAPI MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP-FREDAPI connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP-FREDAPI MCP to TypingMind?

MCP-FREDAPI runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP-FREDAPI MCP provide in TypingMind?

MCP-FREDAPI exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP-FREDAPI MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP-FREDAPI requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇