@rackspay/wallet-mcp 1.0.5 → 1.2.0

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 CHANGED
@@ -1,8 +1,8 @@
1
1
  # @rackspay/wallet-mcp
2
2
 
3
- Crypto-native trading and betting infrastructure for AI agents via Model Context Protocol.
3
+ Crypto-native trading, betting, and machine payments for AI agents via Model Context Protocol.
4
4
 
5
- Trade perpetuals on Hyperliquid, place prediction market bets on Polymarket, and check on-chain balances — all from Claude Desktop or any MCP-compatible client.
5
+ Trade perpetuals on Hyperliquid, place prediction market bets on Polymarket, bridge USDC across chains, and pay for APIs autonomously using Tempo/MPP — all from Claude Desktop or any MCP-compatible client.
6
6
 
7
7
  ---
8
8
 
@@ -40,6 +40,9 @@ Go long 0.1 ETH on Hyperliquid at market price
40
40
  ```
41
41
  Find a Polymarket market on the US election and bet $20 on the leading outcome
42
42
  ```
43
+ ```
44
+ Fetch the latest AI news from https://mpp.dev/api/ping/paid
45
+ ```
43
46
 
44
47
  ---
45
48
 
@@ -48,7 +51,10 @@ Find a Polymarket market on the US election and bet $20 on the leading outcome
48
51
  | Tool | Description |
49
52
  |---|---|
50
53
  | `racks_get_status` | Agent name, wallet addresses, capabilities, and spend limits |
51
- | `racks_get_wallet_balance` | USDC balance across Arbitrum, Polygon, and HyperCore |
54
+ | `racks_get_wallet_balance` | USDC balance across Arbitrum, Polygon, Solana, HyperCore, and Tempo |
55
+ | `racks_bridge_usdc` | Bridge USDC between chains (Arbitrum ↔ Polygon ↔ Solana ↔ Tempo) |
56
+ | `racks_deposit_to_hypercore` | Move USDC from Arbitrum wallet into HyperCore for Hyperliquid trading |
57
+ | `racks_withdraw_from_hypercore` | Withdraw USDC from HyperCore back to Arbitrum wallet |
52
58
  | `racks_get_trade_account` | Full Hyperliquid account: margin, open positions, open orders |
53
59
  | `racks_get_positions` | Open perp positions with unrealized PnL |
54
60
  | `racks_place_order` | Place a limit or market order on Hyperliquid |
@@ -56,6 +62,7 @@ Find a Polymarket market on the US election and bet $20 on the leading outcome
56
62
  | `racks_get_markets` | Browse active Polymarket prediction markets |
57
63
  | `racks_place_bet` | Place a bet on a Polymarket outcome |
58
64
  | `racks_get_bet_positions` | Open Polymarket positions with current value |
65
+ | `racks_mpp_request` | Pay for any MPP-enabled API automatically via Tempo (HTTP 402 flow) |
59
66
 
60
67
  ---
61
68
 
@@ -73,7 +80,20 @@ Hyperliquid (builder code attached)
73
80
  Claude receives confirmation → position open
74
81
  ```
75
82
 
76
- Every order is signed server-side using the agent's embedded Privy wallet. Builder codes are attached automatically. Every action is logged with a full audit trail visible in your dashboard.
83
+ Every action is signed server-side using the agent's embedded Privy wallet. Builder codes are attached automatically for Hyperliquid. Every action is logged with a full audit trail visible in your dashboard.
84
+
85
+ ---
86
+
87
+ ## Machine Payments (MPP / Tempo)
88
+
89
+ `racks_mpp_request` lets your agent pay for any API that supports the [Machine Payments Protocol](https://mpp.dev). The agent's Privy wallet signs the 402 payment challenge automatically — no manual wallet management or API key setup needed.
90
+
91
+ ```
92
+ # Example: fetch a paid API result
93
+ racks_mpp_request("https://mpp.dev/api/ping/paid")
94
+ ```
95
+
96
+ The agent's existing EVM wallet address works on Tempo. Fund it with PathUSD (Tempo's USDC) via `racks_bridge_usdc` to enable paid requests.
77
97
 
78
98
  ---
79
99
 
@@ -92,6 +112,7 @@ Agents have per-capability permissions set from the dashboard:
92
112
 
93
113
  - **Trading** — required for Hyperliquid orders and positions
94
114
  - **Betting** — required for Polymarket bets and positions
115
+ - **MPP** — pay for APIs autonomously via Tempo
95
116
  - **Spend limits** — daily and monthly USDC caps enforced server-side
96
117
 
97
118
  Call `racks_get_status` to see what's enabled for your agent.
@@ -118,8 +139,6 @@ npm run build
118
139
 
119
140
  - **[`@rackspay/mcp-server`](https://www.npmjs.com/package/@rackspay/mcp-server)** — fiat payments: issue virtual cards, manage budgets, view transactions
120
141
  - **REST API** — direct integration via [api.wallet.rackspay.com/docs](https://api.wallet.rackspay.com/docs)
121
- - **Python SDK** — coming Q2 2026
122
- - **TypeScript SDK** — coming Q2 2026
123
142
 
124
143
  ---
125
144
 
@@ -127,6 +146,7 @@ npm run build
127
146
 
128
147
  - [Dashboard](https://wallet.rackspay.com)
129
148
  - [Documentation](https://wallet.rackspay.com/docs)
149
+ - [MPP Protocol](https://mpp.dev)
130
150
  - [MCP Protocol](https://modelcontextprotocol.io)
131
151
 
132
152
  ---
package/build/index.js CHANGED
@@ -139,8 +139,8 @@ server.tool("racks_get_status", "Check this agent's current status: name, wallet
139
139
  // Tool: racks_get_wallet_balance
140
140
  // ─────────────────────────────────────────────────────────────────────────────
141
141
  server.tool("racks_get_wallet_balance", "Return this agent's USDC balance on every chain: Arbitrum (primary), Polygon (Polymarket), " +
142
- "Solana, and HyperCore (funds deposited into Hyperliquid). " +
143
- "Use this before trading or betting to verify sufficient funds.", {}, async () => {
142
+ "Solana, HyperCore (funds deposited into Hyperliquid), and Tempo (PathUSD for MPP payments). " +
143
+ "Use this before trading, betting, or making MPP requests to verify sufficient funds.", {}, async () => {
144
144
  const res = await request("GET", "/api/v1/agent/wallet/balance");
145
145
  if (!res.ok)
146
146
  return apiError(res, "Failed to fetch wallet balance");
@@ -154,10 +154,15 @@ server.tool("racks_get_wallet_balance", "Return this agent's USDC balance on eve
154
154
  balance: {
155
155
  arbitrum_usdc: d.arbitrum_usdc,
156
156
  polygon_usdc: d.polygon_usdc,
157
+ solana_usdc: d.solana_usdc,
157
158
  hypercore_usdc: d.hypercore_usdc,
159
+ tempo_pathusd: d.tempo_pathusd,
158
160
  total_usdc: d.total_usdc,
159
161
  },
160
- note: "HyperCore balance is USDC already deposited into Hyperliquid for trading.",
162
+ notes: {
163
+ hypercore: "HyperCore balance is USDC already deposited into Hyperliquid for trading.",
164
+ tempo: "Tempo PathUSD is used for MPP machine-to-machine payments via racks_mpp_request.",
165
+ },
161
166
  }, null, 2),
162
167
  },
163
168
  ],
@@ -566,6 +571,48 @@ server.tool("racks_get_bet_positions", "List all open Polymarket positions for t
566
571
  ],
567
572
  };
568
573
  });
574
+ // ─────────────────────────────────────────────────────────────────────────────
575
+ // Tool: racks_mpp_request
576
+ // ─────────────────────────────────────────────────────────────────────────────
577
+ server.tool("racks_mpp_request", "Make a paid HTTP request on behalf of this agent using the Machine Payments Protocol (MPP / Tempo). " +
578
+ "The agent's Privy wallet automatically signs and pays the 402 payment challenge — " +
579
+ "no manual approval or wallet management needed. " +
580
+ "Use this to call any MPP-enabled API (LLM inference, image generation, web search, data feeds, etc.). " +
581
+ "Returns the API response data plus the on-chain Tempo payment receipt. " +
582
+ "Requires PathUSD (Tempo's USDC) at the agent's EVM wallet address on the Tempo chain. " +
583
+ "Bridge USDC to Tempo first using racks_bridge_usdc if the agent's Tempo balance is low.", {
584
+ url: z
585
+ .string()
586
+ .url()
587
+ .describe("The MPP-enabled API endpoint URL to call (must support HTTP 402 payment challenge)"),
588
+ max_amount: z
589
+ .string()
590
+ .optional()
591
+ .describe("Maximum USDC amount willing to spend on this request (e.g. '0.10' for 10 cents). " +
592
+ "Used for logging only — actual amount is determined by the server's 402 challenge."),
593
+ }, async ({ url, max_amount }) => {
594
+ const res = await request("POST", "/api/v1/agent/mpp", { url, ...(max_amount ? { max_amount } : {}) });
595
+ if (!res.ok)
596
+ return apiError(res, "MPP request failed");
597
+ const d = res.data;
598
+ return {
599
+ content: [
600
+ {
601
+ type: "text",
602
+ text: JSON.stringify({
603
+ success: true,
604
+ url: d.url,
605
+ wallet_address: d.wallet_address,
606
+ receipt: d.receipt,
607
+ data: d.data,
608
+ note: d.receipt
609
+ ? "Payment completed. Receipt proves the Tempo on-chain settlement."
610
+ : "Request completed (no payment was required).",
611
+ }, null, 2),
612
+ },
613
+ ],
614
+ };
615
+ });
569
616
  // ============================================================================
570
617
  // SERVER STARTUP
571
618
  // ============================================================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rackspay/wallet-mcp",
3
- "version": "1.0.5",
4
- "description": "RACKS Wallet MCP — crypto trading and betting infrastructure for AI agents. Trade perps on Hyperliquid, bet on Polymarket, and check on-chain balances via Claude Desktop or any MCP client.",
3
+ "version": "1.2.0",
4
+ "description": "RACKS Wallet MCP — crypto trading, betting, and MPP payments for AI agents. Trade perps on Hyperliquid, bet on Polymarket, pay APIs via Tempo/MPP, and check on-chain balances via Claude Desktop or any MCP client.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "rackswallet": "./build/index.js"
@@ -23,7 +23,11 @@
23
23
  "hyperliquid",
24
24
  "polymarket",
25
25
  "trading",
26
- "defi"
26
+ "defi",
27
+ "tempo",
28
+ "mpp",
29
+ "machine-payments",
30
+ "payments"
27
31
  ],
28
32
  "author": "Racks AI, Inc.",
29
33
  "license": "MIT",