@openclawcash/mcp-server 0.1.12 → 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
@@ -10,6 +10,7 @@ Canonical docs page: `https://openclawcash.com/mcp`
10
10
 
11
11
  Wallet and profile tools:
12
12
 
13
+ - `skill_latest` (public install metadata; no API key required)
13
14
  - `wallets_list`
14
15
  - `wallet_get`
15
16
  - `transactions_list`
@@ -59,6 +60,8 @@ Polymarket tools:
59
60
  - `polymarket_clear_integration`
60
61
  - `polymarket_activity`
61
62
  - `polymarket_positions`
63
+ - `polymarket_redeemable`
64
+ - `polymarket_redeem`
62
65
 
63
66
  Utility tool:
64
67
 
@@ -102,7 +105,7 @@ Set one of these environment variables:
102
105
  - `OPENCLAWCASH_AGENT_KEY`
103
106
  - `AGENTWALLETAPI_KEY`
104
107
 
105
- All MCP tools require an OpenClawCash agent key because they call the authenticated agent API, including read tools such as `swap_quote` and `supported_tokens_list`.
108
+ Most MCP tools require an OpenClawCash agent key because they call authenticated agent API routes. `skill_latest` is the only no-auth tool and calls `GET /api/public/agentwalletapi/skill/latest`.
106
109
 
107
110
  Optional base URL override:
108
111
 
@@ -286,7 +289,10 @@ The MCP server itself does not hold approval memory. The MCP client or agent run
286
289
 
287
290
  - `swap_quote` is read-only, but still requires an agent key.
288
291
  - `supported_tokens_list` is read-only, but still requires an agent key.
292
+ - `skill_latest` is read-only and does not require an agent key.
289
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`.
290
296
  - `transfer_send` is for normal wallet transfers. For checkout escrow funding, use checkout tools:
291
297
  - `checkout_quick_pay` for direct settlement funding
292
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.12";
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
 
@@ -102,6 +102,7 @@ const walletSelectorSchema = walletSelectorBaseSchema.refine(
102
102
  const walletsListArgsSchema = z.object({
103
103
  includeBalances: z.boolean().optional(),
104
104
  });
105
+ const skillLatestArgsSchema = z.object({}).strict();
105
106
 
106
107
  const balancesArgsSchema = z
107
108
  .object({
@@ -270,6 +271,17 @@ const polymarketRedeemArgsSchema = z
270
271
  walletAddress: z.string().min(1).optional(),
271
272
  tokenId: z.string().min(1).optional(),
272
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(),
273
285
  })
274
286
  .refine((data) => [data.walletId, data.walletAddress].filter((v) => v !== undefined).length === 1, {
275
287
  message: "Provide exactly one of walletId or walletAddress.",
@@ -478,6 +490,23 @@ function withWriteSafety(description) {
478
490
  }
479
491
 
480
492
  const tools = [
493
+ {
494
+ name: "skill_latest",
495
+ description:
496
+ "Get the latest published OpenClawCash skill version, GitHub repo URL, and install instructions. Public endpoint, no API key required.",
497
+ inputSchema: {
498
+ type: "object",
499
+ properties: {},
500
+ additionalProperties: false,
501
+ },
502
+ parse: (args) => skillLatestArgsSchema.parse(args ?? {}),
503
+ execute: async () =>
504
+ callAgentApi({
505
+ method: "GET",
506
+ pathName: "/api/public/agentwalletapi/skill/latest",
507
+ requireAuth: false,
508
+ }),
509
+ },
481
510
  {
482
511
  name: "wallets_list",
483
512
  description: "List managed wallets accessible to the configured OpenClawCash agent key.",
@@ -1430,9 +1459,29 @@ const tools = [
1430
1459
  query: args,
1431
1460
  }),
1432
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
+ },
1433
1482
  {
1434
1483
  name: "polymarket_redeem",
1435
- 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."),
1436
1485
  inputSchema: {
1437
1486
  type: "object",
1438
1487
  properties: {
@@ -1440,6 +1489,11 @@ const tools = [
1440
1489
  walletAddress: { type: "string" },
1441
1490
  tokenId: { type: "string", description: "Optional outcome tokenId. Omit to redeem all redeemable positions." },
1442
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
+ },
1443
1497
  },
1444
1498
  additionalProperties: false,
1445
1499
  },
@@ -1474,13 +1528,14 @@ const resources = [
1474
1528
  text: [
1475
1529
  "# OpenClawCash MCP Quickstart",
1476
1530
  "",
1477
- "1. Configure `OPENCLAWCASH_AGENT_KEY` or `AGENTWALLETAPI_KEY`.",
1478
- "2. Use `wallets_list` first to discover managed wallets.",
1479
- "3. Use `wallet_get` or `balances_get` before write actions.",
1480
- "4. For writes, establish approval mode once per session.",
1481
- "5. For checkout escrow funding, use `checkout_fund` (quick-pay first, swap fallback when needed).",
1482
- "6. Use `swap_quote` before `swap_execute` for non-checkout swaps.",
1483
- "7. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel/redeem and inspect account/activity/positions via polymarket tools.",
1531
+ "1. Run `skill_latest` to fetch the latest skill version, GitHub repo URL, and install instructions.",
1532
+ "2. Configure `OPENCLAWCASH_AGENT_KEY` or `AGENTWALLETAPI_KEY` for authenticated tools.",
1533
+ "3. Use `wallets_list` first to discover managed wallets.",
1534
+ "4. Use `wallet_get` or `balances_get` before write actions.",
1535
+ "5. For writes, establish approval mode once per session.",
1536
+ "6. For checkout escrow funding, use `checkout_fund` (quick-pay first, swap fallback when needed).",
1537
+ "7. Use `swap_quote` before `swap_execute` for non-checkout swaps.",
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.",
1484
1539
  ].join("\n"),
1485
1540
  },
1486
1541
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclawcash/mcp-server",
3
- "version": "0.1.12",
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",