# fred-mcp-server

Connects AI assistants to more than 800,000 FRED economic time series. Useful when researching macroeconomic indicators, interest rates, or inflation directly inside your workspace.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 127
- Author: stefanoamorelli
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/stefanoamorelli/fred-mcp-server
- Updated: 2026-08-22
- HTML: https://affpapa.org/en/nevibecode/mcp/fred-mcp-server

## What it does

This integration brings the Federal Reserve Economic Data catalog directly into development environments. Through tools such as `fred_browse` and `fred_search`, an agent can inspect official releases, traverse categories, and query hundreds of thousands of historical time series.

The server operates via standard I/O, Docker, or as a network daemon listening at `http://localhost:3000/mcp`. It bundles an in-memory LRU cache holding 500 entries alongside a token-bucket rate limiter set to 120 calls per minute. Concurrent matching queries are merged into single upstream requests.

Without a registered `FRED_API_KEY`, the server will fail to fetch any data. You must provide an API key. Obtain one from the St. Louis Fed portal before launching the service.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `FRED_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add fred-mcp-server -e FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add fred-mcp-server --env FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fred-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "fred-mcp-server"
            ],
            "env": {
                "FRED_API_KEY": "<FRED_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fred-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "fred-mcp-server"
            ],
            "env": {
                "FRED_API_KEY": "<FRED_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FRED_API_KEY=<FRED_API_KEY> fred-mcp-server npx -y fred-mcp-server
```
Replace <…> with your own values

## When to use it
- Search the FRED catalog for specific economic indicators and historical series
- Browse official Federal Reserve releases and categories by identifier
- Route economic data queries through a local HTTP endpoint with session handling
- Prevent upstream API rate throttling via built-in request coalescing and LRU caching

## Example prompts
- Search FRED series related to consumer price index using `fred_search`.
- Browse categories in the FRED economic database using `fred_browse`.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
