@rackspay/wallet-mcp 1.2.1 → 1.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.
Files changed (2) hide show
  1. package/build/index.js +26 -4
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -579,19 +579,41 @@ server.tool("racks_mpp_request", "Make a paid HTTP request on behalf of this age
579
579
  "no manual approval or wallet management needed. " +
580
580
  "Use this to call any MPP-enabled API (LLM inference, image generation, web search, data feeds, etc.). " +
581
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.", {
582
+ "Requires USDC.e 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
+ "For POST endpoints (like OpenAI chat completions), set method to 'POST' and pass the request body.", {
584
585
  url: z
585
586
  .string()
586
587
  .url()
587
588
  .describe("The MPP-enabled API endpoint URL to call (must support HTTP 402 payment challenge)"),
589
+ method: z
590
+ .string()
591
+ .optional()
592
+ .describe("HTTP method — defaults to GET. Use POST for APIs that require a request body (e.g. OpenAI)."),
593
+ body: z
594
+ .record(z.unknown())
595
+ .optional()
596
+ .describe("JSON request body — required for POST endpoints. Example for OpenAI: { model: 'gpt-4o', messages: [...] }"),
597
+ headers: z
598
+ .record(z.string())
599
+ .optional()
600
+ .describe("Extra HTTP headers to include in the request (optional)."),
588
601
  max_amount: z
589
602
  .string()
590
603
  .optional()
591
604
  .describe("Maximum USDC amount willing to spend on this request (e.g. '0.10' for 10 cents). " +
592
605
  "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 } : {}) });
606
+ }, async ({ url, method, body, headers, max_amount }) => {
607
+ const payload = { url };
608
+ if (method)
609
+ payload.method = method;
610
+ if (body)
611
+ payload.body = body;
612
+ if (headers)
613
+ payload.headers = headers;
614
+ if (max_amount)
615
+ payload.max_amount = max_amount;
616
+ const res = await request("POST", "/api/v1/agent/mpp", payload);
595
617
  if (!res.ok)
596
618
  return apiError(res, "MPP request failed");
597
619
  const d = res.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rackspay/wallet-mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
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": {