Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP.
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP. STDIO or Streamable HTTP.
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.
| Tool | Description |
|---|---|
fedreserve_search_series | Full-text search across FRED series titles, tags, and notes |
fedreserve_get_series | Fetch metadata for one or more series — title, units, frequency, observation range |
fedreserve_get_observations | Fetch date+value observations for one or more series, with date-range and unit-transform filtering |
fedreserve_browse_categories | Navigate the FRED category tree |
fedreserve_get_release | Look up a FRED release by ID or name search, with its associated series |
fedreserve_dataframe_describe | List active DataCanvas dataframes with provenance, schema, and row count |
fedreserve_dataframe_query | Run a SELECT against registered DataCanvas dataframes via DuckDB SQL |
fedreserve_dataframe_drop | Drop a DataCanvas dataframe by name (opt-in) |
fedreserve_search_series toolfrequency, units, or seasonal_adjustment, plus semicolon-delimited tag_nameslimit (max 1000, default 1000) and offset (max 4999 — FRED caps searchable results at 5000)active_filters when any were applied, and a popularity score (0–100) when FRED provides onefedreserve_browse_categories; for a specific release's series, use fedreserve_get_release insteadfedreserve_get_series toolfailed array with per-ID error messages; a single unresolved ID throws series_not_found insteadfedreserve_get_observations toolobservation_start / observation_end, ISO 8601) and FRED's native unit transforms (lin, chg, ch1, pch, pc1, pca, cch, cca, log)aggregation_method (avg, sum, eop)dataset.name handle for fedreserve_dataframe_query; degrades to a truncated inline preview when canvas is unavailablefedreserve_browse_categories toolcategory_id to 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 seriescategory_id throws category_not_foundfedreserve_get_release toolrelease_id (integer) or release_search (case-insensitive substring, filtered client-side — FRED has no server-side release search) is requiredseries_limit max 1000, series_offset)search_alternatives instead of guessing; retry with the exact release_idfedreserve_dataframe_describe toolname, newest firstsource_tool, query_params, created_at, a sliding expires_at, row_count, truncated / max_rows, and full column_schemaCANVAS_PROVIDER_TYPE=duckdb; throws canvas_unavailable otherwisefedreserve_dataframe_query tooldf_<id> tables from fedreserve_get_observations — joins, aggregates, window functions, and CTEs supported; writes, DDL, DROP, COPY, PRAGMA, ATTACH, external-file table functions, and system catalogs are rejectedrow_limit caps materialized rows (default 1000, max 10000); preview controls how many are returned inlineregister_as persists the result as a new dataframe with its own TTL, for chaining without re-running the source SQLCANVAS_PROVIDER_TYPE=duckdb; throws canvas_unavailable otherwisefedreserve_dataframe_drop toolFRED_DATAFRAME_DROP_ENABLED=true; otherwise listed as a disabled tool carddropped: false when the named table doesn't exist, rather than erroringCANVAS_PROVIDER_TYPE=duckdb; throws canvas_unavailable otherwiseBuilt 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:
FRED_API_KEY-gated access to the St. Louis Fed's FRED API (api.stlouisfed.org/fred) at up to 120 requests/minutePromise.allSettled, with partial success reported per ID rather than failing the whole batchfedreserve_dataframe_queryAgent-friendly output:
fedreserve_get_series and fedreserve_get_observations return per-ID failed rows with error messages instead of failing the whole requestfedreserve_get_release's name search returns typed search_alternatives instead of guessing when multiple releases matchsource_tool, query_params, and TTL fields so agents can reason about where staged data came from and how long it's validfedreserve_get_observations falls back to a truncated inline preview with an explanatory message when DataCanvas isn't configured, rather than failingAdd 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/mcp
git clone https://github.com/cyanheads/federal-reserve-mcp-server.git
cd federal-reserve-mcp-server
bun install
cp .env.example .env
# edit .env and set FRED_API_KEY
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
| Variable | Description | Default |
|---|---|---|
FRED_API_KEY | Required. API key from stlouisfed.org. | — |
FRED_BASE_URL | Override the FRED API base URL. | https://api.stlouisfed.org/fred |
FRED_DATASET_TTL_SECONDS | Sliding TTL for DataCanvas-registered observation tables (seconds). | 86400 |
FRED_DATAFRAME_DROP_ENABLED | Set true to expose the fedreserve_dataframe_drop tool. | false |
CANVAS_PROVIDER_TYPE | Set to duckdb to enable DataCanvas SQL querying for observation results. | — |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_SESSION_MODE | HTTP session posture: auto, stateful, or stateless. Declared as stateless in src/index.ts — no tool holds per-session state. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run 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 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-server
The 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.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts). Eight tools across FRED domain and DataCanvas. |
src/services/fred | FRED API service — HTTP client, retry, 429 handling, key injection. |
src/services/canvas-bridge | DataCanvas adapter — table naming, TTL/provenance tracking, SQL gate extras. |
tests/ | Unit and integration tests mirroring src/. |
docs/ | Design and planning documents. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/mcp-server/tools/definitions/index.tsIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/federal-reserve-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-federal-reserve-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/federal-reserve-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/federal-reserve-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.