@openclawcash/mcp-server 0.1.6 → 0.1.11
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 +46 -5
- 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.11";
|
|
11
11
|
const PROTOCOL_VERSION = "2024-11-05";
|
|
12
12
|
const DEFAULT_BASE_URL = "https://openclawcash.com";
|
|
13
13
|
|
|
@@ -118,6 +118,8 @@ const balancesArgsSchema = z
|
|
|
118
118
|
const transferArgsSchema = walletSelectorBaseSchema
|
|
119
119
|
.extend({
|
|
120
120
|
to: z.string().min(1),
|
|
121
|
+
amountDisplay: z.string().min(1).optional(),
|
|
122
|
+
valueBaseUnits: z.string().min(1).optional(),
|
|
121
123
|
amount: z.string().min(1).optional(),
|
|
122
124
|
value: z.string().min(1).optional(),
|
|
123
125
|
token: z.string().min(1).optional(),
|
|
@@ -126,8 +128,20 @@ const transferArgsSchema = walletSelectorBaseSchema
|
|
|
126
128
|
.refine((data) => [data.walletId, data.walletLabel, data.walletAddress].filter((value) => value !== undefined).length === 1, {
|
|
127
129
|
message: selectorDescription(),
|
|
128
130
|
})
|
|
129
|
-
.refine(
|
|
130
|
-
|
|
131
|
+
.refine(
|
|
132
|
+
(data) => [data.amountDisplay, data.amount].filter((value) => value !== undefined).length <= 1,
|
|
133
|
+
{ message: "Provide only one display amount field: amountDisplay (preferred) or amount." },
|
|
134
|
+
)
|
|
135
|
+
.refine(
|
|
136
|
+
(data) => [data.valueBaseUnits, data.value].filter((value) => value !== undefined).length <= 1,
|
|
137
|
+
{ message: "Provide only one base-units field: valueBaseUnits (preferred) or value." },
|
|
138
|
+
)
|
|
139
|
+
.refine((data) => {
|
|
140
|
+
const hasDisplay = data.amountDisplay !== undefined || data.amount !== undefined;
|
|
141
|
+
const hasBaseUnits = data.valueBaseUnits !== undefined || data.value !== undefined;
|
|
142
|
+
return (hasDisplay ? 1 : 0) + (hasBaseUnits ? 1 : 0) === 1;
|
|
143
|
+
}, {
|
|
144
|
+
message: "Provide exactly one amount field: amountDisplay (human units) OR valueBaseUnits (base units).",
|
|
131
145
|
});
|
|
132
146
|
|
|
133
147
|
const swapQuoteArgsSchema = walletSelectorBaseSchema
|
|
@@ -269,6 +283,11 @@ const polymarketMarketResolveArgsSchema = z
|
|
|
269
283
|
message: "Provide exactly one of marketUrl or slug.",
|
|
270
284
|
});
|
|
271
285
|
|
|
286
|
+
const polymarketMarketSearchArgsSchema = z.object({
|
|
287
|
+
query: z.string().min(2),
|
|
288
|
+
limit: z.number().int().positive().max(50).optional(),
|
|
289
|
+
});
|
|
290
|
+
|
|
272
291
|
const checkoutEscrowIdArgsSchema = z.object({
|
|
273
292
|
id: z.string().min(1),
|
|
274
293
|
});
|
|
@@ -565,8 +584,10 @@ const tools = [
|
|
|
565
584
|
walletAddress: { type: "string" },
|
|
566
585
|
chain: { type: "string", enum: ["evm", "solana"] },
|
|
567
586
|
to: { type: "string" },
|
|
568
|
-
|
|
569
|
-
|
|
587
|
+
amountDisplay: { type: "string", description: "Human-readable decimal amount (preferred)." },
|
|
588
|
+
valueBaseUnits: { type: "string", description: "Base-units integer amount (preferred)." },
|
|
589
|
+
amount: { type: "string", description: "DEPRECATED alias for amountDisplay." },
|
|
590
|
+
value: { type: "string", description: "DEPRECATED alias for valueBaseUnits." },
|
|
570
591
|
token: { type: "string" },
|
|
571
592
|
memo: { type: "string", description: "Solana-only memo." },
|
|
572
593
|
},
|
|
@@ -1207,6 +1228,26 @@ const tools = [
|
|
|
1207
1228
|
query: args,
|
|
1208
1229
|
}),
|
|
1209
1230
|
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "polymarket_market_search",
|
|
1233
|
+
description: "Search Polymarket markets by query text. Use this when market_resolve returns market_not_found.",
|
|
1234
|
+
inputSchema: {
|
|
1235
|
+
type: "object",
|
|
1236
|
+
properties: {
|
|
1237
|
+
query: { type: "string", description: "Search string for market slug/question." },
|
|
1238
|
+
limit: { type: "number", description: "Optional max results (1-50)." },
|
|
1239
|
+
},
|
|
1240
|
+
required: ["query"],
|
|
1241
|
+
additionalProperties: false,
|
|
1242
|
+
},
|
|
1243
|
+
parse: (args) => polymarketMarketSearchArgsSchema.parse(args ?? {}),
|
|
1244
|
+
execute: async (args) =>
|
|
1245
|
+
callAgentApi({
|
|
1246
|
+
method: "GET",
|
|
1247
|
+
pathName: "/api/agent/venues/polymarket/market/search",
|
|
1248
|
+
query: args,
|
|
1249
|
+
}),
|
|
1250
|
+
},
|
|
1210
1251
|
{
|
|
1211
1252
|
name: "polymarket_order_limit",
|
|
1212
1253
|
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."),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclawcash/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
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",
|