@moonpay/cli 0.6.0 → 0.6.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/package.json
CHANGED
|
@@ -24,8 +24,11 @@ mp --help
|
|
|
24
24
|
## Auth commands
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
# Log in (
|
|
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`
|
|
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` (
|
|
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
|
|