@rackspay/wallet-mcp 1.0.5 → 1.1.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/build/index.js +42 -0
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -566,6 +566,48 @@ server.tool("racks_get_bet_positions", "List all open Polymarket positions for t
|
|
|
566
566
|
],
|
|
567
567
|
};
|
|
568
568
|
});
|
|
569
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
570
|
+
// Tool: racks_mpp_request
|
|
571
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
572
|
+
server.tool("racks_mpp_request", "Make a paid HTTP request on behalf of this agent using the Machine Payments Protocol (MPP / Tempo). " +
|
|
573
|
+
"The agent's Privy wallet automatically signs and pays the 402 payment challenge — " +
|
|
574
|
+
"no manual approval or wallet management needed. " +
|
|
575
|
+
"Use this to call any MPP-enabled API (LLM inference, image generation, web search, data feeds, etc.). " +
|
|
576
|
+
"Returns the API response data plus the on-chain Tempo payment receipt. " +
|
|
577
|
+
"Requires PathUSD (Tempo's USDC) at the agent's EVM wallet address on the Tempo chain. " +
|
|
578
|
+
"Bridge USDC to Tempo first using racks_bridge_usdc if the agent's Tempo balance is low.", {
|
|
579
|
+
url: z
|
|
580
|
+
.string()
|
|
581
|
+
.url()
|
|
582
|
+
.describe("The MPP-enabled API endpoint URL to call (must support HTTP 402 payment challenge)"),
|
|
583
|
+
max_amount: z
|
|
584
|
+
.string()
|
|
585
|
+
.optional()
|
|
586
|
+
.describe("Maximum USDC amount willing to spend on this request (e.g. '0.10' for 10 cents). " +
|
|
587
|
+
"Used for logging only — actual amount is determined by the server's 402 challenge."),
|
|
588
|
+
}, async ({ url, max_amount }) => {
|
|
589
|
+
const res = await request("POST", "/api/v1/agent/mpp", { url, ...(max_amount ? { max_amount } : {}) });
|
|
590
|
+
if (!res.ok)
|
|
591
|
+
return apiError(res, "MPP request failed");
|
|
592
|
+
const d = res.data;
|
|
593
|
+
return {
|
|
594
|
+
content: [
|
|
595
|
+
{
|
|
596
|
+
type: "text",
|
|
597
|
+
text: JSON.stringify({
|
|
598
|
+
success: true,
|
|
599
|
+
url: d.url,
|
|
600
|
+
wallet_address: d.wallet_address,
|
|
601
|
+
receipt: d.receipt,
|
|
602
|
+
data: d.data,
|
|
603
|
+
note: d.receipt
|
|
604
|
+
? "Payment completed. Receipt proves the Tempo on-chain settlement."
|
|
605
|
+
: "Request completed (no payment was required).",
|
|
606
|
+
}, null, 2),
|
|
607
|
+
},
|
|
608
|
+
],
|
|
609
|
+
};
|
|
610
|
+
});
|
|
569
611
|
// ============================================================================
|
|
570
612
|
// SERVER STARTUP
|
|
571
613
|
// ============================================================================
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rackspay/wallet-mcp",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "RACKS Wallet MCP — crypto trading and
|
|
3
|
+
"version": "1.1.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"
|