z-zero-mcp-server 1.0.5 → 1.0.7
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 +1 -1
- package/dist/api_backend.js +9 -2
- package/dist/index.js +22 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
|
|
|
21
21
|
"mcpServers": {
|
|
22
22
|
"openclaw": {
|
|
23
23
|
"command": "npx",
|
|
24
|
-
"args": ["-y", "z-zero-mcp-server"],
|
|
24
|
+
"args": ["-y", "z-zero-mcp-server@latest"],
|
|
25
25
|
"env": {
|
|
26
26
|
"Z_ZERO_API_KEY": "zk_live_your_passport_key_here"
|
|
27
27
|
}
|
package/dist/api_backend.js
CHANGED
|
@@ -55,7 +55,11 @@ async function getBalanceRemote(cardAlias) {
|
|
|
55
55
|
const card = cards.find((c) => c.alias === cardAlias);
|
|
56
56
|
if (!card)
|
|
57
57
|
return null;
|
|
58
|
-
return {
|
|
58
|
+
return {
|
|
59
|
+
wallet_balance: card.balance,
|
|
60
|
+
currency: card.currency,
|
|
61
|
+
note: "This is the total wallet balance (human-level). Cards have 'limits' set at creation, not 'balances'. Use list_cards to see active token limits."
|
|
62
|
+
};
|
|
59
63
|
}
|
|
60
64
|
async function getDepositAddressesRemote() {
|
|
61
65
|
return await apiRequest('/api/tokens/cards', 'GET');
|
|
@@ -71,6 +75,9 @@ async function issueTokenRemote(cardAlias, amount, merchant) {
|
|
|
71
75
|
});
|
|
72
76
|
if (!data)
|
|
73
77
|
return null;
|
|
78
|
+
// Forward API errors (402 insufficient, 429 max cards, etc.)
|
|
79
|
+
if (data.error)
|
|
80
|
+
return data;
|
|
74
81
|
// Adapt Dashboard API response to MCP expected format
|
|
75
82
|
return {
|
|
76
83
|
token: data.token,
|
|
@@ -78,7 +85,7 @@ async function issueTokenRemote(cardAlias, amount, merchant) {
|
|
|
78
85
|
amount: amount,
|
|
79
86
|
merchant: merchant,
|
|
80
87
|
created_at: Date.now(),
|
|
81
|
-
ttl_seconds: 1800,
|
|
88
|
+
ttl_seconds: 1800,
|
|
82
89
|
used: false
|
|
83
90
|
};
|
|
84
91
|
}
|
package/dist/index.js
CHANGED
|
@@ -42,12 +42,16 @@ server.tool("list_cards", "List all available virtual card aliases and their bal
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
const cards = data?.cards || [];
|
|
45
|
+
const activeTokens = data?.active_tokens || [];
|
|
46
|
+
const recentTokens = data?.recent_tokens || [];
|
|
45
47
|
return {
|
|
46
48
|
content: [
|
|
47
49
|
{
|
|
48
50
|
type: "text",
|
|
49
51
|
text: JSON.stringify({
|
|
50
52
|
cards,
|
|
53
|
+
active_tokens: activeTokens,
|
|
54
|
+
recent_tokens: recentTokens,
|
|
51
55
|
note: "Use card aliases to request payment tokens. Never ask for real card numbers.",
|
|
52
56
|
}, null, 2),
|
|
53
57
|
},
|
|
@@ -57,7 +61,7 @@ server.tool("list_cards", "List all available virtual card aliases and their bal
|
|
|
57
61
|
// ============================================================
|
|
58
62
|
// TOOL 2: Check card balance (safe)
|
|
59
63
|
// ============================================================
|
|
60
|
-
server.tool("check_balance", "Check the
|
|
64
|
+
server.tool("check_balance", "Check the wallet balance (human-level total). This is the spendable USD available for issuing new cards. Cards themselves have 'limits' (set at creation), not 'balances' — use list_cards to see active token limits.", {
|
|
61
65
|
card_alias: zod_1.z
|
|
62
66
|
.string()
|
|
63
67
|
.describe("The alias of the card to check, e.g. 'Card_01'"),
|
|
@@ -68,7 +72,7 @@ server.tool("check_balance", "Check the remaining balance of a virtual card by i
|
|
|
68
72
|
content: [{
|
|
69
73
|
type: "text",
|
|
70
74
|
text: "❌ AUTHENTICATION REQUIRED: Your Z_ZERO_API_KEY (Passport Key) is missing from the MCP configuration.\n\n" +
|
|
71
|
-
"👉 Please GET your key here: https://clawcard.store/dashboard/agents\n" +
|
|
75
|
+
"👉 Please GET your key here: https://www.clawcard.store/dashboard/agents\n" +
|
|
72
76
|
"👉 Then SET it as the 'Z_ZERO_API_KEY' environment variable and RESTART."
|
|
73
77
|
}],
|
|
74
78
|
isError: true
|
|
@@ -104,7 +108,7 @@ server.tool("get_deposit_addresses", "Get your unique deposit addresses for EVM
|
|
|
104
108
|
content: [{
|
|
105
109
|
type: "text",
|
|
106
110
|
text: "❌ AUTHENTICATION REQUIRED: Your Z_ZERO_API_KEY (Passport Key) is missing from the MCP configuration.\n\n" +
|
|
107
|
-
"👉 Please GET your key here: https://clawcard.store/dashboard/agents\n" +
|
|
111
|
+
"👉 Please GET your key here: https://www.clawcard.store/dashboard/agents\n" +
|
|
108
112
|
"👉 Then SET it as the 'Z_ZERO_API_KEY' environment variable and RESTART."
|
|
109
113
|
}],
|
|
110
114
|
isError: true
|
|
@@ -116,7 +120,7 @@ server.tool("get_deposit_addresses", "Get your unique deposit addresses for EVM
|
|
|
116
120
|
content: [
|
|
117
121
|
{
|
|
118
122
|
type: "text",
|
|
119
|
-
text: "Failed to retrieve deposit addresses. Please ensure your Z_ZERO_API_KEY (Passport Key) is valid. You can find it at https://clawcard.store/dashboard/agents",
|
|
123
|
+
text: "Failed to retrieve deposit addresses. Please ensure your Z_ZERO_API_KEY (Passport Key) is valid. You can find it at https://www.clawcard.store/dashboard/agents",
|
|
120
124
|
},
|
|
121
125
|
],
|
|
122
126
|
isError: true,
|
|
@@ -167,12 +171,22 @@ server.tool("request_payment_token", "Request a temporary payment token for a sp
|
|
|
167
171
|
content: [{
|
|
168
172
|
type: "text",
|
|
169
173
|
text: "❌ AUTHENTICATION REQUIRED: Your Z_ZERO_API_KEY (Passport Key) is missing from the MCP configuration.\n\n" +
|
|
170
|
-
"👉 Please GET your key here: https://clawcard.store/dashboard/agents"
|
|
174
|
+
"👉 Please GET your key here: https://www.clawcard.store/dashboard/agents"
|
|
171
175
|
}],
|
|
172
176
|
isError: true
|
|
173
177
|
};
|
|
174
178
|
}
|
|
175
179
|
if (!token || token.error) {
|
|
180
|
+
// Show actual API error if available (e.g. 429 max cards, 402 insufficient)
|
|
181
|
+
if (token?.message) {
|
|
182
|
+
return {
|
|
183
|
+
content: [{
|
|
184
|
+
type: "text",
|
|
185
|
+
text: `❌ ${token.message}`
|
|
186
|
+
}],
|
|
187
|
+
isError: true,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
176
190
|
const balanceData = await (0, api_backend_js_1.getBalanceRemote)(card_alias);
|
|
177
191
|
const balance = balanceData?.balance;
|
|
178
192
|
return {
|
|
@@ -227,7 +241,7 @@ server.tool("execute_payment", "Execute a payment using a temporary token. This
|
|
|
227
241
|
content: [{
|
|
228
242
|
type: "text",
|
|
229
243
|
text: "❌ AUTHENTICATION REQUIRED: Your Z_ZERO_API_KEY (Passport Key) is missing from the MCP configuration.\n\n" +
|
|
230
|
-
"👉 Please GET your key here: https://clawcard.store/dashboard/agents"
|
|
244
|
+
"👉 Please GET your key here: https://www.clawcard.store/dashboard/agents"
|
|
231
245
|
}],
|
|
232
246
|
isError: true
|
|
233
247
|
};
|
|
@@ -270,7 +284,7 @@ server.tool("execute_payment", "Execute a payment using a temporary token. This
|
|
|
270
284
|
// ============================================================
|
|
271
285
|
// TOOL 5: Cancel payment token (returns funds to wallet)
|
|
272
286
|
// ============================================================
|
|
273
|
-
server.tool("cancel_payment_token", "Cancel a payment token that has not been used yet. This will cancel the
|
|
287
|
+
server.tool("cancel_payment_token", "Cancel a payment token that has not been used yet. This will cancel the virtual card at the issuing network and refund the full amount back to the wallet. Use this when: (1) checkout price is higher than token amount, (2) purchase is no longer needed, or (3) human requests cancellation. IMPORTANT: Do NOT auto-cancel without human awareness — always inform the human first.", {
|
|
274
288
|
token: zod_1.z
|
|
275
289
|
.string()
|
|
276
290
|
.describe("The payment token to cancel"),
|
|
@@ -284,7 +298,7 @@ server.tool("cancel_payment_token", "Cancel a payment token that has not been us
|
|
|
284
298
|
content: [{
|
|
285
299
|
type: "text",
|
|
286
300
|
text: "❌ AUTHENTICATION REQUIRED: Your Z_ZERO_API_KEY (Passport Key) is missing from the MCP configuration.\n\n" +
|
|
287
|
-
"👉 Please GET your key here: https://clawcard.store/dashboard/agents"
|
|
301
|
+
"👉 Please GET your key here: https://www.clawcard.store/dashboard/agents"
|
|
288
302
|
}],
|
|
289
303
|
isError: true
|
|
290
304
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "z-zero-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Z-ZERO MCP Server — Secure JIT Virtual Card Payment tools for AI Agents (Claude,
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "Z-ZERO MCP Server — Secure JIT Virtual Card Payment tools for AI Agents (Claude, Cursor, AutoGPT) — Real Single-Use Visa Cards",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": "dist/index.js",
|
|
7
7
|
"scripts": {
|