@rackspay/wallet-mcp 1.2.1 → 1.2.3

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 +29 -6
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -579,19 +579,42 @@ 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
- .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 } : {}) });
604
+ .describe("Maximum USDC to deposit into the payment channel (e.g. '0.50' for 50 cents, '1' for $1). " +
605
+ "Controls how much the agent is willing to spend. For session-based APIs (OpenAI, LLMs) " +
606
+ "this caps the auto-deposit into the payment channel. Defaults to $1 if not set."),
607
+ }, async ({ url, method, body, headers, max_amount }) => {
608
+ const payload = { url };
609
+ if (method)
610
+ payload.method = method;
611
+ if (body)
612
+ payload.body = body;
613
+ if (headers)
614
+ payload.headers = headers;
615
+ if (max_amount)
616
+ payload.max_amount = max_amount;
617
+ const res = await request("POST", "/api/v1/agent/mpp", payload);
595
618
  if (!res.ok)
596
619
  return apiError(res, "MPP request failed");
597
620
  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.3",
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": {