@gvnrdao/dh-mcp 0.5.16 → 0.5.18

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
@@ -6,56 +6,49 @@ lending on a user's behalf, with a human approving every fund-moving step.
6
6
 
7
7
  ## Install
8
8
 
9
- Pick the row that matches your machine — the first two paths carry their own runtime,
10
- so there is **nothing to install first** (no Node, no npm):
9
+ Two paths, and **neither downloads a file**:
11
10
 
12
- | You are on | Install path |
11
+ | You want | How |
13
12
  |---|---|
14
- | **Claude Desktop (macOS / Windows)** | Download the bundle and open it (double-click / drag into Settings → Extensions): `https://assets.gvnr.xyz/dh-mcp/v0.5.2/dh-mcp-0.5.2.mcpb` — Claude Desktop runs it on its own embedded runtime; network and optional keystore are configured in the extension's settings UI (the password is held by the OS credential store, never written to a config file). |
15
- | **Linux — including Claude Desktop builds on Linux — or any other MCP host** | One line, no sudo: `curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh \| sh` — installs a self-contained binary (its own Node runtime inside) to `~/.dh-mcp/bin/dh-mcp`, verifies its SHA-256, and prints the exact `mcpServers` snippet. **Then wire the host:** Claude Code: `claude mcp add diamond-hands -- $HOME/.dh-mcp/bin/dh-mcp` (new session); Claude Desktop (Linux builds): the snippet in `~/.config/Claude/claude_desktop_config.json`, full quit + relaunch; other hosts: the snippet in their MCP config. Pin a version: `curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh \| DH_VERSION=0.5.2 sh` |
16
- | **Developers** (requires **Node ≥ 18 on PATH** — this path does NOT work on a bare machine) | Claude Code: `claude mcp add diamond-hands -- npx -y @gvnrdao/dh-mcp` · any host JSON: `{ "mcpServers": { "diamond-hands": { "command": "npx", "args": ["-y", "@gvnrdao/dh-mcp"] } } }` |
17
-
18
- Downloads landing page (which file is for which system, checksums, security notes):
19
- **https://assets.gvnr.xyz/dh-mcp/** — all artifacts and `SHA256SUMS` live under it
20
- (`latest/` and `v<version>/` — e.g. `v0.5.2/`).
21
-
22
- Local installs serve local MCP hosts only — **claude.ai web / mobile / Cowork cannot
23
- reach them**. A hosted remote connector (paste-a-URL, wallet-only: OAuth 2.1 + Sign-In-
24
- with-Ethereum, external-wallet signing, no keystore mode in that build) is IMPLEMENTED;
25
- whether it is publicly served, and on which networks, is the operator's rollout decision
26
- (security audit first) and is stated by the running deployment itself — its `guide
27
- connector` topic and `boundary://info` capabilities. This file cannot know: if you have
28
- not been given a URL, use the install paths above.
29
-
30
- Unsigned-binary honesty: the macOS and Windows binaries are **not yet code-signed** —
31
- macOS Gatekeeper may quarantine the download (right-click → Open, or
32
- `xattr -d com.apple.quarantine <file>`) and Windows SmartScreen will warn. Verify the
33
- `SHA256SUMS` file from the same release if in doubt. On macOS/Windows the `.mcpb` path
34
- avoids this entirely.
13
+ | **The hosted connector** — nothing to install, no Node | Paste `https://mcp.diamondhands.credit/mcp` into any host that accepts a remote MCP server URL: claude.ai and Claude Desktop (Settings → Connectors → Add custom connector), Cursor, VS Code, Codex, Gemini CLI, OpenCode, Grok. Sign in with your wallet — OAuth 2.1 + Sign-In-with-Ethereum, dynamic client registration, so there is no client ID or secret to configure. **External-wallet signing only: that build has no keystore mode.** Serves **mainnet**. |
14
+ | **Run it yourself** — requires **Node ≥ 18 on PATH** | Claude Code: `claude mcp add diamond-hands -- npx -y @gvnrdao/dh-mcp` · any host JSON: `{ "mcpServers": { "diamond-hands": { "command": "npx", "args": ["-y", "@gvnrdao/dh-mcp"] } } }`. Defaults to **mainnet**, read-only until you configure a signer; keystore signing is available here, and `network_switch` (or `DH_NETWORK=sepolia`) moves you to the test network. |
15
+
16
+ Per-client setup instructions: <https://app.diamondhands.credit/connect>
17
+
18
+ > **There are no downloadable builds.** The self-contained binaries, the Claude Desktop
19
+ > `.mcpb` bundle, `install.sh` and `SHA256SUMS` under `assets.gvnr.xyz/dh-mcp` were
20
+ > **withdrawn on 2026-09-18** and every path there now returns 404. The hosted connector
21
+ > replaces them for machines without Node — including Claude Desktop, which takes a
22
+ > remote server URL directly — and `npx` replaces them everywhere else. Treat any
23
+ > surviving link to that host, anywhere, as stale.
35
24
 
36
25
  **Troubleshooting `spawn npx ENOENT`:** your MCP host searched the system PATH and found
37
26
  no `npx` — the machine has no Node.js (or the host, e.g. an Electron app, cannot see
38
27
  your shell's version manager). That is the npx path's stated precondition, not a bug in
39
- the server. Remedies: use the one-line installer above (the printed snippet uses an
40
- absolute path to a binary that carries its own runtime), or on macOS/Windows Claude
41
- Desktop install the `.mcpb`.
28
+ the server. Use the hosted connector instead: it needs no local runtime at all.
42
29
 
43
- **Zero configuration boots the real protocol on SEPOLIA**
44
- (the test network — real contracts, test funds) with public endpoints. Everything is
45
- overridable by environment variables:
30
+ **Zero configuration boots the real protocol on ETHEREUM MAINNET** with public endpoints
31
+ — the same network the hosted connector serves, so a local install and a hosted one agree
32
+ about where your money is. It starts **read-only**: with no signer configured every write
33
+ answers with a setup invitation instead of acting, and moving value always needs a signer,
34
+ an explicit confirmation, and a fresh signature from your own wallet.
35
+
36
+ To rehearse on the test network, say so — `network_switch` takes you to sepolia in one
37
+ sentence, or set `DH_NETWORK=sepolia`. Everything is overridable by environment variable:
46
38
 
47
39
  | Variable | Default | Meaning |
48
40
  |---|---|---|
49
41
  | `DH_ADAPTER` | `real` | `real` protocol, or `mock` (offline practice sandbox; needs `DH_MOCK_DB` + `DH_MOCK_LATENCY`) |
50
- | `DH_NETWORK` | `sepolia` | `sepolia` (practice) or `mainnet` (REAL money — reads and writes both work out of the box) |
51
- | `ETH_RPC_URL` | public node per network | your own RPC if preferred |
42
+ | `DH_NETWORK` | `mainnet` | `mainnet` (REAL money — reads and writes both work out of the box) or `sepolia` (practice) |
43
+ | `ETH_RPC_URL` | our RPC proxy per network (`api.gvnr.xyz/v1/proxy/rpc/<chainId>` — dRPC upstream, keys held server-side, no credential needed here) | your own RPC if preferred |
52
44
  | `DH_SERVICE_ENDPOINT` | per network | Diamond Hands ops service |
53
45
  | `DH_KEYSTORE_PATH` + `DH_KEYSTORE_PASSWORD` | unset | optional: encrypted keystore for automatic signing (both or neither) |
54
46
 
55
47
  Signing is chosen **by conversation** (`signer_setup` — available on the real adapter):
56
- your own wallet (MetaMask browser popup, or WalletConnect for mobile — scannable QR or
57
- paste-code) or a local encrypted keystore. Safe smart-account and delegation modes are
58
- **mock-only for now** (table below).
48
+ your own wallet (**recommended** — MetaMask browser popup, or WalletConnect for mobile —
49
+ scannable QR or paste-code) or a local encrypted keystore (legacy, opt-in). See
50
+ [Where signing keys live](#where-signing-keys-live). Safe smart-account and delegation
51
+ modes are **mock-only for now** (table below).
59
52
 
60
53
  ## What works where
61
54
 
@@ -83,6 +76,66 @@ refuses legibly, and the user says "connect my wallet" (`signer_setup` action `c
83
76
  on mainnet and move real USDC and UCD, with the named-and-on-chain-verified stablecoin
84
77
  plus the PSM contract's own caps, pause switches and reserves as the bounds.
85
78
 
79
+ ## Where signing keys live
80
+
81
+ **In your wallet — not in this server, and not in your MCP host's config file.** Crypto
82
+ keys cannot be rotated the way an API key can, so the recommended signing mode (and the
83
+ only mode the hosted connector has) never gives the MCP a private key at all.
84
+
85
+ | Mode | Where the key is | What the MCP holds | Status |
86
+ |---|---|---|---|
87
+ | **external** — your own wallet | your wallet (MetaMask, or a mobile wallet over WalletConnect) | your public address — nothing secret | **recommended**; the only mode in the hosted connector |
88
+ | **keystore** — automatic signing | an encrypted (scrypt, ethers V3) keystore file on your machine | the decrypted key, in memory, for as long as the server runs | legacy, opt-in, local builds only |
89
+ | raw `DH_PRIVATE_KEY` env var | plaintext in the host config | the key | **removed** — no longer in the code |
90
+
91
+ ### Wallet signing (external mode)
92
+
93
+ The same model as other wallet-first crypto MCPs: the server prepares the transaction or
94
+ the EIP-712 typed data, and **your wallet signs it**.
95
+
96
+ 1. The MCP builds the transaction and decodes its calldata against a whitelist of
97
+ protocol functions — calldata that does not decode is refused before it ever reaches
98
+ your wallet.
99
+ 2. That decode becomes the approval card, shown on a token-gated approval page that
100
+ hands the request to MetaMask, or as a WalletConnect QR / pairing code for a
101
+ mobile wallet:
102
+ - **Local (stdio / loopback connector):** `http://127.0.0.1:<port>/` (token-gated).
103
+ - **Hosted connector:** `{publicOrigin}/approval/<mountId>/` (token-gated) — the
104
+ connector's own public origin, never loopback.
105
+ 3. You review and sign **in your wallet**; the wallet broadcasts.
106
+ 4. The MCP receives only the transaction hash, then verifies the landed transaction
107
+ matches the approved `to` / `data` / `value` / `chainId` and was sent by your address.
108
+ A mismatch is reported loudly, never silently retried.
109
+ 5. Login is an audience-bound EIP-712 signature through the same wallet.
110
+
111
+ What rests on your machine in this mode: the MCP host config (`~/.claude.json`,
112
+ `claude_desktop_config.json`) holds the launch command and, optionally, the network and
113
+ RPC URL — no key, no seed, no password. `~/.dh-mcp` holds the chosen signer mode and your
114
+ public address. Login session tokens live in process memory only.
115
+
116
+ One stated gap: the BTC-withdrawal EXECUTE step asks the wallet to `personal_sign` a bare
117
+ 32-byte hash built inside the SDK — identical to how diamondhands.credit signs it. The
118
+ approval card says plainly that this hash cannot be decoded, and gives its real expiry
119
+ deadline. Every other request is decoded before you sign.
120
+
121
+ ### Keystore mode (legacy, opt-in)
122
+
123
+ The first signing model, kept for headless local use. The key is encrypted at rest, but
124
+ the running process holds it decrypted, and anyone who can read **both** the keystore
125
+ file and its password has the key. Where the password lives is therefore the whole risk:
126
+
127
+ - **Claude Desktop `.mcpb`** — held by the OS credential store (the field is marked
128
+ sensitive), not written to a config file.
129
+ - **The unlock page** (`signer_setup` → "unlock my keystore") — typed into the local
130
+ loopback page, never written anywhere.
131
+ - **`DH_KEYSTORE_PASSWORD` in an `env` block or `claude mcp add -e …`** — stored **in
132
+ plaintext in the host config**, next to the keystore path. That is exactly the pattern
133
+ this section exists to avoid: do not use it for real funds — use wallet signing.
134
+
135
+ Passwords pasted into chat are refused by design. The hosted connector cannot run keystore
136
+ mode at all: the keystore runtime is not part of that build, and it refuses to boot if
137
+ keystore variables are present.
138
+
86
139
  ## What it solves
87
140
 
88
141
  Diamond Hands is otherwise operated by hand. This server adds a conversational access