@cyanheads/federal-reserve-mcp-server
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., "@@cyanheads/federal-reserve-mcp-serversearch for series related to 'inflation expectations'"
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.
Overview
Federal Reserve economic data from the FRED API (Federal Reserve Bank of St. Louis) — ~800K time series covering output, prices, employment, money, rates, housing, trade, and international macro. Search series, fetch metadata and observations, browse the category tree, look up releases, and query large result sets with SQL over DataCanvas. Runs as a stdio process or a local Streamable HTTP server.
Tools
Tool | Description |
| Full-text search across FRED series titles, tags, and notes |
| Fetch metadata for one or more series — title, units, frequency, observation range |
| Fetch date+value observations for one or more series, with date-range and unit-transform filtering |
| Navigate the FRED category tree |
| Look up a FRED release by ID or name search, with its associated series |
| List active DataCanvas dataframes with provenance, schema, and row count |
| Run a SELECT against registered DataCanvas dataframes via DuckDB SQL |
| Drop a DataCanvas dataframe by name (opt-in) |
Related MCP server: self-mcp-server
Capability reference
fedreserve_search_series tool
Full-text or series-ID search, with
frequency,units,seasonal_adjustment, andtag_namesfiltersPagination via
limit(default and max 1000) andoffset(max 4999; FRED caps searchable results at 5000)Output includes
active_filterswhen applied andpopularity(0–100) when FRED provides it; empty results suggest a broader query or category browsing
fedreserve_get_series tool
Accepts a single series ID or up to 50 in one call; fires parallel upstream requests (no FRED batch endpoint exists)
Returns title, units, frequency, seasonal adjustment, observation range, popularity, and notes per series
Partial-batch failures land in a
failedarray with per-ID error messages; a single unresolved ID throwsseries_not_foundinstead
fedreserve_get_observations tool
Accepts one series ID or up to 10, with
observation_start/observation_end, native unit transforms, and frequency downsampling viaaggregation_method(avg,sum,eop)Returns date/value observations with string values that preserve trailing zeros, plus per-series failures
Multi-series or >500-row results spill to DataCanvas, returning
dataset.nameforfedreserve_dataframe_query; without canvas, returns a truncated inline preview
fedreserve_browse_categories tool
Omit
category_idto start at the root (ID 0); returns the category, its child categories, and — for a leaf with no children — a sample of up to 10 seriesAn unknown
category_idthrowscategory_not_found
fedreserve_get_release tool
Exactly one of
release_id(integer) orrelease_search(case-insensitive substring, filtered client-side — FRED has no server-side release search) is requiredReturns release name, link, notes, upcoming scheduled dates, and a paginated series list (
series_limitmax 1000,series_offset)An ambiguous name search returns up to 10
search_alternativesinstead of guessing; retry with the exactrelease_id
fedreserve_dataframe_describe tool
Lists active DataCanvas dataframes for the tenant, or one by
name, newest firstEach entry carries
source_tool,query_params,created_at,expires_at,row_count,truncated/max_rows, andcolumn_schema
fedreserve_dataframe_query tool
Runs a single read-only DuckDB SELECT against
df_<id>tables, including joins, aggregates, window functions, and CTEs; external files and system catalogs are blockedrow_limitcaps returned rows (default 1000, max 10000);previewsets the inline sample. BIGINT results serialize as stringsOptional
register_aspersists the result as a new dataframe with its own TTL for further queries
fedreserve_dataframe_drop tool
Opt-in — enabled when
FRED_DATAFRAME_DROP_ENABLED=true; otherwise registered as a disabled tool card (visibility depends on the client's protocol version)Drops the named dataframe early; returns
dropped: falsewhen absent. TTL also reclaims expired tables
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
FRED-specific:
Dataframe tools require
CANVAS_PROVIDER_TYPE=duckdband reportcanvas_unavailableotherwiseFRED_API_KEY-gated access to the St. Louis Fed's FRED API (api.stlouisfed.org/fred) at up to 120 requests/minuteParallel multi-series fetching via
Promise.allSettled, with partial success reported per ID rather than failing the whole batchDataCanvas spillover for multi-series or >500-row observation results, queryable via
fedreserve_dataframe_queryFRED's native unit transformations and frequency downsampling delegated server-side for precision against the full series history
Category tree navigation across all FRED domains — Money & Banking, National Accounts, Employment, Prices, Housing, Trade, and more
Agent-friendly output:
Graceful partial failure —
fedreserve_get_seriesandfedreserve_get_observationsreturn per-IDfailedrows with error messages instead of failing the whole requestAmbiguous-input disambiguation —
fedreserve_get_release's name search returns typedsearch_alternativesinstead of guessing when multiple releases matchProvenance on DataCanvas output — every dataframe carries
source_tool,query_params, and TTL fields so agents can reason about where staged data came from and how long it's validDegrades gracefully —
fedreserve_get_observationsfalls back to a truncated inline preview with an explanatorymessagewhen DataCanvas isn't configured, rather than failing
Getting started
Add the following to your MCP client configuration file. Obtain a free FRED API key at research.stlouisfed.org/docs/api/api_key.html.
{
"mcpServers": {
"federal-reserve-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/federal-reserve-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"FRED_API_KEY": "your-api-key"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"federal-reserve-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/federal-reserve-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"FRED_API_KEY": "your-api-key"
}
}
}
}Or with Docker:
{
"mcpServers": {
"federal-reserve-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "FRED_API_KEY=your-api-key",
"ghcr.io/cyanheads/federal-reserve-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 FRED_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
A free FRED API key from stlouisfed.org. The key grants 120 requests/minute.
Installation
Clone the repository:
git clone https://github.com/cyanheads/federal-reserve-mcp-server.gitNavigate into the directory:
cd federal-reserve-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set FRED_API_KEYConfiguration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
Variable | Description | Default |
| Required. API key from stlouisfed.org. | — |
| Override the FRED API base URL. |
|
| Sliding TTL for DataCanvas-registered observation tables (seconds). |
|
| Set |
|
| Set to | — |
| Transport: |
|
| Port for HTTP server. |
|
| HTTP session posture: |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Storage backend. |
|
| Enable OpenTelemetry instrumentation. |
|
| Base OTLP URL for traces ( | — |
| Opt-in OTLP log endpoint, used as-is; the base endpoint does not enable logs. | — |
| Log failed tool arguments and results with key-name redaction; secrets in free-form values are not redacted. |
|
| Per-payload UTF-8 byte cap for failed-call logging. |
|
See .env.example for the full list of optional overrides.
Set CANVAS_PROVIDER_TYPE=duckdb to enable SQL over observation tables. npm installs and Docker images include the DuckDB runtime. Portable Claude Desktop bundles omit native bindings; use the npm or Docker installation for canvas mode.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t federal-reserve-mcp-server .
docker run --rm -e FRED_API_KEY=your-key -e MCP_TRANSPORT_TYPE=http -p 3010:3010 federal-reserve-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/federal-reserve-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| FRED API service — HTTP client, retry, 429 handling, key injection. |
| DataCanvas adapter — table naming, TTL/provenance tracking, SQL gate extras. |
| Unit and integration tests mirroring |
| Design and planning documents. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools in
src/mcp-server/tools/definitions/index.tsWrap FRED API calls: validate raw response → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Query SEC EDGAR filings, XBRL financials, and company data via MCP. STDIO or Streamable HTTP.
Search NPPES providers and resolve NUCC specialty codes via MCP over STDIO or Streamable HTTP.
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
Fetch US Bureau of Labor Statistics data — CPI, unemployment, wages, JOLTS, and more via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Federal Reserve Economic Data (FRED) API, providing access to over 800,000 economic time series like GDP and unemployment. It enables AI agents to search for data, retrieve metadata, and fetch historical observations directly from the St. Louis Fed.-
- FlicenseNot gradedqualityDmaintenanceFastMCP server for querying FRED financial and macroeconomic data, providing tools to search and retrieve economic indicators.-
- AlicenseNot gradedqualityAmaintenanceAccess FEC campaign finance data through MCP. Query data about candidates, money trails, and election filings. STDIO & Streamable HTTP.473 npm2Apache 2.0
- AlicenseBqualityCmaintenanceEnables querying and retrieving Federal Reserve Economic Data (FRED) including series, categories, releases, sources, and tags, with support for stdio and HTTP transports and bring-your-own-key authentication.3152 PyPI2MIT