io.github.cyanheads/federal-reserve-mcp-server
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP.
Que pouvez-vous faire avec io.github.cyanheads/federal-reserve-mcp-server ?
- Requires a
FRED_API_KEYfor the FRED API (up to 120 requests/minute) - Unit transforms and frequency downsampling run on FRED's side against the full series history
- Large observation results spill to DataCanvas tables you can query with SQL
- Dataframe tools require
CANVAS_PROVIDER_TYPE=duckdband reportcanvas_unavailableotherwise - Partial failures:
fedreserve_get_seriesandfedreserve_get_observationsreturn per-IDfailedrows instead of failing the whole request - Ambiguous release names return
search_alternativesinstead of a guess - Every dataframe carries
source_tool,query_params, and TTL fields - Without DataCanvas,
fedreserve_get_observationsreturns a truncated inline preview with an explanatorymessage
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
@cyanheads/federal-reserve-mcp-serverclaude mcp add federal-reserve-mcp-server -e 'FRED_API_KEY=<FRED_API_KEY>' -e 'FRED_BASE_URL=https://api.stlouisfed.org/fred' -e 'FRED_DATASET_TTL_SECONDS=86400' -e 'FRED_DATAFRAME_DROP_ENABLED=false' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/federal-reserve-mcp-server@0.3.0
{
"mcpServers": {
"federal-reserve-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/federal-reserve-mcp-server@0.3.0"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"FRED_BASE_URL": "https://api.stlouisfed.org/fred",
"FRED_DATASET_TTL_SECONDS": "86400",
"FRED_DATAFRAME_DROP_ENABLED": "false",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Variables d'environnement
FRED_API_KEYobligatoire FRED API key from stlouisfed.org. Required to make any API calls.FRED_BASE_URLOverride the FRED API base URL.FRED_DATASET_TTL_SECONDSSliding TTL for DataCanvas-registered observation tables (seconds).FRED_DATAFRAME_DROP_ENABLEDSet to 'true' to enable fedreserve_dataframe_drop; otherwise it remains registered as disabled.MCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
@cyanheads/federal-reserve-mcp-serverclaude mcp add federal-reserve-mcp-server -e 'MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE>' -e 'FRED_API_KEY=<FRED_API_KEY>' -e 'FRED_BASE_URL=https://api.stlouisfed.org/fred' -e 'FRED_DATASET_TTL_SECONDS=86400' -e 'FRED_DATAFRAME_DROP_ENABLED=false' -e 'MCP_HTTP_HOST=127.0.0.1' -e 'MCP_HTTP_PORT=3010' -e 'MCP_HTTP_ENDPOINT_PATH=/mcp' -e 'MCP_AUTH_MODE=none' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/federal-reserve-mcp-server@0.3.0
{
"mcpServers": {
"federal-reserve-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/federal-reserve-mcp-server@0.3.0"
],
"env": {
"MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>",
"FRED_API_KEY": "<FRED_API_KEY>",
"FRED_BASE_URL": "https://api.stlouisfed.org/fred",
"FRED_DATASET_TTL_SECONDS": "86400",
"FRED_DATAFRAME_DROP_ENABLED": "false",
"MCP_HTTP_HOST": "127.0.0.1",
"MCP_HTTP_PORT": "3010",
"MCP_HTTP_ENDPOINT_PATH": "/mcp",
"MCP_AUTH_MODE": "none",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Variables d'environnement
MCP_TRANSPORT_TYPESelects the HTTP transport.FRED_API_KEYobligatoire FRED API key from stlouisfed.org. Required to make any API calls.FRED_BASE_URLOverride the FRED API base URL.FRED_DATASET_TTL_SECONDSSliding TTL for DataCanvas-registered observation tables (seconds).FRED_DATAFRAME_DROP_ENABLEDSet to 'true' to enable fedreserve_dataframe_drop; otherwise it remains registered as disabled.MCP_HTTP_HOSTThe hostname for the HTTP server.MCP_HTTP_PORTThe port to run the HTTP server on.MCP_HTTP_ENDPOINT_PATHThe endpoint path for the MCP server.MCP_AUTH_MODEAuthentication mode to use: 'none', 'jwt', or 'oauth'.MCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
@cyanheads/federal-reserve-mcp-server
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP. STDIO or Streamable HTTP.
8 Tools
Overview
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.
Tools
| 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) |
Capability reference
fedreserve_search_series tool
- Full-text or series-ID search, with
frequency,units,seasonal_adjustment, andtag_namesfilters;filter_variableandfilter_valuemust be supplied together or the call returnsinvalid_filter - Pagination via
limit(default and max 1000) andoffset(max 4999; FRED caps searchable results at 5000) - Output includes
active_filtersandpopularity(0–100) when available; empty results suggest a broader query or category browsing
fedreserve_get_series tool
- Accepts one series ID or up to 50 per call
- Returns title, units, frequency, seasonal adjustment, observation range, popularity, and notes per series
- Failed IDs in a batch land in a
failedarray with error messages; a single unresolved ID throwsseries_not_found
fedreserve_get_observations tool
- Accepts one series ID or up to 10, with
observation_start/observation_end(YYYY-MM-DD), native unit transforms, and frequency downsampling viaaggregation_method(avg,sum,eop) - Returns date/value observations (values are strings that keep trailing zeros) plus per-series failures
- Multi-series or >500-row results go to a DataCanvas table with a 20-row preview; the
noticenamesdataset.nameand thefedreserve_dataframe_describeandfedreserve_dataframe_querycalls to run next. Without canvas, you get a truncated inline preview
fedreserve_browse_categories tool
- Omit
category_idto start at the root (ID 0); returns the category and its children, or up to 10 sample series for a leaf - An unknown
category_idthrowscategory_not_found
fedreserve_get_release tool
- Takes exactly one of
release_idorrelease_search(case-insensitive name substring) - Returns release name, link, notes, the next five scheduled dates, and a paginated series list (
series_limitmax 1000,series_offset) - An ambiguous name returns up to 10
search_alternatives; retry with the exactrelease_id
fedreserve_dataframe_describe tool
- Lists active DataCanvas dataframes, newest first, or one by
name - Each entry carries
source_tool,query_params,created_at,expires_at,row_count,truncated/max_rows, andcolumn_schema
fedreserve_dataframe_query tool
- Runs one read-only DuckDB SELECT against
df_<id>tables (joins, aggregates, window functions, CTEs); external files, system catalogs, and engine-setting functions are blocked row_limitcaps returned rows (default 1000, max 10000) andpreviewsets the inline sample; BIGINT results serialize as stringsregister_assaves the result as a new dataframe with its own TTL
fedreserve_dataframe_drop tool
- Opt-in: enabled by
FRED_DATAFRAME_DROP_ENABLED=true, otherwise registered as disabled - Drops the named dataframe early; returns
dropped: falsewhen it doesn't exist
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:
- Requires a
FRED_API_KEYfor the FRED API (up to 120 requests/minute) - Unit transforms and frequency downsampling run on FRED's side against the full series history
- Large observation results spill to DataCanvas tables you can query with SQL
- Dataframe tools require
CANVAS_PROVIDER_TYPE=duckdband reportcanvas_unavailableotherwise
Agent-friendly output:
- Partial failures:
fedreserve_get_seriesandfedreserve_get_observationsreturn per-IDfailedrows instead of failing the whole request - Ambiguous release names return
search_alternativesinstead of a guess - Every dataframe carries
source_tool,query_params, and TTL fields - Without DataCanvas,
fedreserve_get_observationsreturns a truncated inline preview with an explanatorymessage
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/mcp
Prerequisites
- 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.git
- Navigate into the directory:
cd federal-reserve-mcp-server
- Install dependencies:
bun install
- Configure environment:
cp .env.example .env
# edit .env and set FRED_API_KEY
Configuration
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.
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: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
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.
Project structure
| 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. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools in
src/mcp-server/tools/definitions/index.ts - Wrap 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 test
License
Apache-2.0 — see LICENSE for details.
Questions fréquentes
Qu'est-ce que io.github.cyanheads/federal-reserve-mcp-server ?
Search and fetch ~800K Federal Reserve economic time-series from the FRED API via MCP.
Comment installer io.github.cyanheads/federal-reserve-mcp-server ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add federal-reserve-mcp-server -e 'FRED_API_KEY=<FRED_API_KEY>' -e 'FRED_BASE_URL=https://api.stlouisfed.org/fred' -e 'FRED_DATASET_TTL_SECONDS=86400' -e 'FRED_DATAFRAME_DROP_ENABLED=false' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/federal-reserve-mcp-server@0.3.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.cyanheads/federal-reserve-mcp-server ?
Oui. Il attend FRED_API_KEY, à renseigner dans sa configuration.
io.github.cyanheads/federal-reserve-mcp-server est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient io.github.cyanheads/federal-reserve-mcp-server ?
Il est publié par cyanheads. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.