fred-mcp
This server exposes read-only tools for querying and exploring FRED economic data across series, categories, releases, sources, and tags.
Series: fetch metadata, observations/data values, categories, release, tags, related tags, recent updates, and vintage/revision dates; search series by text/ID with filters and sorting; apply unit transforms, frequency aggregation, observation-date filters, and real-time/vintage filters.
Categories: fetch category metadata, children, related categories, series in a category, tags, and related tags.
Releases: list releases and release dates; fetch release metadata, dates, series, sources, tags, related tags, and release tables.
Sources: list data sources, fetch source metadata, and list releases from a source.
Tags: list/search tags, fetch related tags, and list series matching one or more tags.
Credentials/transports: use a FRED API key via env or per-client X-FRED-API-Key header; supports stdio, streamable HTTP, and SSE.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fred-mcp What is the current unemployment rate?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Federal Reserve Economic Data MCP Server
This open-source project is not affiliated with, sponsored by, or endorsed by theFederal 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 production-grade Model Context Protocol server for FRED® economic data. Covers all 31 endpoints exposed by fred-py-api.
Features
Full FRED API v1 coverage: series, categories, releases, sources, and tags
FastMCP 4 with structured tool output and proper
ToolErrorhandlingDual-mode credentials: environment variable (stdio) or per-client HTTP header (remote BYOK)
Transports:
stdio,streamable-http, andsseDocker image published to GHCR
Related MCP server: FRED API MCP Server
Installation
pip install fred-mcpRequires Python 3.10+.
Get a free FRED API key at fredaccount.stlouisfed.org/apikey.
Setup
Remote hosted server (recommended)
Use the public hosted server with bring your own key (BYOK): no install and no shared server-side API key. Each client sends its own FRED API key in the X-FRED-API-Key header.
Transport: streamable HTTP. Endpoint: https://fred-mcp-prod.fly.dev/mcp.
Add this to your MCP client's configuration file and restart the client:
{
"mcpServers": {
"fred-mcp": {
"url": "https://fred-mcp-prod.fly.dev/mcp",
"headers": {
"X-FRED-API-Key": "<your fred api key>"
}
}
}
}Programmatic example with the FastMCP client:
from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport
transport = StreamableHttpTransport(
"https://fred-mcp-prod.fly.dev/mcp",
headers={"X-FRED-API-Key": "your_fred_api_key"},
)
async with Client(transport=transport) as client:
await client.list_tools()Local (stdio)
For clients that spawn a local process, install fred-mcp and use:
{
"mcpServers": {
"fred-mcp": {
"command": "fred-mcp",
"env": {
"FRED_API_KEY": "<your fred api key>"
}
}
}
}Or run directly from the terminal:
export FRED_API_KEY=your_api_key
fred-mcpSelf-hosted HTTP
Deploy your own instance and use the same url + headers configuration, substituting your host for the endpoint above. No shared server-side key is required when clients send X-FRED-API-Key.
For public internet deployment, terminate TLS at a reverse proxy (nginx, Caddy, Cloudflare). Do not expose plain HTTP with API keys.
Docker
Run the server:
docker run -d -p 8000:8000 \
--name fred-mcp-server \
ghcr.io/zachspar/fred-mcp/fred-mcp-server:latestThe image is published only when a GitHub Release is published. That push tags latest, the release's git tag, and the released commit SHA.
Connect with your FRED API key in the X-FRED-API-Key header (same JSON shape as the remote hosted example, with url set to your deployment).
For stdio via Docker:
{
"mcpServers": {
"fred-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_SERVER_TRANSPORT=stdio",
"-e", "FRED_API_KEY=<your fred api key>",
"ghcr.io/zachspar/fred-mcp/fred-mcp-server:latest"
]
}
}
}Optional server-side fallback key
Set FRED_API_KEY on the server for clients that cannot send custom headers. Header takes precedence when both are present.
Variable | Default | Description |
| — | FRED API key (required for stdio; optional HTTP fallback) |
|
| HTTP header name for BYOK |
|
|
|
|
| Bind host for HTTP transports |
|
| Bind port for HTTP transports |
|
| Level for structlog JSON lines |
|
| Max bytes of a tool's arguments or result kept in one log line. |
Each MCP tool call writes one JSON line to stderr. The line includes the tool name, the arguments, the result or error, and the duration. On HTTP it also includes the method, path, and mcp-session-id when that header is present. The FRED API key is not logged. Stderr is used so stdio transport keeps its protocol frames on stdout.
Tools (31)
Series
Tool | Description |
| Series metadata |
| Categories for a series |
| Data values / observations |
| Release that publishes a series |
| Search series by text or ID |
| Tags for a series search |
| Related tags for a series search |
| Tags on a series |
| Recently updated series |
| Vintage / revision dates |
Categories
Tool | Description |
| Category metadata |
| Child categories |
| Related categories |
| Series in a category |
| Tags in a category |
| Related tags in a category |
Releases
Tool | Description |
| All releases |
| Release dates across releases |
| Release metadata |
| Dates for one release |
| Series in a release |
| Sources for a release |
| Tags for a release |
| Related tags for a release |
| Release tables |
Sources
Tool | Description |
| All data sources |
| Source metadata |
| Releases from a source |
Tags
Tool | Description |
| Search / list tags |
| Related tags |
| Series matching tags |
Development
python3.13 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
make checkLicense
MIT
Available Tools
31 toolsget_categoryGet a FRED categoryARead-only
Get a FRED category by ID. Omit category_id for the root category. Example: get_category(category_id=125).
Inputs: category_id. Returns: object
get_category_childrenGet child categoriesARead-only
Get child categories for a FRED category. Example: get_category_children(category_id=125).
Inputs: category_id, realtime_end, realtime_start. Returns: object
get_category_seriesList series in a categoryARead-only
List FRED series belonging to a category with optional filters. Example: get_category_series(category_id=125, limit=10).
Inputs: category_id (required), limit, offset, order_by, +7 more. Returns: object
get_category_tagsGet tags for a categoryARead-only
Get tags for series in a FRED category. Example: get_category_tags(category_id=125).
Inputs: category_id (required), limit, offset, order_by, +8 more. Returns: object
get_releaseGet a FRED releaseARead-only
Get metadata for a FRED release by release ID. Example: get_release(release_id=10).
Inputs: release_id (required), realtime_end, realtime_start. Returns: object
get_release_datesGet dates for a releaseBRead-only
Get release dates for a specific FRED release. Example: get_release_dates(release_id=10).
Inputs: release_id (required), limit, offset, sort_order, +3 more. Returns: object
get_release_seriesList series in a releaseARead-only
List FRED series published in a release. Example: get_release_series(release_id=10, limit=20).
Inputs: release_id (required), limit, offset, order_by, +7 more. Returns: object
get_release_sourcesGet sources for a releaseARead-only
Get sources that publish a FRED release. Example: get_release_sources(release_id=10).
Inputs: release_id (required), realtime_end, realtime_start. Returns: object
get_release_tablesGet tables for a releaseBRead-only
Get release tables (structured layouts) for a FRED release. Example: get_release_tables(release_id=53).
Inputs: release_id (required), element_id, observation_date, include_observation_values. Returns: object
get_release_tagsGet tags for a releaseCRead-only
Get tags for series in a FRED release. Example: get_release_tags(release_id=10).
Inputs: release_id (required), limit, offset, order_by, +6 more. Returns: object
get_seriesGet FRED series metadataARead-only
Get metadata for a FRED economic data series by series ID. Example: get_series(series_id='GNPCA').
Inputs: series_id (required), realtime_end, realtime_start. Returns: object
get_series_categoriesGet categories for a FRED seriesBRead-only
Get the categories that contain a FRED series. Example: get_series_categories(series_id='CPIAUCSL').
Inputs: series_id (required), realtime_end, realtime_start. Returns: object
get_series_observationsGet FRED series observationsARead-only
Get observations (data values) for a FRED series with optional unit transforms, frequency aggregation, and date filters. Example: get_series_observations(series_id='GNPCA', observation_start='2000-01-01').
Inputs: series_id (required), limit, units, offset, +9 more. Returns: object
get_series_releaseGet release for a FRED seriesARead-only
Get the release that publishes a FRED series. Example: get_series_release(series_id='CPIAUCSL').
Inputs: series_id (required), realtime_end, realtime_start. Returns: object
get_series_tagsGet tags for a FRED seriesARead-only
Get tags assigned to a FRED series. Example: get_series_tags(series_id='CPIAUCSL').
Inputs: series_id (required), order_by, sort_order, realtime_end, +1 more. Returns: object
get_series_updatesGet recently updated seriesARead-only
List FRED series sorted by when observations were last updated. Example: get_series_updates(filter_value='macro', limit=20).
Inputs: limit, offset, end_time, start_time, +3 more. Returns: object
get_series_vintage_datesGet vintage dates for a FRED seriesARead-only
Get vintage dates when a series was revised or new values were released. Example: get_series_vintage_dates(series_id='CPIAUCSL').
Inputs: series_id (required), limit, offset, sort_order, +2 more. Returns: object
get_sourceGet a FRED sourceBRead-only
Get metadata for a FRED source by source ID. Example: get_source(source_id=1).
Inputs: source_id (required), realtime_end, realtime_start. Returns: object
get_source_releasesList releases for a sourceBRead-only
List releases published by a FRED source. Example: get_source_releases(source_id=1, limit=20).
Inputs: source_id (required), limit, offset, order_by, +3 more. Returns: object
get_tags_seriesList series by tagsBRead-only
List FRED series matching one or more tags. Example: get_tags_series(tag_names='gdp;usa', limit=10).
Inputs: tag_names (required), limit, offset, order_by, +4 more. Returns: object
list_release_datesList release dates for all releasesARead-only
List release dates across all FRED releases. Example: list_release_dates(limit=50).
Inputs: limit, offset, order_by, sort_order, +3 more. Returns: object
list_releasesList FRED releasesCRead-only
List all FRED releases of economic data. Example: list_releases(limit=20).
Inputs: limit, offset, order_by, sort_order, +2 more. Returns: object
list_sourcesList FRED sourcesBRead-only
List FRED data sources (providers). Example: list_sources(limit=20).
Inputs: limit, offset, order_by, sort_order, +2 more. Returns: object
list_tagsList FRED tagsBRead-only
Search or list FRED tags with optional filters. Example: list_tags(search_text='gdp', limit=20).
Inputs: limit, offset, order_by, tag_names, +5 more. Returns: object
search_seriesSearch FRED seriesARead-only
Search FRED series by text or series ID with optional tag filters. Example: search_series(search_text='inflation', limit=10).
Inputs: search_text (required), limit, offset, order_by, +8 more. Returns: object
search_series_tagsGet tags for a FRED series searchBRead-only
Get tags associated with a FRED series search, optionally filtered by tag name, group, or search text. Example: search_series_tags(series_search_text='gdp').
Inputs: series_search_text (required), limit, offset, order_by, +6 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools have clearly distinct purposes based on resource and action, but reverse relationships like get_source_releases vs get_release_sources and the many tag-related variants (e.g., get_related_tags, get_category_related_tags) could cause confusion if descriptions are not carefully read. Overall, the names and descriptions do an adequate job of disambiguating.
The server generally follows a get_<resource>_<detail> pattern with list_ and search_ prefixes for broader operations. However, there are minor inconsistencies such as get_series_updates (a listing operation) and the confusing name get_tags_series (which returns series, not tags) that deviate from the otherwise predictable scheme.
With 31 tools, the server exceeds the typical range and feels heavy. While the FRED API is broad, the tool set could be consolidated, especially the many tag-related and reverse-relationship tools, without losing functionality.
The tool set provides comprehensive coverage of FRED's data model, including series metadata, observations, categories, releases, sources, and tags, as well as search and vintage date functionality. No obvious gaps are apparent for the server's stated purpose.
Maintenance
Related MCP Connectors
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
Query SEC EDGAR filings, XBRL financials, and company data via MCP. STDIO or Streamable HTTP.
Equip AI with tools for researching economic data from Federal Reserve Economic Data (FRED).
FRED macro data, Treasury yields, FX rates & macro indicators for AI agents. Pay-per-query via x402.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables 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.401-
- FlicenseAqualityDmaintenanceEnables searching and retrieving economic data from the Federal Reserve Economic Data (FRED) API, including time series, categories, releases, and popular indicators.71-
- AlicenseNot gradedqualityBmaintenanceSearch and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP, with STDIO or Streamable HTTP transport.232 npm1Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables browsing, keyword/tag searching, and retrieval of any of the 800,000+ FRED economic time series, with support for date ranges, frequency aggregation, and unit transformations such as percent change or natural log. It also supports both stdio and streamable HTTP transports with caching and rate-limit handling.312 npmAGPL 3.0