Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @cyanheads/federal-reserve-mcp-server
MCP client config
{
"mcpServers": {
"federal-reserve": {
"command": "npx",
"args": [
"-y",
"@cyanheads/federal-reserve-mcp-server"
]
}
}
}Run
npx -y @cyanheads/federal-reserve-mcp-server
MCP client config
{
"mcpServers": {
"federal-reserve": {
"command": "npx",
"args": [
"-y",
"@cyanheads/federal-reserve-mcp-server"
]
}
}
}Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP. STDIO or Streamable HTTP.
Economic data from FRED, the St. Louis Fed's database of ~800K time series on output, prices, employment, money, rates, housing, and trade. Search series, pull observations, browse categories and releases, and run SQL over large results.
| 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, seasonal_adjustment, and tag_names filters; filter_variable and filter_value must be supplied together or the call returns invalid_filterlimit (default and max 1000) and offset (max 4999; FRED caps searchable results at 5000)active_filters and popularity (0–100) when available; empty results suggest a broader query or category browsingfedreserve_get_series toolfailed array with error messages; a single unresolved ID throws series_not_foundfedreserve_get_observations toolobservation_start / observation_end (YYYY-MM-DD), native unit transforms, and frequency downsampling via aggregation_method (avg, sum, eop)notice names dataset.name and the fedreserve_dataframe_describe and fedreserve_dataframe_query calls to run next. Without canvas, you get a truncated inline previewfedreserve_browse_categories toolcategory_id to start at the root (ID 0); returns the category and its children, or up to 10 sample series for a leafcategory_id throws category_not_foundfedreserve_get_release toolrelease_id or release_search (case-insensitive name substring)series_limit max 1000, series_offset)search_alternatives; retry with the exact release_idfedreserve_dataframe_describe toolnamesource_tool, query_params, created_at, expires_at, row_count, truncated / max_rows, and column_schemafedreserve_dataframe_query tooldf_<id> tables (joins, aggregates, window functions, CTEs); external files, system catalogs, and engine-setting functions are blockedrow_limit caps returned rows (default 1000, max 10000) and preview sets the inline sample; BIGINT results serialize as stringsregister_as saves the result as a new dataframe with its own TTLfedreserve_dataframe_drop toolFRED_DATAFRAME_DROP_ENABLED=true, otherwise registered as disableddropped: false when it doesn't existBuilt 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 for the FRED API (up to 120 requests/minute)CANVAS_PROVIDER_TYPE=duckdb and report canvas_unavailable otherwiseAgent-friendly output:
fedreserve_get_series and fedreserve_get_observations return per-ID failed rows instead of failing the whole requestsearch_alternatives instead of a guesssource_tool, query_params, and TTL fieldsfedreserve_get_observations returns a truncated inline preview with an explanatory messageAdd 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 | TTL for DataCanvas observation tables, in seconds. | 86400 |
FRED_DATAFRAME_DROP_ENABLED | Set true to enable fedreserve_dataframe_drop; otherwise registered as disabled. | 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 mode: auto, stateful, or stateless. | 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 |
OTEL_EXPORTER_OTLP_ENDPOINT | Base OTLP URL for traces (/v1/traces) and metrics (/v1/metrics). | — |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | OTLP log endpoint (logs are off unless set). | — |
LOG_TOOL_FAILURE_PAYLOADS | Log failed tool arguments and results with key-name redaction; secrets in free-form values are not redacted. | false |
LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES | Byte cap per logged payload. | 16384 |
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.
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.