@moonpay/cli 0.6.0 → 0.6.2

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/dist/index.js CHANGED
@@ -23,12 +23,12 @@ import {
23
23
  walletList,
24
24
  walletRetrieve,
25
25
  x402Request
26
- } from "./chunk-DCHEUKV7.js";
26
+ } from "./chunk-P764SORF.js";
27
27
  import {
28
28
  KEY_CHAIN_MAP,
29
29
  chainSchema,
30
30
  findWalletOrThrow
31
- } from "./chunk-GSAFAKB7.js";
31
+ } from "./chunk-AL5WDHLT.js";
32
32
 
33
33
  // src/index.ts
34
34
  import { createRequire } from "module";
@@ -575,7 +575,7 @@ function printUpdateNotice() {
575
575
  if (notice) process.stderr.write(notice);
576
576
  }
577
577
  program.command("mcp").description("Start MCP server over stdio (for Claude Desktop, Claude Code, etc.)").action(async () => {
578
- const { startMcpServer } = await import("./mcp-6IZ4QWFM.js");
578
+ const { startMcpServer } = await import("./mcp-PNM25UVD.js");
579
579
  await startMcpServer();
580
580
  });
581
581
  function getOrCreateGroup(parent, segments) {
@@ -14,8 +14,8 @@ import {
14
14
  walletList,
15
15
  walletRetrieve,
16
16
  x402Request
17
- } from "./chunk-DCHEUKV7.js";
18
- import "./chunk-GSAFAKB7.js";
17
+ } from "./chunk-P764SORF.js";
18
+ import "./chunk-AL5WDHLT.js";
19
19
 
20
20
  // src/mcp.ts
21
21
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -148,4 +148,4 @@ async function startMcpServer() {
148
148
  export {
149
149
  startMcpServer
150
150
  };
151
- //# sourceMappingURL=mcp-6IZ4QWFM.js.map
151
+ //# sourceMappingURL=mcp-PNM25UVD.js.map
@@ -8,7 +8,7 @@ import {
8
8
  removeWallet,
9
9
  resolveSigningKey,
10
10
  saveWallets
11
- } from "./chunk-GSAFAKB7.js";
11
+ } from "./chunk-AL5WDHLT.js";
12
12
  export {
13
13
  addWallet,
14
14
  findWallet,
@@ -19,4 +19,4 @@ export {
19
19
  resolveSigningKey,
20
20
  saveWallets
21
21
  };
22
- //# sourceMappingURL=store-UAGR3DWU.js.map
22
+ //# sourceMappingURL=store-QVVENVIP.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,8 +24,11 @@ mp --help
24
24
  ## Auth commands
25
25
 
26
26
  ```bash
27
- # Log in (opens browser for OAuth)
28
- mp login
27
+ # Log in (sends OTP to email)
28
+ mp login --email user@example.com
29
+
30
+ # Verify OTP code
31
+ mp verify --email user@example.com --code 123456
29
32
 
30
33
  # Check current user
31
34
  mp user retrieve
@@ -64,15 +67,32 @@ mp wallet delete --wallet "my-wallet" --confirm
64
67
  ## Workflow
65
68
 
66
69
  1. Run `mp user retrieve` to check if authenticated.
67
- 2. If it fails, run `mp login` (opens browser).
70
+ 2. If it fails, run `mp login --email <email>`, then `mp verify --email <email> --code <code>`.
68
71
  3. Run `mp wallet list` to see local wallets.
69
72
  4. If no wallets, create one: `mp wallet create --name "default"`.
70
73
 
74
+ ## Autonomous login
75
+
76
+ Agents can log in without human intervention if they have access to the user's email. For example, with the `gog` CLI (Google Workspace):
77
+
78
+ ```bash
79
+ # 1. Send OTP
80
+ mp login --email user@example.com
81
+
82
+ # 2. Read the OTP code from email
83
+ gog gmail search "Your MoonPay verification code" --max-results 1
84
+
85
+ # 3. Verify with the code
86
+ mp verify --email user@example.com --code <code>
87
+ ```
88
+
89
+ This enables fully autonomous agent setup — no human in the loop.
90
+
71
91
  ## Config locations
72
92
 
73
93
  - **Wallets:** `~/.config/moonpay/wallets.json` (encrypted, AES-256-GCM)
74
94
  - **Encryption key:** OS keychain (`moonpay-cli` / `encryption-key`)
75
- - **Credentials:** `~/.config/moonpay/credentials.json` (OAuth tokens)
95
+ - **Credentials:** `~/.config/moonpay/credentials.json` (encrypted, AES-256-GCM)
76
96
  - **Config:** `~/.config/moonpay/config.json` (base URL, client ID)
77
97
 
78
98
  ## Security
@@ -14,7 +14,8 @@ Configure the MoonPay CLI as an MCP server so Claude Desktop, Claude Code, or an
14
14
 
15
15
  ```bash
16
16
  npm i -g @moonpay/cli
17
- mp login
17
+ mp login --email user@example.com
18
+ mp verify --email user@example.com --code <code>
18
19
  ```
19
20
 
20
21
  ## Claude Code setup
@@ -56,7 +57,7 @@ After setup, ask Claude: "What MoonPay tools do you have?" — it should list al
56
57
 
57
58
  ## Auth
58
59
 
59
- The MCP server uses the same credentials as the CLI (`~/.config/moonpay/credentials.json`). Run `mp login` to authenticate.
60
+ The MCP server uses the same credentials as the CLI (`~/.config/moonpay/credentials.json`). Run `mp login --email <email>` then `mp verify --email <email> --code <code>` to authenticate.
60
61
 
61
62
  ## Related skills
62
63