dexe-mcp 0.1.2 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Docs
6
+ - **Windows install section rewritten** to lead with the absolute-path recipe (`node <abs path to dist/index.js>`) instead of `cmd /c dexe-mcp`. End-to-end testing against Claude Code on Windows showed the `cmd /c` wrapper, while standalone functional, did not reliably complete the MCP handshake when spawned by Claude Code — the absolute-path recipe has zero shim resolution and is known-working.
7
+ - **New prereq step**: verify `npm --version` actually runs in your shell *before* attempting `npm install -g dexe-mcp`. Users with a stripped `node.exe`-only install (common on Windows) will hit a silent `npm i -g` no-op otherwise, with no visible error.
8
+ - Added a "Verify the install" section showing how to smoke-test `dexe-mcp` over stdio without involving Claude Code, so users can distinguish "MCP server broken" from "client registration broken".
9
+
10
+ No code changes — 0.1.3 is a docs-only patch on top of 0.1.2's behavior.
11
+
3
12
  ## 0.1.2
4
13
 
5
14
  ### Fixed
package/README.md CHANGED
@@ -6,7 +6,15 @@ MCP server for Claude Code / Antigravity that wraps the [DeXe Protocol](https://
6
6
 
7
7
  ## Prerequisites
8
8
 
9
- - **Node.js >= 20** (with a bundled `npm` i.e. any official installer, nvm, nvm-windows, or Homebrew build)
9
+ - **Node.js >= 20** with a working `npm`. Verify before continuing:
10
+
11
+ ```bash
12
+ node --version # should print v20.x or higher
13
+ npm --version # MUST print a version, not "command not found"
14
+ ```
15
+
16
+ If `npm --version` fails, you have a stripped Node install (a bare `node.exe` without the rest of the toolchain — common on Windows when `C:\Program Files\nodejs\node.exe` was placed manually). Install Node from <https://nodejs.org> or via [nvm](https://github.com/nvm-sh/nvm) / [nvm-windows](https://github.com/coreybutler/nvm-windows) and retry. Without npm, `npm install -g dexe-mcp` silently does nothing.
17
+
10
18
  - **Git** — only needed on first run, to clone DeXe-Protocol. If you already have a local checkout, point `DEXE_PROTOCOL_PATH` at it and git is optional.
11
19
 
12
20
  ## Install
@@ -17,21 +25,28 @@ MCP server for Claude Code / Antigravity that wraps the [DeXe Protocol](https://
17
25
  npm install -g dexe-mcp
18
26
  ```
19
27
 
20
- This installs a `dexe-mcp` binary on your PATH. Verify:
28
+ Verify the install landed by asking npm where it put it:
21
29
 
22
30
  ```bash
23
- dexe-mcp --version # or: where dexe-mcp (Windows) / which dexe-mcp (Mac/Linux)
31
+ npm root -g
32
+ # Mac/Linux: /usr/local/lib/node_modules (or ~/.nvm/versions/node/vXX.X.X/lib/node_modules)
33
+ # Windows: C:\Users\<you>\AppData\Roaming\nvm\<version>\node_modules
34
+ # (or C:\Users\<you>\AppData\Roaming\npm\node_modules for non-nvm)
24
35
  ```
25
36
 
37
+ Note the output — you'll need it for the Windows install step below. The package lives at `<npm-root>/dexe-mcp/dist/index.js`.
38
+
26
39
  ### 2. Register the MCP server
27
40
 
28
41
  #### Mac / Linux
29
42
 
43
+ Bare command works because Unix `exec` resolves PATH directly:
44
+
30
45
  ```bash
31
46
  claude mcp add dexe -- dexe-mcp
32
47
  ```
33
48
 
34
- Or add to your MCP client config (`.mcp.json`, `claude_desktop_config.json`, etc.):
49
+ Or in JSON (`.mcp.json`, `claude_desktop_config.json`, etc.):
35
50
 
36
51
  ```json
37
52
  {
@@ -43,41 +58,67 @@ Or add to your MCP client config (`.mcp.json`, `claude_desktop_config.json`, etc
43
58
  }
44
59
  ```
45
60
 
46
- #### Windows
61
+ #### Windows — recommended: absolute path to `node` + `dist/index.js`
47
62
 
48
- Windows `CreateProcess` does not resolve `.cmd` shims from a bare command name, so wrap the call with `cmd /c`:
63
+ On Windows, `dexe-mcp` is installed as a `.cmd` shim that many MCP clients (including Claude Code as of this writing) fail to spawn cleanly over stdio. The **absolute-path** form bypasses shim resolution entirely and is the known-good recipe:
49
64
 
50
65
  ```bash
51
- claude mcp add dexe -- cmd /c dexe-mcp
66
+ claude mcp add dexe -- "C:\Program Files\nodejs\node.exe" "C:\Users\<you>\AppData\Roaming\nvm\<version>\node_modules\dexe-mcp\dist\index.js"
52
67
  ```
53
68
 
54
- Or in JSON:
69
+ Substitute `<you>` and `<version>` (or use whatever `npm root -g` printed above). In JSON:
55
70
 
56
71
  ```json
57
72
  {
58
73
  "mcpServers": {
59
74
  "dexe": {
60
- "command": "cmd",
61
- "args": ["/c", "dexe-mcp"]
75
+ "command": "C:/Program Files/nodejs/node.exe",
76
+ "args": ["C:/Users/<you>/AppData/Roaming/nvm/<version>/node_modules/dexe-mcp/dist/index.js"]
62
77
  }
63
78
  }
64
79
  }
65
80
  ```
66
81
 
67
- **Absolute-path fallback** (works everywhere, zero PATH dependency):
82
+ This works because:
83
+ - No PATH dependency — every argument is an absolute path
84
+ - No `.cmd` / `.ps1` shim in the chain, so `CreateProcess` semantics don't trip over missing extensions
85
+ - `dexe-mcp` internally invokes `npm`/`hardhat` via `process.execPath`, so it uses whichever Node you pointed at and does not need npm on the spawned process PATH
86
+
87
+ <details>
88
+ <summary>Alternative: <code>cmd /c dexe-mcp</code> (not recommended — often unreliable with Claude Code)</summary>
68
89
 
69
90
  ```json
70
91
  {
71
92
  "mcpServers": {
72
93
  "dexe": {
73
- "command": "node",
74
- "args": ["C:/Users/<you>/AppData/Roaming/npm/node_modules/dexe-mcp/dist/index.js"]
94
+ "command": "cmd",
95
+ "args": ["/c", "dexe-mcp"]
75
96
  }
76
97
  }
77
98
  }
78
99
  ```
79
100
 
80
- ### 3. Restart your MCP client
101
+ Use only if the absolute-path form is inconvenient. End-to-end testing showed this can pass a direct stdio check but fail to complete the MCP handshake when spawned by Claude Code.
102
+ </details>
103
+
104
+ ### 3. Verify the install (optional but recommended)
105
+
106
+ Before wiring the server into your MCP client, confirm the binary can actually speak MCP over stdio. On any OS:
107
+
108
+ ```bash
109
+ # Send a minimal initialize request, expect a capabilities JSON back.
110
+ echo "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"t\",\"version\":\"1\"}}}" | dexe-mcp
111
+ ```
112
+
113
+ On Windows if the above hangs, try instead:
114
+
115
+ ```bash
116
+ echo {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"1"}}} | node "C:\Users\<you>\AppData\Roaming\nvm\<version>\node_modules\dexe-mcp\dist\index.js"
117
+ ```
118
+
119
+ A healthy response starts with a single stderr line (`[dexe-mcp] connected on stdio. …`) and a stdout JSON blob containing `"serverInfo":{"name":"dexe-mcp"}`. If you see that, the server is fine and any "failed to connect" from your MCP client is purely a client-side spawn/config problem, not a bug in dexe-mcp.
120
+
121
+ ### 4. Restart your MCP client
81
122
 
82
123
  On the first build-tool call (e.g. `dexe_compile`), `dexe-mcp` will automatically:
83
124
 
@@ -192,13 +233,20 @@ Usually means your Node install lacks a bundled `npm` (e.g. a stripped `node.exe
192
233
 
193
234
  ### "Failed to connect" in Claude Code (Windows)
194
235
 
195
- Claude Code spawns MCP servers with `CreateProcess`, which can't resolve `.cmd` shims from a bare name. Wrap the command:
236
+ Run the direct stdio test from the "Verify the install" section first. If that prints a clean `serverInfo` response, the server is fine and the problem is in how your client is spawning it.
196
237
 
197
- ```json
198
- { "command": "cmd", "args": ["/c", "dexe-mcp"] }
238
+ The fix is almost always to switch to the **absolute-path** registration:
239
+
240
+ ```bash
241
+ claude mcp remove dexe
242
+ claude mcp add dexe -- "C:\Program Files\nodejs\node.exe" "C:\Users\<you>\AppData\Roaming\nvm\<version>\node_modules\dexe-mcp\dist\index.js"
199
243
  ```
200
244
 
201
- Or use the absolute-path fallback pointing at `node` + `dist/index.js` directly.
245
+ Bare `dexe-mcp` and `cmd /c dexe-mcp` both rely on shim resolution that Claude Code's `CreateProcess`-based spawn does not always handle. The absolute-path form has zero shim resolution.
246
+
247
+ ### `npm install -g dexe-mcp` reported success but `dexe-mcp` is nowhere to be found
248
+
249
+ You're almost certainly on a stripped Node install whose `npm` silently no-ops. Check with `npm --version` — if it fails, install Node properly (see Prerequisites). If it prints a version, check `npm root -g` and look inside that directory; the package should be at `<npm-root>/dexe-mcp`.
202
250
 
203
251
  ### "Hardhat artifacts not found — run dexe_compile first"
204
252
 
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { loadConfig } from "./config.js";
5
5
  import { registerAll } from "./tools/index.js";
6
6
  async function main() {
7
7
  const config = await loadConfig();
8
- const server = new McpServer({ name: "dexe-mcp", version: "0.1.2" }, {
8
+ const server = new McpServer({ name: "dexe-mcp", version: "0.1.3" }, {
9
9
  instructions: "Tools for the DeXe Protocol governance-DAO codebase. Before calling any dexe_get_* / dexe_list_contracts / dexe_find_selector tool, ensure artifacts exist by calling dexe_compile once per session. dexe_decode_proposal and dexe_read_gov_state require DEXE_RPC_URL to be set.",
10
10
  });
11
11
  registerAll(server, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dexe-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server wrapping DeXe Protocol for Claude Code dev tooling (build/test, contract introspection, governance-domain tools)",
5
5
  "type": "module",
6
6
  "license": "MIT",