@openclawcash/mcp-server 0.1.10 → 0.1.12
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 +22 -0
- package/openclawcash-mcp.mjs +59 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ Get Paid checkout tools:
|
|
|
50
50
|
Polymarket tools:
|
|
51
51
|
|
|
52
52
|
- `polymarket_market_resolve`
|
|
53
|
+
- `polymarket_market_search`
|
|
53
54
|
- `polymarket_order_limit`
|
|
54
55
|
- `polymarket_order_market`
|
|
55
56
|
- `polymarket_account`
|
|
@@ -173,6 +174,27 @@ Typical config shape:
|
|
|
173
174
|
}
|
|
174
175
|
```
|
|
175
176
|
|
|
177
|
+
## OpenAI Codex Example
|
|
178
|
+
|
|
179
|
+
If your OpenAI Codex environment supports MCP server configuration, use the same local stdio command pattern:
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"mcpServers": {
|
|
184
|
+
"openclawcash": {
|
|
185
|
+
"command": "npx",
|
|
186
|
+
"args": ["-y", "@openclawcash/mcp-server"],
|
|
187
|
+
"env": {
|
|
188
|
+
"OPENCLAWCASH_AGENT_KEY": "occ_your_api_key_here",
|
|
189
|
+
"OPENCLAWCASH_BASE_URL": "https://openclawcash.com"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
If your Codex setup expects a different config file location or wrapper schema, keep the same `command`, `args`, and `env` values and adapt only the surrounding structure required by that client.
|
|
197
|
+
|
|
176
198
|
## Cursor Example
|
|
177
199
|
|
|
178
200
|
You can print a config snippet with:
|
package/openclawcash-mcp.mjs
CHANGED
|
@@ -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.
|
|
10
|
+
const SERVER_VERSION = "0.1.12";
|
|
11
11
|
const PROTOCOL_VERSION = "2024-11-05";
|
|
12
12
|
const DEFAULT_BASE_URL = "https://openclawcash.com";
|
|
13
13
|
|
|
@@ -264,6 +264,17 @@ const polymarketCancelArgsSchema = z
|
|
|
264
264
|
message: "Provide exactly one of walletId or walletAddress.",
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
+
const polymarketRedeemArgsSchema = z
|
|
268
|
+
.object({
|
|
269
|
+
walletId: z.union([z.number().int().positive(), z.string().min(1)]).optional(),
|
|
270
|
+
walletAddress: z.string().min(1).optional(),
|
|
271
|
+
tokenId: z.string().min(1).optional(),
|
|
272
|
+
limit: z.number().int().positive().max(200).optional(),
|
|
273
|
+
})
|
|
274
|
+
.refine((data) => [data.walletId, data.walletAddress].filter((v) => v !== undefined).length === 1, {
|
|
275
|
+
message: "Provide exactly one of walletId or walletAddress.",
|
|
276
|
+
});
|
|
277
|
+
|
|
267
278
|
const polymarketUnlinkArgsSchema = z
|
|
268
279
|
.object({
|
|
269
280
|
walletId: z.union([z.number().int().positive(), z.string().min(1)]).optional(),
|
|
@@ -283,6 +294,11 @@ const polymarketMarketResolveArgsSchema = z
|
|
|
283
294
|
message: "Provide exactly one of marketUrl or slug.",
|
|
284
295
|
});
|
|
285
296
|
|
|
297
|
+
const polymarketMarketSearchArgsSchema = z.object({
|
|
298
|
+
query: z.string().min(2),
|
|
299
|
+
limit: z.number().int().positive().max(50).optional(),
|
|
300
|
+
});
|
|
301
|
+
|
|
286
302
|
const checkoutEscrowIdArgsSchema = z.object({
|
|
287
303
|
id: z.string().min(1),
|
|
288
304
|
});
|
|
@@ -1223,6 +1239,26 @@ const tools = [
|
|
|
1223
1239
|
query: args,
|
|
1224
1240
|
}),
|
|
1225
1241
|
},
|
|
1242
|
+
{
|
|
1243
|
+
name: "polymarket_market_search",
|
|
1244
|
+
description: "Search Polymarket markets by query text. Use this when market_resolve returns market_not_found.",
|
|
1245
|
+
inputSchema: {
|
|
1246
|
+
type: "object",
|
|
1247
|
+
properties: {
|
|
1248
|
+
query: { type: "string", description: "Search string for market slug/question." },
|
|
1249
|
+
limit: { type: "number", description: "Optional max results (1-50)." },
|
|
1250
|
+
},
|
|
1251
|
+
required: ["query"],
|
|
1252
|
+
additionalProperties: false,
|
|
1253
|
+
},
|
|
1254
|
+
parse: (args) => polymarketMarketSearchArgsSchema.parse(args ?? {}),
|
|
1255
|
+
execute: async (args) =>
|
|
1256
|
+
callAgentApi({
|
|
1257
|
+
method: "GET",
|
|
1258
|
+
pathName: "/api/agent/venues/polymarket/market/search",
|
|
1259
|
+
query: args,
|
|
1260
|
+
}),
|
|
1261
|
+
},
|
|
1226
1262
|
{
|
|
1227
1263
|
name: "polymarket_order_limit",
|
|
1228
1264
|
description: withWriteSafety("Place a Polymarket limit order from a configured polygon-mainnet wallet. Use this for explicit target-price orders; for close-position intent, prefer market SELL unless a limit price is explicitly requested."),
|
|
@@ -1394,6 +1430,27 @@ const tools = [
|
|
|
1394
1430
|
query: args,
|
|
1395
1431
|
}),
|
|
1396
1432
|
},
|
|
1433
|
+
{
|
|
1434
|
+
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."),
|
|
1436
|
+
inputSchema: {
|
|
1437
|
+
type: "object",
|
|
1438
|
+
properties: {
|
|
1439
|
+
walletId: { oneOf: [{ type: "integer" }, { type: "string" }] },
|
|
1440
|
+
walletAddress: { type: "string" },
|
|
1441
|
+
tokenId: { type: "string", description: "Optional outcome tokenId. Omit to redeem all redeemable positions." },
|
|
1442
|
+
limit: { type: "integer", description: "Optional max redeemable positions to scan (1-200, default 100)." },
|
|
1443
|
+
},
|
|
1444
|
+
additionalProperties: false,
|
|
1445
|
+
},
|
|
1446
|
+
parse: (args) => polymarketRedeemArgsSchema.parse(args ?? {}),
|
|
1447
|
+
execute: async (args) =>
|
|
1448
|
+
callAgentApi({
|
|
1449
|
+
method: "POST",
|
|
1450
|
+
pathName: "/api/agent/venues/polymarket/redeem",
|
|
1451
|
+
body: args,
|
|
1452
|
+
}),
|
|
1453
|
+
},
|
|
1397
1454
|
];
|
|
1398
1455
|
|
|
1399
1456
|
const resources = [
|
|
@@ -1423,7 +1480,7 @@ const resources = [
|
|
|
1423
1480
|
"4. For writes, establish approval mode once per session.",
|
|
1424
1481
|
"5. For checkout escrow funding, use `checkout_fund` (quick-pay first, swap fallback when needed).",
|
|
1425
1482
|
"6. Use `swap_quote` before `swap_execute` for non-checkout swaps.",
|
|
1426
|
-
"7. For Polymarket: ask your human to complete setup in dashboard (/venues/polymarket), then place/cancel
|
|
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.",
|
|
1427
1484
|
].join("\n"),
|
|
1428
1485
|
},
|
|
1429
1486
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclawcash/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
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",
|