Skip to main content

Installation Guide

This guide covers all installation methods for the FRED MCP Server across different platforms and deployment scenarios.

Prerequisites

FRED API Key

Required for accessing FRED data. Get your free key at fred.stlouisfed.org

Node.js 18+

Required for running the server. Download from nodejs.org

Installation Methods

The easiest installation method using Smithery:
npx -y @smithery/cli install @stefanoamorelli/fred-mcp-server --client claude
Benefits:
  • Automatic configuration
  • Handles all dependencies
  • Interactive setup for API key
  • Updates configuration automatically

Method 2: From Source

1

Clone Repository

git clone https://github.com/stefanoamorelli/fred-mcp-server.git
cd fred-mcp-server
2

Install Dependencies

# Using pnpm (recommended)
pnpm install

# Or using npm
npm install

# Or using yarn
yarn install
3

Build the Project

# Build TypeScript
pnpm build

# Or with npm
npm run build
4

Verify Build

# Test the build
node build/index.js --version

Method 3: Docker

Use the official Docker image:
# Pull the latest image
docker pull stefanoamorelli/fred-mcp-server:latest

# Run the container
docker run -i --rm \
  -e FRED_API_KEY=your_api_key_here \
  stefanoamorelli/fred-mcp-server:latest

Client Configuration

Claude Desktop

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "fred-mcp": {
      "command": "fred-mcp-server",
      "env": {
        "FRED_API_KEY": "your_api_key_here"
      }
    }
  }
}

Other MCP Clients

Configure in .vscode/settings.json:
{
  "mcp.servers": {
    "fred": {
      "command": "fred-mcp-server",
      "env": {
        "FRED_API_KEY": "${env:FRED_API_KEY}"
      }
    }
  }
}
Use with any MCP CLI client:
# Set environment variable
export FRED_API_KEY="your_api_key"

# Run with MCP CLI
mcp-cli connect fred-mcp-server
Use with Python MCP client:
from mcp import Client
import os

# Configure client
client = Client()
client.connect(
    command="fred-mcp-server",
    env={"FRED_API_KEY": os.getenv("FRED_API_KEY")}
)

# Use the client
result = client.call_tool(
    "fred_get_series",
    {"series_id": "GDP", "limit": 10}
)

Environment Variables

FRED_API_KEY
string
required
Your FRED API key from fred.stlouisfed.org
FRED_BASE_URL
string
default:"https://api.stlouisfed.org/fred"
Optional: Override the FRED API base URL
LOG_LEVEL
string
default:"info"
Optional: Set logging level (debug, info, warn, error)

Platform-Specific Instructions

macOS

1

Install Prerequisites

# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js
brew install node
2

Install FRED MCP

npm install -g fred-mcp-server
3

Configure Claude

# Open config in editor
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows

1

Install Prerequisites

  1. Download Node.js from nodejs.org
  2. Run the installer with default settings
  3. Open PowerShell or Command Prompt as Administrator
2

Install FRED MCP

npm install -g fred-mcp-server
3

Configure Claude

# Open config directory
explorer %APPDATA%\Claude

# Edit claude_desktop_config.json

Linux

1

Install Prerequisites

# Ubuntu/Debian
sudo apt update
sudo apt install nodejs npm

# Fedora
sudo dnf install nodejs npm

# Arch
sudo pacman -S nodejs npm
2

Install FRED MCP

sudo npm install -g fred-mcp-server
3

Configure Claude

# Create config directory if needed
mkdir -p ~/.config/claude

# Edit configuration
nano ~/.config/claude/claude_desktop_config.json

Verification

Test Installation

# Test the server directly
FRED_API_KEY=your_key fred-mcp-server

# Should output MCP initialization message

Troubleshooting

Issue: fred-mcp-server: command not foundSolutions:
  1. Ensure Node.js is installed: node --version
  2. Check npm global bin path: npm bin -g
  3. Add npm bin to PATH: export PATH=$PATH:$(npm bin -g)
  4. Reinstall: npm install -g fred-mcp-server
Issue: Permission errors during installationSolutions:
  • macOS/Linux: Use sudo npm install -g fred-mcp-server
  • Windows: Run as Administrator
  • Alternative: Install locally without -g flag
Issue: “Invalid API key” or authentication errorsSolutions:
  1. Verify key at fred.stlouisfed.org
  2. Check for typos in configuration
  3. Ensure proper JSON formatting
  4. Test key with curl:
curl "https://api.stlouisfed.org/fred/series?series_id=GDP&api_key=YOUR_KEY&file_type=json"
Issue: Docker container exits immediatelySolutions:
  1. Run with -it flags for interactive mode
  2. Check Docker logs: docker logs container_id
  3. Verify environment variables are passed correctly
  4. Ensure Docker daemon is running

Updating

Update Methods

# Update globally installed version
npm update -g fred-mcp-server

# Or reinstall latest
npm install -g fred-mcp-server@latest

Next Steps