@openclawcash/mcp-server 0.1.2 → 0.1.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.
package/README.md CHANGED
@@ -58,6 +58,8 @@ Set one of these environment variables:
58
58
  - `OPENCLAWCASH_AGENT_KEY`
59
59
  - `AGENTWALLETAPI_KEY`
60
60
 
61
+ 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`.
62
+
61
63
  Optional base URL override:
62
64
 
63
65
  - `OPENCLAWCASH_BASE_URL`
@@ -217,8 +219,10 @@ The MCP server itself does not hold approval memory. The MCP client or agent run
217
219
 
218
220
  ## Notes
219
221
 
220
- - `swap_quote` is read-only.
222
+ - `swap_quote` is read-only, but still requires an agent key.
223
+ - `supported_tokens_list` is read-only, but still requires an agent key.
221
224
  - `transfer_send`, `swap_execute`, `approve_token`, `wallet_create`, and `wallet_import` are write tools.
225
+ - For `wallet_get`, `transactions_list`, `supported_tokens_list`, and `swap_quote`, pass at most one wallet selector when using `walletId`, `walletLabel`, or `walletAddress`.
222
226
  - The server uses stdio transport and is intended for MCP-compatible desktop or agent clients.
223
227
 
224
228
  ## Standalone Packaging Notes
@@ -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.1";
10
+ const SERVER_VERSION = "0.1.3";
11
11
  const PROTOCOL_VERSION = "2024-11-05";
12
12
  const DEFAULT_BASE_URL = "https://openclawcash.com";
13
13
 
@@ -130,13 +130,16 @@ const transferArgsSchema = walletSelectorBaseSchema
130
130
  message: "Provide exactly one of amount or value.",
131
131
  });
132
132
 
133
- const swapQuoteArgsSchema = z.object({
134
- network: z.string().min(1),
135
- tokenIn: z.string().min(1),
136
- tokenOut: z.string().min(1),
137
- amountIn: z.string().min(1),
138
- chain: z.enum(["evm", "solana"]).optional(),
139
- });
133
+ const swapQuoteArgsSchema = walletSelectorBaseSchema
134
+ .extend({
135
+ network: z.string().min(1),
136
+ tokenIn: z.string().min(1),
137
+ tokenOut: z.string().min(1),
138
+ amountIn: z.string().min(1),
139
+ })
140
+ .refine((data) => [data.walletId, data.walletLabel, data.walletAddress].filter((value) => value !== undefined).length <= 1, {
141
+ message: selectorDescription(),
142
+ });
140
143
 
141
144
  const swapExecuteArgsSchema = z
142
145
  .object({
@@ -165,10 +168,13 @@ const approveArgsSchema = z
165
168
  message: "Provide exactly one of walletId or walletAddress.",
166
169
  });
167
170
 
168
- const supportedTokensArgsSchema = z.object({
169
- network: z.string().min(1).optional(),
170
- chain: z.enum(["evm", "solana"]).optional(),
171
- });
171
+ const supportedTokensArgsSchema = walletSelectorBaseSchema
172
+ .extend({
173
+ network: z.string().min(1).optional(),
174
+ })
175
+ .refine((data) => [data.walletId, data.walletLabel, data.walletAddress].filter((value) => value !== undefined).length <= 1, {
176
+ message: selectorDescription(),
177
+ });
172
178
 
173
179
  const createWalletArgsSchema = z.object({
174
180
  label: z.string().min(1),
@@ -354,6 +360,9 @@ const tools = [
354
360
  properties: {
355
361
  network: { type: "string", description: "Example: mainnet, sepolia, solana-mainnet." },
356
362
  chain: { type: "string", enum: ["evm", "solana"] },
363
+ walletId: { oneOf: [{ type: "integer" }, { type: "string" }], description: "Optional wallet selector for history-linked activity." },
364
+ walletLabel: { type: "string", description: "Optional wallet selector for history-linked activity." },
365
+ walletAddress: { type: "string", description: "Optional wallet selector for history-linked activity." },
357
366
  },
358
367
  additionalProperties: false,
359
368
  },
@@ -363,7 +372,6 @@ const tools = [
363
372
  method: "GET",
364
373
  pathName: "/api/agent/supported-tokens",
365
374
  query: args,
366
- requireAuth: false,
367
375
  }),
368
376
  },
369
377
  {
@@ -400,6 +408,9 @@ const tools = [
400
408
  type: "object",
401
409
  properties: {
402
410
  network: { type: "string" },
411
+ walletId: { oneOf: [{ type: "integer" }, { type: "string" }], description: "Optional wallet selector for history-linked activity." },
412
+ walletLabel: { type: "string", description: "Optional wallet selector for history-linked activity." },
413
+ walletAddress: { type: "string", description: "Optional wallet selector for history-linked activity." },
403
414
  tokenIn: { type: "string" },
404
415
  tokenOut: { type: "string" },
405
416
  amountIn: { type: "string" },
@@ -416,7 +427,6 @@ const tools = [
416
427
  pathName: "/api/agent/quote",
417
428
  query: { network },
418
429
  body,
419
- requireAuth: false,
420
430
  });
421
431
  },
422
432
  },
@@ -666,7 +676,7 @@ async function runSelfTest() {
666
676
  capabilities: {},
667
677
  clientInfo: {
668
678
  name: "openclawcash-self-test",
669
- version: "0.1.1",
679
+ version: SERVER_VERSION,
670
680
  },
671
681
  },
672
682
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclawcash/mcp-server",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "OpenClawCash MCP server for managed agent wallets, balances, transfers, swaps, and approvals.",
5
5
  "type": "module",
6
6
  "license": "Proprietary",