@pipeworx/mcp-fred 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Pipeworx
3
+ Copyright (c) 2026 Mojibake Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,17 +1,88 @@
1
- # mcp-fred
1
+ # FRED — Federal Reserve Economic Data
2
2
 
3
- FRED MCP — Federal Reserve Economic Data (St. Louis Fed)
3
+ The St. Louis Fed's data warehouse: 800,000+ economic time series spanning interest rates, inflation, employment, GDP, money supply, exchange rates, and metro-level indicators. The most authoritative, continuously updated source for US macro and monetary data — used by economists, policymakers, and journalists.
4
4
 
5
- Part of the [Pipeworx](https://pipeworx.io) open MCP gateway.
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1683+ live data sources.
6
6
 
7
- ## Tools
7
+ ## Why this matters for AI agents
8
8
 
9
- | Tool | Description |
10
- |------|-------------|
9
+ Most "what is the current X" macro questions resolve to a FRED series. An agent that knows the series ID can answer with the actual current value, not a training-data snapshot. Common ones:
10
+
11
+ - 30-year mortgage rate → `MORTGAGE30US`
12
+ - Federal funds rate → `DFF`
13
+ - CPI (all items) → `CPIAUCSL`
14
+ - Unemployment rate → `UNRATE`
15
+ - 10-year treasury yield → `DGS10`
16
+ - Housing starts → `HOUST`
17
+ - Case-Shiller home price index → `CSUSHPISA`
18
+
19
+ If your agent is answering a question about US macroeconomic state, the right pattern is `fred_search` (find the right series) → `fred_series_info` (confirm units and frequency) → `fred_get_series` (get the values).
20
+
21
+ ## Auth
22
+
23
+ FRED requires an API key. It's free at https://fred.stlouisfed.org/docs/api/api_key.html — takes 30 seconds, no payment, no rate-limit terror.
24
+
25
+ Pass via `_apiKey` per call:
26
+
27
+ ```js
28
+ fred_get_series({
29
+ series_id: "MORTGAGE30US",
30
+ _apiKey: "your-fred-api-key"
31
+ })
32
+ ```
33
+
34
+ Or subscribe to the [Housing Vertical](/docs/concepts/verticals) which manages the key for you.
35
+
36
+ ## Update cadence
37
+
38
+ | Series class | Update frequency |
39
+ |---|---|
40
+ | Daily series (rates, exchange rates) | Daily, ~1 business day lag |
41
+ | Weekly (mortgage rates) | Weekly, Thursday |
42
+ | Monthly (CPI, unemployment, retail sales) | Monthly, ~2-3 weeks after month end |
43
+ | Quarterly (GDP) | Quarterly, ~1 month after quarter end |
44
+
45
+ Pipeworx caches FRED responses with TTLs matching these cadences — see [caching and freshness](/docs/concepts/caching-and-freshness).
46
+
47
+ ## Citable URI
48
+
49
+ Embed in your output for stable citations:
50
+
51
+ ```
52
+ pipeworx://fred/series/{series_id}
53
+ pipeworx://fred/series/{series_id}/observations
54
+ ```
55
+
56
+ Other agents (and `resources/read`) can resolve these to the current value of the series.
57
+
58
+ ## Reading a `fred_get_series` response
59
+
60
+ | Field | What it is |
61
+ |---|---|
62
+ | `count` | How many observations FRED holds for the requested window. |
63
+ | `returned` | How many are in `observations` — `limit` caps this at 20 by default. |
64
+ | `truncated` | True when `returned < count`; `note` says so in words. |
65
+ | `observation_order` | `newest_first` (default) or `oldest_first` (`sort_order: "asc"`). |
66
+ | `observation_start` / `observation_end` | The series' **real coverage**, from FRED's series metadata. |
67
+ | `requested_start` / `requested_end` | The window you asked for. Absent when you asked for none. |
68
+
69
+ The last two rows are the one to know about. FRED's observations endpoint echoes
70
+ `observation_start`/`observation_end` back as it received them, and substitutes
71
+ `1600-01-01` / `9999-12-31` when the caller sets neither — so this pack used to
72
+ report that US GDP ran from 1600 through 9999. Those names now carry the coverage
73
+ from the series metadata, matching what `fred_series_info` and `fred_search`
74
+ already mean by them.
75
+
76
+ ## Common pitfalls
77
+
78
+ - **Vintages**: FRED preserves historical "vintages" (data as it was reported at time T). Default tool calls get the latest revised series. Pass `realtime_start` and `realtime_end` for as-of queries.
79
+ - **Frequency aggregation**: `frequency` parameter coerces to a different cadence (e.g., daily → monthly average). Default is the series' native frequency.
80
+ - **Units transformation**: `units` parameter computes derived series at request time (`pch` for percent change, `pca` for compound annual rate, etc.). Don't compute these client-side; let FRED do it.
81
+ - **Series renamed**: occasionally the Fed deprecates a series and creates a successor. Old IDs return errors. `fred_search` is the recovery path.
11
82
 
12
83
  ## Quick Start
13
84
 
14
- Add to your MCP client config:
85
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
15
86
 
16
87
  ```json
17
88
  {
@@ -23,12 +94,92 @@ Add to your MCP client config:
23
94
  }
24
95
  ```
25
96
 
26
- Or use the CLI:
97
+ ### What this endpoint actually serves
98
+
99
+ `tools/list` at `https://gateway.pipeworx.io/fred/mcp` returns the tools in the table
100
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
101
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
102
+ gateway-wide set. So the tool count you see is larger than this table: a
103
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
104
+ pack's own. The connection's `initialize` response states its exact scope, and
105
+ is the authoritative answer for a given day.
106
+
107
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
108
+ scoped connection answer a question this pack does not cover — via
109
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
110
+ second MCP server. There is currently no way to mount a pack endpoint without
111
+ them; if the extra schemas cost you more context than the routing is worth,
112
+ connect to the full gateway once rather than to several pack endpoints.
113
+
114
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
115
+ directly, instead of just this one's:
116
+
117
+ ```json
118
+ {
119
+ "mcpServers": {
120
+ "pipeworx": {
121
+ "url": "https://gateway.pipeworx.io/mcp"
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ Both URLs reach the same gateway and the same 1683+ data sources. The
128
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
129
+ reaches all of them from either one.
130
+
131
+ ## No MCP client? Call it over HTTP
132
+
133
+ ```bash
134
+ curl -X POST https://gateway.pipeworx.io/v1/tools/fred_get_series \
135
+ -H 'Content-Type: application/json' \
136
+ -d '{"series_id":"MORTGAGE30US"}'
137
+ ```
138
+
139
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/fred_get_series`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
140
+
141
+ ## Standalone (no gateway account)
142
+
143
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
144
+ gateway round-trip:
145
+
146
+ ```json
147
+ {
148
+ "mcpServers": {
149
+ "fred": {
150
+ "command": "npx",
151
+ "args": ["-y", "@pipeworx/mcp-fred"]
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ Or run it directly to confirm it starts:
27
158
 
28
159
  ```bash
29
- npx pipeworx use fred
160
+ npx -y @pipeworx/mcp-fred
30
161
  ```
31
162
 
163
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
164
+ for **only** this pack's tools — none of the shared meta-tools the gateway
165
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
166
+
167
+ ## Using with ask_pipeworx
168
+
169
+ Instead of calling tools directly, you can ask questions in plain English —
170
+ this works on the pack endpoint above as well as on the full gateway:
171
+
172
+ ```
173
+ ask_pipeworx({ question: "your question about Fred data" })
174
+ ```
175
+
176
+ The gateway picks the right tool and fills the arguments automatically.
177
+
178
+ ## More
179
+
180
+ - [Docs and guides](https://pipeworx.io/docs)
181
+ - [pipeworx.io](https://pipeworx.io)
182
+
32
183
  ## License
33
184
 
34
185
  MIT
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@pipeworx/mcp-fred",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "FRED MCP — Federal Reserve Economic Data (St. Louis Fed)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-fred": "bin/cli.js"
10
+ },
8
11
  "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "fred"],
9
12
  "license": "MIT",
10
13
  "repository": {
11
14
  "type": "git",
12
- "url": "https://github.com/pipeworx-io/mcp-fred"
15
+ "url": "git+https://github.com/pipeworx-io/mcp-fred.git"
13
16
  },
14
17
  "scripts": {
15
18
  "typecheck": "tsc --noEmit"
16
19
  },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
17
24
  "devDependencies": {
18
- "typescript": "^5.7.0"
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-bec1e873c36524537ea0d9a959b7ca09dc1a811b5ba15e1b9a438d068ded2b59",
30
+ "sourceCommit": "91681e9a4a137fa0051d58e32f38c64b6334af5c"
19
31
  }
20
32
  }
package/server.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.pipeworx-io/fred",
4
- "title": "fred",
4
+ "title": "Fred",
5
5
  "description": "FRED MCP — Federal Reserve Economic Data (St. Louis Fed)",
6
- "version": "0.1.0",
6
+ "version": "0.1.2",
7
7
  "websiteUrl": "https://pipeworx.io/packs/fred",
8
8
  "repository": {
9
9
  "url": "https://github.com/pipeworx-io/mcp-fred",