home / mcp / wm mcp server

WM MCP Server

Provides access to FRED macroeconomic data with search and retrieval capabilities for MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hungson175-wm_mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/WM_mcp",
        "run",
        "fred_macroeco_server.py"
      ],
      "env": {
        "FRED_API_KEY": "YOUR_FRED_API_KEY"
      }
    }
  }
}

You can access Federal Reserve Economic Data (FRED) through this MCP server, enabling you to search, retrieve, and work with macroeconomic data in conversations with Claude or other MCP clients. It provides common indicators like GDP, employment, and inflation, with real-time data fetching and standardized formatting for easy downstream use.

How to use

You interact with the FRED MCP Server by connecting via an MCP client and invoking its resources and tools in your prompts. Start by ensuring your MCP client (such as Claude Desktop) is configured to reach the server, then use search and fetch capabilities to discover and retrieve data series. Typical workflows include listing available series, searching by description, and fetching data for a specific FRED series to feed charts or analyses in your conversations.

How to install

Prerequisites you need to prepare before running the server are Python 3.11 or higher and the uv package manager. You will also need a FRED API key to access data.

# 1) Prepare the environment
# Ensure you have Python 3.11+ installed
# Install uv and create a virtual environment
uv venv

# 2) Activate the environment
# On macOS/Linux
source .venv/bin/activate
# On Windows
# .venv\Scripts\activate

# 3) Install dependencies
uv pip install "mcp[cli]>=1.6.0" "colorama>=0.4.6" "numpy>=2.2.4" "pandas>=2.2.3" "python-dotenv>=1.1.0" "requests>=2.32.3"

# 4) Set up environment variables
cp .env.example .env
# Edit .env and add your FRED API key
# FRED_API_KEY=your_fred_api_key_here

Configuration and running locally

The MCP server is designed to run as a local stdio service via the MCP client. Use the following configuration in your MCP client to connect the local server. This configuration specifies the runtime command and the arguments required to start the server from a local directory.

{
  "mcpServers": {
    "fred_macroeco": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/WM_mcp",
        "run",
        "fred_macroeco_server.py"
      ]
    }
  }
}

Using Claude Desktop with the FRED MCP Server

To enable Claude Desktop to work with the FRED MCP Server, ensure Claude Desktop is installed and running. In Claude Desktop settings, add the MCP server configuration to your claude_desktop_config.json, pointing to the local uv command and your project directory.

{
  "mcpServers": {
    "FRED Macroeconomic Data Server": {
      "command": "/path/to/your/.local/bin/uv",
      "args": [
        "--directory",
        "/path/to/your/WM_mcp",
        "run",
        "fred_macroeco_server.py"
      ]
    }
  }
}

Security and environment considerations

The server relies on a FRED API key to fetch data. Keep your FRED_API_KEY secure and avoid sharing your .env file publicly. When running Claude Desktop or any MCP client in shared environments, ensure only authorized access to your local server configuration and credentials.

Notes on maintenance and run considerations

During development, you can test the server with the MCP Inspector using the development command to inspect resources and tools. When you are ready for production use, start the server via the standard command path shown in your MCP client configuration and verify that the server appears in Claude Desktop or the chosen MCP client.

Troubleshooting

If you encounter API key errors, confirm that the FRED_API_KEY in your .env file is correct and that the file is located in the expected directory. If the MCP server does not appear in Claude Desktop, double-check the claude_desktop_config.json paths, ensure uv and all dependencies are installed, and consider restarting Claude Desktop.

Available Resources and Tools

Available resources include an endpoint to list available FRED series and their details, and tools to fetch data or search for series. Use these resources to discover data and feed your analyses.

Available tools

fetch_series_data

Fetch data for any FRED series including time range and frequency options.

search_series

Search for FRED series by description or keywords to find the right data set.