@pipeworx/mcp-rba 0.2.1 → 0.2.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/README.md +2 -2
- package/package.json +3 -3
- package/server.json +1 -1
- package/src/index.ts +37 -2
- package/src/server.ts +5 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ and any of the 71 published statistical tables (interest rates, bond yields,
|
|
|
5
5
|
CPI, monetary aggregates, and more), scraped keyless from RBA's own CSV
|
|
6
6
|
endpoints.
|
|
7
7
|
|
|
8
|
-
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to
|
|
8
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1819+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
|
|
9
9
|
|
|
10
10
|
## Tools
|
|
11
11
|
|
|
@@ -110,7 +110,7 @@ directly, instead of just this one's:
|
|
|
110
110
|
}
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Both URLs reach the same gateway and the same
|
|
113
|
+
Both URLs reach the same gateway and the same 1819+ data sources. The
|
|
114
114
|
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
115
115
|
reaches all of them from either one.
|
|
116
116
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipeworx/mcp-rba",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "RBA MCP — Reserve Bank of Australia statistics (free, no auth).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@cloudflare/workers-types": "^4.20260405.1"
|
|
27
27
|
},
|
|
28
28
|
"pipeworx": {
|
|
29
|
-
"sourceHash": "v1-
|
|
30
|
-
"sourceCommit": "
|
|
29
|
+
"sourceHash": "v1-9027e1b23bb9afae10c3d5e5bb0ca300add8a80ccef5528fe6f07682ec0fa03d",
|
|
30
|
+
"sourceCommit": "f5821587e59206a76fc200d1b9cbeaad15a549ab"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.pipeworx-io/rba",
|
|
4
4
|
"title": "Rba",
|
|
5
5
|
"description": "RBA MCP — Reserve Bank of Australia statistics (free, no auth).",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.2",
|
|
7
7
|
"websiteUrl": "https://pipeworx.io/packs/rba",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/pipeworx-io/mcp-rba",
|
package/src/index.ts
CHANGED
|
@@ -787,7 +787,7 @@ const tools: McpToolExport['tools'] = [
|
|
|
787
787
|
{
|
|
788
788
|
name: 'rba_cash_rate',
|
|
789
789
|
description:
|
|
790
|
-
"The Reserve Bank of Australia's official CASH RATE TARGET — Australia's benchmark monetary-policy interest rate (the AU equivalent of the US fed funds rate). PREFER OVER WEB SEARCH for \"what is the RBA cash rate\", \"Australian interest rate\", \"has the RBA cut rates\". Returns the current rate plus recent monthly history.",
|
|
790
|
+
"The Reserve Bank of Australia's official CASH RATE TARGET — Australia's benchmark monetary-policy interest rate (the AU equivalent of the US fed funds rate). PREFER OVER WEB SEARCH for \"what is the RBA cash rate\", \"Australian interest rate\", \"has the RBA cut rates\". Returns the current rate, the exact date it took effect, the previous rate and when that one took effect, plus recent decision history (table A2, one row per actual decision) — not just a monthly-average series to infer a decision date from. Also returns the F1.1 monthly-average history as before.",
|
|
791
791
|
inputSchema: {
|
|
792
792
|
type: 'object' as const,
|
|
793
793
|
properties: {
|
|
@@ -964,17 +964,52 @@ function seriesObservations(t: ParsedTable, seriesId: string, recent: number) {
|
|
|
964
964
|
|
|
965
965
|
async function cashRate(recent?: number) {
|
|
966
966
|
const n = Math.min(120, Math.max(1, recent ?? 12));
|
|
967
|
-
const t = await fetchTable('f1.1');
|
|
967
|
+
const [t, changes] = await Promise.all([fetchTable('f1.1'), fetchTable('a2')]);
|
|
968
968
|
const r = seriesObservations(t, 'FIRMMCRT', n);
|
|
969
969
|
if (!r) throw new Error('RBA cash rate series (FIRMMCRT) not found in table f1.1.');
|
|
970
970
|
const latest = r.observations[r.observations.length - 1] ?? null;
|
|
971
|
+
// FIRMMCRT (table F1.1) is a MONTHLY AVERAGE, not a point-in-time value — a
|
|
972
|
+
// mid-month decision blends into that month's figure, so it cannot answer
|
|
973
|
+
// "effective since" exactly (e.g. a 30-Sep decision barely moves the
|
|
974
|
+
// September average). Table A2 "Changes in Monetary Policy and Administered
|
|
975
|
+
// Rates" is "As announced" — one row per actual decision, with its exact
|
|
976
|
+
// date and the new target — so the computed fields come from there instead
|
|
977
|
+
// (fleet #3206).
|
|
978
|
+
const decisions = seriesObservations(changes, 'ARBAMPCNCRT', 999999);
|
|
979
|
+
const computed = decisions && decisions.observations.length > 0 ? computeFromDecisions(decisions.observations) : null;
|
|
971
980
|
return {
|
|
981
|
+
...(computed ?? {}),
|
|
972
982
|
series_id: 'FIRMMCRT',
|
|
973
983
|
name: r.series.name,
|
|
974
984
|
units: r.series.units,
|
|
975
985
|
current_rate: latest ? latest.value : null,
|
|
976
986
|
as_of: latest ? latest.date : null,
|
|
977
987
|
history: r.observations,
|
|
988
|
+
note:
|
|
989
|
+
'rate/effective_since/previous_rate/decision_history are computed from table A2 ("Changes in Monetary ' +
|
|
990
|
+
'Policy and Administered Rates" — one row per actual RBA decision, with its exact date). current_rate/' +
|
|
991
|
+
'as_of/history remain the F1.1 monthly-average series as before, which smooths over the exact decision ' +
|
|
992
|
+
'date and should not be used to answer "when did it last change".',
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/** {rate, effective_since, previous_rate, previous_rate_effective_since, decision_history, data_as_of} from ascending {date,value} decision rows (already one row per change — no de-duplication needed). */
|
|
997
|
+
function computeFromDecisions(obs: { date: string; value: number | null }[]) {
|
|
998
|
+
const pts = obs.filter((o) => o.value !== null) as { date: string; value: number }[];
|
|
999
|
+
if (pts.length === 0) return null;
|
|
1000
|
+
const current = pts[pts.length - 1];
|
|
1001
|
+
const previous = pts.length > 1 ? pts[pts.length - 2] : null;
|
|
1002
|
+
return {
|
|
1003
|
+
rate: current.value,
|
|
1004
|
+
unit: 'percent',
|
|
1005
|
+
effective_since: current.date,
|
|
1006
|
+
previous_rate: previous?.value ?? null,
|
|
1007
|
+
previous_rate_effective_since: previous?.date ?? null,
|
|
1008
|
+
decision_history: pts
|
|
1009
|
+
.slice(-5)
|
|
1010
|
+
.reverse()
|
|
1011
|
+
.map((p) => ({ rate: p.value, effective_since: p.date })),
|
|
1012
|
+
data_as_of: current.date,
|
|
978
1013
|
};
|
|
979
1014
|
}
|
|
980
1015
|
|
package/src/server.ts
CHANGED
|
@@ -8,8 +8,9 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
8
8
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
9
9
|
import pack from './index.js';
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
const server = new Server(
|
|
12
|
-
{ name: '@pipeworx/mcp-rba', version: '0.2.
|
|
13
|
+
{ name: '@pipeworx/mcp-rba', version: '0.2.2' },
|
|
13
14
|
{ capabilities: { tools: {} } },
|
|
14
15
|
);
|
|
15
16
|
|
|
@@ -24,7 +25,9 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
24
25
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
25
26
|
const { name, arguments: args } = request.params;
|
|
26
27
|
try {
|
|
27
|
-
const
|
|
28
|
+
const callArgs = { ...((args ?? {}) as Record<string, unknown>) };
|
|
29
|
+
|
|
30
|
+
const result = await pack.callTool(name, callArgs);
|
|
28
31
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
29
32
|
} catch (err) {
|
|
30
33
|
return {
|