fred-mcp-server — Claude Code MCP server: what it does and setup
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.
claude mcp add fred-mcp-server -e FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-serverWhat fred-mcp-server 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.
What it helps with
- 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 for the agent
- Search FRED series related to consumer price index using
fred_search. - Browse categories in the FRED economic database using
fred_browse.
How to install fred-mcp-server
Platform CLI
claude mcp add fred-mcp-server -e FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add fred-mcp-server --env FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"fred-mcp-server": {
"command": "npx",
"args": [
"-y",
"fred-mcp-server"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"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
Platform CLI
gemini mcp add -e FRED_API_KEY=<FRED_API_KEY> fred-mcp-server npx -y fred-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fred-mcp-server
How do I install fred-mcp-server in Claude Code?
Run claude mcp add fred-mcp-server -e FRED_API_KEY=<FRED_API_KEY> -- npx -y fred-mcp-server in your terminal, replacing <FRED_API_KEY> with your personal token.
What does fred-mcp-server do?
It enables agents to query more than 800,000 economic data series from the FRED platform. Assistants can browse releases, inspect categories, and search specific metrics.
What credentials are needed before running the server?
The server requires FRED_API_KEY pointing to a valid token from the St. Louis Fed website. Without it, outgoing requests to the FRED API cannot be authorized.