z-zero-mcp-server 1.5.0 → 1.5.1

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
@@ -108,6 +108,21 @@ Get your Passport Key at: **[clawcard.store/dashboard/agents](https://www.clawca
108
108
 
109
109
  ---
110
110
 
111
+ ## Security: rotate-on-connect (v1.5.0+)
112
+
113
+ The key you copy from the dashboard (or paste into a chat) is only a **one-time bootstrap ticket**.
114
+ The moment your agent connects with it, the MCP server silently swaps it for a fresh key:
115
+
116
+ - The fresh key travels **server → MCP process → disk** and is stored in `~/.z-zero/credentials` (mode `0600`). It never appears in any LLM conversation, tool result, or config file.
117
+ - The pasted key is **dead within seconds** — a copy living in a chat transcript, clipboard, or screenshot can no longer be used by anyone.
118
+ - On startup the MCP loads the key from `~/.z-zero/credentials` first; the `Z_ZERO_API_KEY` env var is only a bootstrap fallback.
119
+
120
+ **One key = one machine.** All agents on the same machine (Claude Desktop, Claude Code, Cursor, …) share the same MCP install and the same credentials file — install once, every agent can pay. Connecting a *different* machine with a copied key rotates it, which instantly disconnects the original machine. That is deliberate: it blocks key sharing **and** doubles as an intrusion alarm — if your agent suddenly fails auth, someone else used your key; go to the dashboard and revoke.
121
+
122
+ Older self-hosted backends without the rotate endpoint keep working — the pasted key simply stays active as before.
123
+
124
+ ---
125
+
111
126
  ## Requirements
112
127
 
113
128
  - **Node.js v18+** — [nodejs.org](https://nodejs.org)
@@ -195,4 +210,4 @@ Cancel an unused token (refunds balance).
195
210
 
196
211
  ---
197
212
 
198
- *Security: Z-Zero never stores your Passport Key. It is passed via environment variables and card data exists only in volatile RAM during execution.*
213
+ *Security: the key you paste is never kept — it rotates the moment your agent first connects, and the fresh key lives only in a local owner-only file (`~/.z-zero/credentials`, mode 0600), never in any LLM conversation. Card data exists only in volatile RAM during execution.*
@@ -57,19 +57,17 @@ async function apiRequest(endpoint, method = 'GET', body = null) {
57
57
  }
58
58
  }
59
59
  async function internalApiRequest(endpoint, method, body) {
60
- // ✅ FIX 9: Validate INTERNAL_SECRET presence and minimum length
61
- if (!INTERNAL_SECRET || INTERNAL_SECRET.length < 16) {
62
- return { error: "CONFIG_ERROR", message: "INTERNAL_SECRET is missing or too short (min 16 chars)" };
63
- }
60
+ // Auth is the Bearer Passport Key — the server dropped the x-internal-secret
61
+ // gate on /resolve and /burn (redundant to per-user token ownership, Jul 2026).
62
+ // The old client-side CONFIG_ERROR check here broke execute_payment for every
63
+ // install configured per the current docs (key only). Secret is now attached
64
+ // only if present, as back-compat for self-hosted deployments that still gate on it.
64
65
  const url = `${API_BASE_URL.replace(/\/$/, '')}${endpoint}`;
65
66
  try {
66
- // Two independent factors on these PAN/burn endpoints:
67
- // - x-internal-secret: coarse platform gate (shared deploy secret)
68
- // - Authorization: Bearer <Passport Key>: per-user identity → server enforces token ownership
69
67
  const res = await fetch(url, {
70
68
  method,
71
69
  headers: {
72
- "x-internal-secret": INTERNAL_SECRET,
70
+ ...(INTERNAL_SECRET ? { "x-internal-secret": INTERNAL_SECRET } : {}),
73
71
  "Authorization": `Bearer ${(0, key_store_js_1.getPassportKey)()}`,
74
72
  "Content-Type": "application/json",
75
73
  "X-MCP-Version": version_js_1.CURRENT_MCP_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "z-zero-mcp-server",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Z-ZERO MCP Server — Secure JIT Virtual Card Payment tools for AI Agents (Claude, Cursor, AutoGPT) — Real Single-Use Virtual Cards, settled in USDC on Base",
5
5
  "main": "dist/index.js",
6
6
  "bin": {