Get the FREE Ultimate OpenClaw Setup Guide →

fred

MCP server for accessing FRED (Federal Reserve Economic Data) API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kablewy-fred-mcp-server node src/index.ts \
  --env FRED_API_KEY="your_api_key_here"

How to use

This MCP server provides access to the Federal Reserve Economic Data (FRED) API through a set of MCP tools. It enables searching for economic data series and retrieving observations for specific series, with options for filtering by date range, adjusting frequency, applying aggregations, and supporting sorting and pagination. Use the available tools to build queries that fetch relevant series metadata, and then pull observations for those series to integrate into your model contexts or downstream applications.

To use the server, ensure you have a valid FRED API key and run the server via the provided startup scripts. The server exposes tools such as Series Search for discovering series by keywords, tags, and parameters, and Series Observations for retrieving data points for a selected series. You can combine these tools in workflows to locate data, fetch its observations, and then pass the results to other MCP components or your own data pipelines.

How to install

Prerequisites:

Installation steps:

  1. Clone the repository git clone https://github.com/kablewy/fred-mcp-server cd fred-mcp-server

  2. Install dependencies npm install

  3. Create a local environment file Copy the example and insert your API key cp .env.example .env

    Edit .env to include your key

    FRED_API_KEY=your_api_key_here

  4. Run the server (development) npm run dev

  5. Build for production (optional) npm run build

  6. Start in production mode (optional) npm start

Additional notes

Environment variables:

  • FRED_API_KEY: Required. Your FRED API key for authenticated requests.

Configuration tips:

  • If you need to adjust API usage, review any rate limit considerations and implement appropriate request pacing.
  • The server exposes two main tools: Series Search and Series Observations. Use Series Search to discover relevant series, then pass the identified series IDs to Series Observations to fetch data points.
  • When deploying in production, consider sealing the FRED_API_KEY using a secrets manager or environment variable management strategy appropriate for your hosting environment.

Common issues:

  • Invalid API key error from FRED: verify the key is correct and not expired.
  • Network-related errors: ensure outbound access is allowed in your hosting environment.
  • TypeScript build issues: ensure dependencies are installed and that the build step completes successfully before starting in production.

Related MCP Servers

Sponsor this space

Reach thousands of developers