Skip to main content
Glama
stefanoamorelli

Federal Reserve Economic Data (FRED) MCP Server

Federal Reserve Economic Data MCP Server

npm version DOI License: AGPL v3 Tests Documentation

IMPORTANT

Disclaimer: This open-source project is not affiliated with, sponsored by, or endorsed by the Federal Reserve or the Federal Reserve Bank of St. Louis. "FRED" is a registered trademark of the Federal Reserve Bank of St. Louis, used here for descriptive purposes only.

A Model Context Protocol (MCP) server providing universal access to all 800,000+ Federal Reserve Economic Data (FRED®) time series through three powerful tools.

https://github.com/user-attachments/assets/66c7f3ad-7b0e-4930-b1c5-a675a7eb1e09

TIP

If you use this project in your research or work, please cite it using theCITATION.cff file, or use the following citation:

APA Format:

Amorelli, S. (2025). Federal Reserve Economic Data MCP (Model Context Protocol) Server (Version 1.0.2) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.14536707

BibTeX:

@software{amorelli_2025_14536707,
  author       = {Amorelli, Stefano},
  title        = {{Federal Reserve Economic Data MCP (Model Context
                   Protocol) Server}},
  month        = jan,
  year         = 2025,
  publisher    = {Zenodo},
  version      = {1.0.2},
  doi          = {10.5281/zenodo.14536707},
  url          = {https://doi.org/10.5281/zenodo.14536707}
}

Installation

Manual Installation

  1. Clone the repository:

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

    pnpm install
  3. Build the project:

    pnpm build

Related MCP server: FRED MCP Server

Configuration

This server requires a FRED® API key. You can obtain one from the FRED® website.

Install the server, for example, on Claude Desktop, modify the claude_desktop_config.json file and add the following configuration:

{
  "mcpServers": {
    "FRED MCP Server": {
      "command": "/usr/bin/node",
      "args": [
        "<PATH_TO_YOUR_CLONED_REPO>/fred-mcp-server/build/index.js"
      ],
      "env": {
        "FRED_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Using Docker

You can also run the FRED MCP Server using Docker. Add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "fred-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FRED_API_KEY=<your-key-here>",
        "stefanoamorelli/fred-mcp-server:latest"
      ],
      "env": {}
    }
  }
}

Replace <your-key-here> with your actual FRED API key.

Using Streamable HTTP Transport

For network deployments, you can run the server with Streamable HTTP transport instead of stdio:

# Using CLI flag
node build/index.js --http

# Or using environment variable
TRANSPORT=http node build/index.js

# Custom port (default is 3000)
PORT=8080 node build/index.js --http

The server will be available at http://localhost:3000/mcp (or your custom port).

Example client request:

# Initialize session
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}'

# Use the mcp-session-id from the response header for subsequent requests
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <session-id-from-init>" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

A GET /healthz endpoint reports active sessions, cache statistics, and uptime for load balancers and orchestrators.

Configuration

All settings are environment variables with sensible defaults:

Variable

Default

Description

FRED_API_KEY

(required)

Your FRED API key

FRED_API_TIMEOUT_MS

30000

Per-request timeout against the FRED API

FRED_API_MAX_RETRIES

3

Retries for 429/5xx/network failures (exponential backoff with jitter, honors Retry-After)

FRED_API_RETRY_BASE_DELAY_MS

500

Base delay for retry backoff

FRED_RATE_LIMIT_PER_MINUTE

120

Client-side token bucket matching FRED's per-key quota

FRED_CACHE_TTL_MS

60000

TTL for cached API responses (0 disables caching)

FRED_CACHE_MAX_ENTRIES

500

LRU cache capacity

TRANSPORT

stdio

Set to http for Streamable HTTP transport

HOST

(all interfaces)

HTTP bind address

PORT

3000

HTTP port

MCP_MAX_SESSIONS

100

Maximum concurrent MCP sessions (new sessions get 503 beyond this)

MCP_SESSION_TTL_MS

1800000

Idle time before a session is reaped

MCP_SESSION_SWEEP_INTERVAL_MS

60000

How often the idle-session reaper runs

MCP_BODY_LIMIT

1mb

Maximum accepted JSON body size

LOG_LEVEL

info

error, warn, info, or debug (logs go to stderr)

Identical concurrent requests are coalesced into a single upstream call, and successful responses are cached, so multiple sessions share one rate-limit budget efficiently.

Available Tools

This MCP server provides three comprehensive tools to access all 800,000+ FRED® economic data series:

fred_browse

Description: Browse FRED's complete catalog through categories, releases, or sources.

Parameters:

  • browse_type (required): Type of browsing - "categories", "releases", "sources", "category_series", "release_series"

  • category_id (optional): Category ID for browsing subcategories or series within a category

  • release_id (optional): Release ID for browsing series within a release

  • limit (optional): Maximum number of results (default: 50)

  • offset (optional): Number of results to skip for pagination

  • order_by (optional): Field to order results by

  • sort_order (optional): "asc" or "desc"

Description: Search for FRED economic data series by keywords, tags, or filters.

Parameters:

  • search_text (optional): Text to search for in series titles and descriptions

  • search_type (optional): "full_text" or "series_id"

  • tag_names (optional): Comma-separated list of tag names to filter by

  • exclude_tag_names (optional): Comma-separated list of tag names to exclude

  • limit (optional): Maximum number of results (default: 25)

  • offset (optional): Number of results to skip for pagination

  • order_by (optional): Field to order by (e.g., "popularity", "last_updated")

  • sort_order (optional): "asc" or "desc"

  • filter_variable (optional): Filter by "frequency", "units", or "seasonal_adjustment"

  • filter_value (optional): Value to filter the variable by

fred_get_series

Description: Retrieve data for any FRED series by its ID with support for transformations and date ranges.

Parameters:

  • series_id (required): The FRED series ID (e.g., "GDP", "UNRATE", "CPIAUCSL")

  • observation_start (optional): Start date in YYYY-MM-DD format

  • observation_end (optional): End date in YYYY-MM-DD format

  • limit (optional): Maximum number of observations

  • offset (optional): Number of observations to skip

  • sort_order (optional): "asc" or "desc"

  • units (optional): Data transformation:

    • "lin" (levels/no transformation)

    • "chg" (change from previous period)

    • "ch1" (change from year ago)

    • "pch" (percent change)

    • "pc1" (percent change from year ago)

    • "pca" (compounded annual rate of change)

    • "cch" (continuously compounded rate of change)

    • "log" (natural log)

  • frequency (optional): Frequency aggregation ("d", "w", "m", "q", "a")

  • aggregation_method (optional): "avg" (average), "sum", or "eop" (end of period)

Example Usage

With these three tools, you can:

  • Browse all economic categories and discover available data

  • Search for specific indicators by keywords or tags

  • Retrieve any of the 800,000+ series with custom transformations

  • Access real-time economic data including GDP, unemployment, inflation, interest rates, and more

Social Media Shoutouts 📣

NOTE

Want to be featured? TagStefano Amorelli on LinkedIn or @stefanoamorelli on X in your post about using FRED MCP Server, or submit a PR to add your shoutout!

We're grateful for the community support! Here are some mentions from amazing people:

Testing

See TESTING.md for more details.

# Run all tests
pnpm test

# Run specific tests
pnpm test:registry

License ⚖️

This open-source project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:

  • You can use, modify, and distribute this software

  • If you modify and distribute it, you must release your changes under AGPL-3.0

  • If you run a modified version on a server, you must provide the source code to users

  • See the LICENSE file for full details

For commercial licensing options or other licensing inquiries, please contact stefano@amorelli.tech.

© 2025 Stefano Amorelli

Available Tools

3 tools
fred_browseBrowse FRED catalogA

Browse FRED's complete catalog through categories, releases, or sources. Use browse_type='categories' to explore the category tree, 'releases' for data releases, 'sources' for data sources, 'category_series' to get all series in a category, or 'release_series' to get all series in a release.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results
offsetNoNumber of results to skip
order_byNoField to order by
release_idNoRelease ID (for release_series)
sort_orderNoSort order
browse_typeYesType of browsing to perform
category_idNoCategory ID (for categories or category_series)
filter_valueNoValue to filter the variable by (category_series only)
filter_variableNoVariable to filter by (category_series only)

TDQS

A4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of disclosing behavioral traits. However, it only states that browsing is possible through categories/allows/releases/sources; it does not explicitly state that this is read-only, does not mention pagination behavior, rate limits, return format, or contextual dependencies. Though the word 'browse' implies a read operation, key behavioral expectations remain unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero fluff. The first sentence gives a high-level summary, and the second defines each browse_type in a compact list. It is front-loaded and necessary information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 9 parameters, no output schema, and no annotations, the description does a solid job of covering the main polymorphic behavior via browse_type. However, it does not address pagination via limit/offset or how filter parameters relate to actual output, though the schema fills some gaps. It is slightly incomplete for full contextual coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, giving a baseline of 3. The description adds semantic meaning by explaining exactly what each browse_type enum does (e.g., 'category_series' returns all series in a category), which is not fully embedded in the parameter schema's short string description. This goes beyond the schema and meaningfully guides parameter selection.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb (browse) and resource (FRED's complete catalog), and enumerates the distinct browsing modes: categories, releases, sources, category_series, and release_series. This clearly differentiates it from sibling tools like fred_search and fred_get_series by emphasizing catalog exploration vs searching or retrieving a single series.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for using the tool to explore FRED's catalog and details each browse_type variant, but it does not explicitly compare with fred_search or fred_get_series or state when not to use this tool. Since it gives clear operational guidance for internal parameter choices, it meets the 'clear context, no exclusions' bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fred_get_seriesGet FRED series dataB

Retrieve data for any FRED series by its ID. Supports data transformations, frequency changes, and date ranges.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of observations to return
unitsNoData transformation: lin=levels, chg=change, pch=percent change, log=natural log
offsetNoNumber of observations to skip
frequencyNoFrequency aggregation: d=daily, w=weekly, m=monthly, q=quarterly, a=annual
series_idYesThe FRED series ID to retrieve data for (e.g., 'GDP', 'UNRATE', 'CPIAUCSL')
sort_orderNoSort order of observations by date
output_typeNoOutput format: 1=observations, 2=observations by vintage, 3=observations by release, 4=initial release only
vintage_datesNoVintage date or dates in YYYY-MM-DD format
observation_endNoEnd date for observations in YYYY-MM-DD format
observation_startNoStart date for observations in YYYY-MM-DD format
aggregation_methodNoAggregation method: avg=average, sum=sum, eop=end of period

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing behavior. It simply says 'Retrieve data' without stating side effects, limitations, rate limits, output structure, or error conditions. For a read operation, it's not harmful but inadequately informative about what to expect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, no redundant phrasing. Every word earns its place, but it is perhaps too sparse (under-specified) rather than genuinely concise—still, it is well-structured and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 11 parameters, several with enums, and no output schema. The description provides no information about return formats, required fields beyond the implied series_id, or how to interpret transformations/frequencies. This is insufficient for an agent to confidently select and use the tool without relying heavily on the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the schema already describes each parameter in detail. The description mentions transformations, frequency, and date ranges, which loosely map to units, frequency, and observation_start/end, but adds no new meaning beyond what the schema provides. The baseline of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves data for a FRED series by its ID, which is a specific verb and resource. It does not explicitly differentiate from siblings (fred_browse, fred_search), but the intent is unambiguous—getting the actual data series rather than browsing or searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage—use this to get series data—but provides no explicit guidance on when to choose this over fred_browse or fred_search, nor any exclusions or prerequisites. The mention of supported options (transformations, frequency, date ranges) gives some context but no decision framework.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.2.0
    • Changedfred_browse2 fields changed
      • addedInput schema / properties / filter_value
        Added value: +{
        +  "description": "Value to filter the variable by (category_series only)",
        +  "type": "string"
        +}
      • addedInput schema / properties / filter_variable
        Added value: +{
        +  "description": "Variable to filter by (category_series only)",
        +  "enum": [
        +    "frequency",
        +    "units",
        +    "seasonal_adjustment"
        +  ],
        +  "type": "string"
        +}
  2. 3 tool updatesv1.0.1
    • Changedfred_browse1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedfred_get_series1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedfred_search1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  3. 3 tool updates
    • First observedfred_browse
    • First observedfred_get_series
    • First observedfred_search

TDQS

A3.8/5.0
Disambiguation5/5

Each tool serves a distinct purpose: browsing catalog structure, searching for series, and retrieving series data. There is no overlap or ambiguity between browse, search, and get_series.

Naming Consistency5/5

All tools follow the consistent pattern fred_<verb>, with descriptive action names: browse, search, get_series. Naming is uniform and predictable.

Tool Count5/5

Three tools cover the core FRED workflow of exploring, finding, and retrieving economic data. The count is minimal but well-scoped for the server's purpose, avoiding unnecessary bloat.

Completeness4/5

The tool set covers the essential operations: browse the catalog, search for series, and retrieve data. Minor gaps exist such as fetching detailed metadata for a specific series or category, but these are not critical for standard use cases.

Maintenance

ActivityMaintained
ResponsivenessSlow

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides access to 800,000+ Federal Reserve Economic Data (FRED) time series, enabling users to search, retrieve, and analyze economic indicators like GDP, unemployment, inflation, and interest rates through natural language queries.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides access to over 800,000 economic time series from the Federal Reserve Bank of St. Louis, including data on GDP, inflation, and employment. It enables users to search for, retrieve, and analyze various economic indicators and state-level statistics.
    1
    -
  • F
    license
    C
    quality
    D
    maintenance
    Enables users to query and explore economic data from FRED, supporting tools for searching series, retrieving observations, and browsing categories. It provides comprehensive access to financial datasets, including GeoFRED maps and raw endpoint passthrough for advanced research.
    40
    1
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables searching and retrieving economic data from the Federal Reserve Economic Data (FRED) API, including time series, categories, releases, and popular indicators.
    7
    1
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stefanoamorelli/fred-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server