dero-mcp-server 0.1.0 → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DHEBP
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,53 @@
1
1
  # DERO MCP server
2
2
 
3
- [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that exposes **read-only and analysis** calls against a DERO Stargate **daemon** JSON-RPC endpoint. Use it from **Claude Desktop**, **Cursor**, or any MCP client that launches a local process over stdio.
3
+ > **Model Context Protocol server for DERO chain inspection** query daemon state, inspect smart contracts, trace transactions, and run read-only diagnostics from Cursor, OpenCode, Claude Desktop, or any MCP host.
4
+
5
+ [![MCP Registry](https://img.shields.io/badge/MCP-io.github.DHEBP%2Fdero--mcp--server-blue)](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.DHEBP/dero-mcp-server)
6
+ [![CI](https://github.com/DHEBP/dero-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/DHEBP/dero-mcp-server/actions/workflows/ci.yml)
7
+ [![dero-mcp-server MCP server](https://glama.ai/mcp/servers/DHEBP/dero-mcp-server/badges/card.svg)](https://glama.ai/mcp/servers/DHEBP/dero-mcp-server)
8
+
9
+ **Registry listing:** `io.github.DHEBP/dero-mcp-server` · **Version:** `0.1.2` · **Transport:** `stdio` (npm package)
10
+
11
+ ---
12
+
13
+ [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that exposes **read-only and analysis** calls against a DERO Stargate **daemon** JSON-RPC endpoint. Use it from **Claude Desktop**, **Cursor**, **OpenCode**, or any MCP client that launches a local process over stdio.
14
+
15
+ ## Quick start
16
+
17
+ ### 1. Add this to your MCP host config
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "dero-daemon": {
23
+ "command": "npx",
24
+ "args": ["-y", "dero-mcp-server"],
25
+ "env": {
26
+ "DERO_DAEMON_URL": "http://127.0.0.1:10102"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ Use your own daemon URL when possible. If `DERO_DAEMON_URL` is omitted, the server uses the default public RPC.
34
+
35
+ ### 2. Restart your MCP host
36
+
37
+ ### 3. Try a prompt
38
+
39
+ > "Check if my DERO node is synced and summarize chain health."
40
+
41
+ ---
4
42
 
5
43
  ## What it does
6
44
 
7
45
  - Connects to `{DERO_DAEMON_URL}/json_rpc` (default `http://82.65.143.182:10102`).
8
46
  - Registers one MCP tool per common daemon method (`DERO.GetInfo`, `DERO.GetHeight`, `DERO.GetSC`, etc.).
47
+ - Adds bundled docs retrieval tools for `derod`, `tela`, `hologram`, and `deropay` (ships inside the npm package — no local clone required).
48
+ - Exposes MCP resources and prompts for consistent investigation workflows.
9
49
  - Returns JSON results as MCP text content.
50
+ - Returns structured tool errors with `_meta.error` (`code`, `hint`, `retryable`) to help agents self-correct.
10
51
 
11
52
  **Not included (by design in v0.1):** wallet RPC (`transfer`, `scinvoke`), `DERO.SendRawTransaction`, `DERO.SubmitBlock`. Those can move funds or consensus data; add them only with explicit user consent and a locked-down setup.
12
53
 
@@ -39,7 +80,7 @@ The baked-in default is a **third-party** public RPC (`82.65.143.182:10102`) —
39
80
 
40
81
  Strip a trailing `/json_rpc` if you paste a full JSON-RPC URL — this server appends `/json_rpc`.
41
82
 
42
- ## Claude Desktop
83
+ ## Claude Desktop (same pattern for OpenCode and Cursor)
43
84
 
44
85
  Add to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):
45
86
 
@@ -56,17 +97,109 @@ Add to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claud
56
97
 
57
98
  Optional: add `"env": { "DERO_DAEMON_URL": "http://127.0.0.1:10102" }` if you use a **local** daemon instead of the default public RPC.
58
99
 
59
- Restart Claude Desktop.
100
+ Restart Claude Desktop (or your OpenCode/Cursor host).
60
101
 
61
- ## Cursor
102
+ ## Cursor (or OpenCode)
62
103
 
63
- In **Cursor Settings → MCP**, add a server that runs the same `command` / `args` / `env` as above.
104
+ In **Cursor Settings → MCP** (or OpenCode MCP settings), add a server that runs the same `command` / `args` / `env` as above.
105
+
106
+ ## OpenCode
107
+
108
+ In **OpenCode MCP settings**, add a server with the same `command` / `args` / `env` as above.
64
109
 
65
110
  ## Environment
66
111
 
67
112
  | Variable | Default | Description |
68
113
  |----------|---------|-------------|
69
114
  | `DERO_DAEMON_URL` | `http://82.65.143.182:10102` | Daemon **base** URL (no `/json_rpc` required). Set to `http://127.0.0.1:10102` for a local daemon. |
115
+ | `DERO_DOCS_ROOT` | bundled index | Optional dev override: path to a local `dero-docs` clone to index live MDX instead of the shipped bundle. |
116
+
117
+ ## Maintainer: refresh bundled docs
118
+
119
+ Before publishing a new npm version when `dero-docs` changed:
120
+
121
+ ```bash
122
+ DERO_DOCS_ROOT=/path/to/dero-docs npm run build:docs
123
+ npm run build
124
+ npm publish
125
+ mcp-publisher publish
126
+ ```
127
+
128
+ `prepack` runs `build:docs` automatically when `dero-docs` is available at `../dero-docs` or via `DERO_DOCS_ROOT`.
129
+
130
+ ## Testing
131
+
132
+ ```bash
133
+ # Check daemon connectivity
134
+ npm run doctor
135
+
136
+ # MCP surface contract checks (tools/resources/prompts + error probe)
137
+ npm run smoke:mcp
138
+
139
+ # Docs retrieval checks (bundled index — no clone required)
140
+ npm run smoke:docs
141
+
142
+ # Run flow tests (10 RPC checks)
143
+ npm run test:flows
144
+
145
+ # Typecheck
146
+ npm run typecheck
147
+ ```
148
+
149
+ Flow tests run against the default public RPC. Set `DERO_DAEMON_URL` to test against your own daemon.
150
+
151
+ CI runs on every push and PR — see `.github/workflows/ci.yml`.
152
+
153
+ ## Official MCP Registry
154
+
155
+ Publish flow (maintainers):
156
+
157
+ ```bash
158
+ mcp-publisher validate
159
+ mcp-publisher login github
160
+ mcp-publisher publish
161
+ ```
162
+
163
+ Verify listing:
164
+
165
+ ```bash
166
+ curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.DHEBP/dero-mcp-server"
167
+ ```
168
+
169
+ ## MCP Surface
170
+
171
+ - **Tools (20):** daemon read/analysis methods + docs retrieval (`dero_docs_search`, `dero_docs_get_page`, `dero_docs_list`)
172
+ - **Resources (3):** `dero://mcp/server-info`, `dero://mcp/safety-boundary`, `dero://mcp/example-flows`
173
+ - **Prompts (3):** `network_health_check`, `inspect_smart_contract`, `trace_transaction`
174
+
175
+ ## Error Contract
176
+
177
+ When a tool call fails, the server returns a structured error payload in tool content:
178
+
179
+ ```json
180
+ {
181
+ "ok": false,
182
+ "tool": "dero_get_sc",
183
+ "_meta": {
184
+ "error": {
185
+ "code": "RPC_UNREACHABLE",
186
+ "hint": "Confirm daemon is running and reachable, then rerun `npm run doctor`.",
187
+ "retryable": true,
188
+ "raw": "fetch failed"
189
+ }
190
+ }
191
+ }
192
+ ```
193
+
194
+ Common `code` values:
195
+
196
+ - `INVALID_INPUT`
197
+ - `RPC_INVALID_PARAMS`
198
+ - `RPC_METHOD_NOT_FOUND`
199
+ - `RPC_HTTP_ERROR`
200
+ - `RPC_UNREACHABLE`
201
+ - `RPC_INVALID_RESPONSE`
202
+ - `TOOL_EXECUTION_ERROR`
70
203
 
71
204
  ## Roadmap
72
205