@openclawcash/mcp-server 0.1.13 → 0.1.15

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
@@ -60,6 +60,8 @@ Polymarket tools:
60
60
  - `polymarket_clear_integration`
61
61
  - `polymarket_activity`
62
62
  - `polymarket_positions`
63
+ - `polymarket_redeemable`
64
+ - `polymarket_redeem`
63
65
 
64
66
  Utility tool:
65
67
 
@@ -289,6 +291,8 @@ The MCP server itself does not hold approval memory. The MCP client or agent run
289
291
  - `supported_tokens_list` is read-only, but still requires an agent key.
290
292
  - `skill_latest` is read-only and does not require an agent key.
291
293
  - `transfer_send`, `swap_execute`, `approve_token`, `wallet_create`, and `wallet_import` are write tools.
294
+ - `polymarket_redeemable` is read-only and lists redeemable tokenIds; use this first for targeted redeem.
295
+ - `polymarket_redeem` is a write tool. For `redeem all` (no tokenId), the API processes in chunks and returns `hasMoreRedeemable`; call again until it becomes `false`.
292
296
  - `transfer_send` is for normal wallet transfers. For checkout escrow funding, use checkout tools:
293
297
  - `checkout_quick_pay` for direct settlement funding
294
298
  - `checkout_swap_and_pay` for asset mismatch funding
@@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
7
7
  import { z } from "zod";
8
8
 
9
9
  const SERVER_NAME = "openclawcash";
10
- const SERVER_VERSION = "0.1.13";
10
+ const SERVER_VERSION = "0.1.16";
11
11
  const PROTOCOL_VERSION = "2024-11-05";
12
12
  const DEFAULT_BASE_URL = "https://openclawcash.com";
13
13
 
@@ -271,6 +271,17 @@ const polymarketRedeemArgsSchema = z
271
271
  walletAddress: z.string().min(1).optional(),
272
272
  tokenId: z.string().min(1).optional(),
273
273
  limit: z.number().int().positive().max(200).optional(),
274
+ signatureType: z.union([z.literal(0), z.literal(1), z.literal(2)]).optional(),
275
+ })
276
+ .refine((data) => [data.walletId, data.walletAddress].filter((v) => v !== undefined).length === 1, {
277
+ message: "Provide exactly one of walletId or walletAddress.",
278
+ });
279
+
280
+ const polymarketRedeemableArgsSchema = z
281
+ .object({
282
+ walletId: z.union([z.number().int().positive(), z.string().min(1)]).optional(),
283
+ walletAddress: z.string().min(1).optional(),
284
+ limit: z.number().int().positive().max(200).optional(),
274
285
  })
275
286
  .refine((data) => [data.walletId, data.walletAddress].filter((v) => v !== undefined).length === 1, {
276
287
  message: "Provide exactly one of walletId or walletAddress.",
@@ -482,7 +493,7 @@ const tools = [
482
493
  {
483
494
  name: "skill_latest",
484
495
  description:
485
- "Get the latest published OpenClawCash skill version, zip URLs, and install instructions. Public endpoint, no API key required.",
496
+ "Get the latest published OpenClawCash skill version, GitHub repo URL, and install instructions. Public endpoint, no API key required.",
486
497
  inputSchema: {
487
498
  type: "object",
488
499
  properties: {},
@@ -1448,9 +1459,29 @@ const tools = [
1448
1459
  query: args,
1449
1460
  }),
1450
1461
  },
1462
+ {
1463
+ name: "polymarket_redeemable",
1464
+ description: "List currently redeemable Polymarket positions and tokenIds for a configured polygon-mainnet wallet.",
1465
+ inputSchema: {
1466
+ type: "object",
1467
+ properties: {
1468
+ walletId: { oneOf: [{ type: "integer" }, { type: "string" }] },
1469
+ walletAddress: { type: "string" },
1470
+ limit: { type: "integer", description: "Optional max redeemable positions to scan (1-200)." },
1471
+ },
1472
+ additionalProperties: false,
1473
+ },
1474
+ parse: (args) => polymarketRedeemableArgsSchema.parse(args ?? {}),
1475
+ execute: async (args) =>
1476
+ callAgentApi({
1477
+ method: "GET",
1478
+ pathName: "/api/agent/venues/polymarket/redeemable",
1479
+ query: args,
1480
+ }),
1481
+ },
1451
1482
  {
1452
1483
  name: "polymarket_redeem",
1453
- description: withWriteSafety("Redeem Polymarket position(s) via gasless relay for a configured polygon-mainnet wallet. Pass tokenId to redeem one position, or omit tokenId to redeem all currently redeemable positions."),
1484
+ description: withWriteSafety("Redeem Polymarket position(s) for a configured polygon-mainnet wallet. The server picks the signing path from the wallet config: signatureType 0 redeems directly on-chain (small POL gas required); 1 / 2 redeems through Polymarket's gasless relayer. Run polymarket_redeemable first to pick a tokenId for single redeem. Omit tokenId to redeem all currently redeemable positions. All-mode is chunked; loop while hasMoreRedeemable=true. Response includes signingPath ('direct' | 'gasless') and signatureType."),
1454
1485
  inputSchema: {
1455
1486
  type: "object",
1456
1487
  properties: {
@@ -1458,6 +1489,11 @@ const tools = [
1458
1489
  walletAddress: { type: "string" },
1459
1490
  tokenId: { type: "string", description: "Optional outcome tokenId. Omit to redeem all redeemable positions." },
1460
1491
  limit: { type: "integer", description: "Optional max redeemable positions to scan (1-200, default 100)." },
1492
+ signatureType: {
1493
+ type: "integer",
1494
+ enum: [0, 1, 2],
1495
+ description: "Optional defensive assertion (0 = direct EOA, 1 = proxy, 2 = Gnosis Safe). Server returns 400 if it does not match the wallet's configured signing type. Omit to dispatch by wallet config.",
1496
+ },
1461
1497
  },
1462
1498
  additionalProperties: false,
1463
1499
  },
@@ -1492,14 +1528,14 @@ const resources = [
1492
1528
  text: [
1493
1529
  "# OpenClawCash MCP Quickstart",
1494
1530
  "",
1495
- "1. Run `skill_latest` to fetch the latest skill zip URL and install instructions.",
1531
+ "1. Run `skill_latest` to fetch the latest skill version, GitHub repo URL, and install instructions.",
1496
1532
  "2. Configure `OPENCLAWCASH_AGENT_KEY` or `AGENTWALLETAPI_KEY` for authenticated tools.",
1497
1533
  "3. Use `wallets_list` first to discover managed wallets.",
1498
1534
  "4. Use `wallet_get` or `balances_get` before write actions.",
1499
1535
  "5. For writes, establish approval mode once per session.",
1500
1536
  "6. For checkout escrow funding, use `checkout_fund` (quick-pay first, swap fallback when needed).",
1501
1537
  "7. Use `swap_quote` before `swap_execute` for non-checkout swaps.",
1502
- "8. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel/redeem and inspect account/activity/positions via polymarket tools.",
1538
+ "8. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel/redeem and inspect account/activity/positions/redeemable via polymarket tools.",
1503
1539
  ].join("\n"),
1504
1540
  },
1505
1541
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclawcash/mcp-server",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "OpenClawCash MCP server for managed agent wallets, balances, transfers, swaps, approvals, Get Paid checkout escrow flows, and Polymarket market resolution/order tools.",
5
5
  "type": "module",
6
6
  "license": "Proprietary",