obyte-mcp 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/README.md +226 -152
- package/dist/cliArgs.d.ts +8 -2
- package/dist/cliArgs.js +37 -4
- package/dist/cliArgs.js.map +1 -1
- package/dist/config.d.ts +4 -1
- package/dist/config.js +46 -17
- package/dist/config.js.map +1 -1
- package/dist/configSnippets.d.ts +19 -4
- package/dist/configSnippets.js +97 -48
- package/dist/configSnippets.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/envelope.d.ts +3 -3
- package/dist/envelope.js.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +10 -0
- package/dist/install.js +139 -0
- package/dist/install.js.map +1 -0
- package/dist/obyteClient.d.ts +10 -2
- package/dist/obyteClient.js +8 -0
- package/dist/obyteClient.js.map +1 -1
- package/dist/resources.js +4 -1
- package/dist/resources.js.map +1 -1
- package/dist/schemas.d.ts +121 -1
- package/dist/schemas.js +34 -17
- package/dist/schemas.js.map +1 -1
- package/dist/server.js +6 -3
- package/dist/server.js.map +1 -1
- package/dist/setup.js +9 -3
- package/dist/setup.js.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +79 -56
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +24 -9
- package/package.json +8 -3
- package/server.json +89 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# obyte-mcp
|
|
2
2
|
|
|
3
|
-
Local stdio MCP server for querying Obyte
|
|
3
|
+
Local stdio MCP server for querying Obyte from AI tools. **One server serves both mainnet and testnet** — every tool takes an optional `network`, so you never run two servers.
|
|
4
4
|
|
|
5
|
-
`obyte-mcp` exposes Obyte hub reads, autonomous-agent inspection, AA dry runs, and token symbol helpers to MCP clients such as Codex, Claude Desktop, and Claude Code.
|
|
5
|
+
`obyte-mcp` exposes Obyte hub reads, autonomous-agent inspection, AA dry runs, and token symbol helpers to MCP clients such as VS Code, Codex, Claude Desktop, and Claude Code.
|
|
6
6
|
|
|
7
7
|
Official Obyte docs:
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ Official Obyte docs:
|
|
|
12
12
|
## What This Is
|
|
13
13
|
|
|
14
14
|
- A local MCP server that talks over stdio only.
|
|
15
|
-
- A read/query/dry-run connector for Obyte mainnet
|
|
15
|
+
- A read/query/dry-run connector for Obyte **mainnet and testnet at the same time**.
|
|
16
16
|
- A toolset for balances, units, witnesses, AA state vars, AA getters, AA dry runs, token symbols, and agent-friendly summaries.
|
|
17
17
|
|
|
18
18
|
## What This Is Not
|
|
@@ -33,185 +33,220 @@ The server uses stdio only. It does not start an HTTP server and does not listen
|
|
|
33
33
|
|
|
34
34
|
## Quick Start
|
|
35
35
|
|
|
36
|
-
Run
|
|
36
|
+
Run it (serves both networks):
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
npx -y obyte-mcp
|
|
39
|
+
npx -y obyte-mcp
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Make testnet the default network for calls that omit `network` (both stay available):
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npx -y obyte-mcp --network testnet
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
## Install (one command)
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
The fastest way to register the server with your clients. It runs each client's own CLI
|
|
51
|
+
(`code --add-mcp`, `codex mcp add`, `claude mcp add`) and writes the Claude Desktop config
|
|
52
|
+
file directly. When a client CLI is missing, it prints the exact manual steps instead.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Preview first (changes nothing):
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx -y obyte-mcp
|
|
58
|
-
npx -y obyte-mcp setup --print-only --client claude-desktop --network testnet
|
|
59
|
-
npx -y obyte-mcp setup --print-only --client claude-code --network mainnet
|
|
57
|
+
npx -y obyte-mcp install --dry-run
|
|
60
58
|
```
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
Install into every detected client:
|
|
63
61
|
|
|
64
62
|
```bash
|
|
65
|
-
npx -y obyte-mcp
|
|
66
|
-
npx -y obyte-mcp doctor --json
|
|
63
|
+
npx -y obyte-mcp install
|
|
67
64
|
```
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
Target a single client, or set the default network:
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
```bash
|
|
69
|
+
npx -y obyte-mcp install --client vscode
|
|
70
|
+
npx -y obyte-mcp install --client claude-desktop --network testnet
|
|
71
|
+
npx -y obyte-mcp install --client codex --name obyte-testnet --network testnet
|
|
72
|
+
```
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
3. Defaults
|
|
74
|
+
Flags: `--client vscode|codex|claude-desktop|claude-code` (default: all), `--name NAME`
|
|
75
|
+
(server name, default `obyte`), `--dry-run`, plus any config flag from the table below.
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
| --- | --- | --- | --- |
|
|
79
|
-
| `OBYTE_NETWORK` | `--network` | `mainnet` | `mainnet` or `testnet` |
|
|
80
|
-
| `OBYTE_HUB_ADDRESS` | `--hub` | Network default | Custom hub URL |
|
|
81
|
-
| `OBYTE_TOKEN_REGISTRY_ADDRESS` | `--token-registry` | Mainnet registry on mainnet, unset on testnet | Token registry AA |
|
|
82
|
-
| `OBYTE_REQUEST_TIMEOUT_MS` | `--timeout-ms` | `20000` | Hub request timeout, `1000..120000` |
|
|
83
|
-
| `OBYTE_MAX_CONCURRENCY` | `--max-concurrency` | `4` | Concurrent hub requests, `1..10` |
|
|
84
|
-
| `OBYTE_MAX_OUTPUT_BYTES` | `--max-output-bytes` | `262144` | Max tool output bytes, `16384..1048576` |
|
|
77
|
+
From a checkout you can use the wrapper scripts (they build first if needed):
|
|
85
78
|
|
|
86
|
-
|
|
79
|
+
```bash
|
|
80
|
+
./scripts/install.sh --dry-run # macOS / Linux
|
|
81
|
+
pwsh ./scripts/install.ps1 --dry-run # Windows
|
|
82
|
+
```
|
|
87
83
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
84
|
+
Prefer copy-paste? `npx -y obyte-mcp setup` prints ready snippets for all clients without
|
|
85
|
+
changing anything (add `--print-only --client <name>` for one).
|
|
90
86
|
|
|
91
|
-
|
|
87
|
+
### VS Code
|
|
92
88
|
|
|
93
|
-
- `
|
|
94
|
-
|
|
95
|
-
- URL credentials are rejected.
|
|
96
|
-
- Non-HTTP protocols are rejected.
|
|
97
|
-
|
|
98
|
-
## Install In Codex
|
|
99
|
-
|
|
100
|
-
Add a local stdio MCP server config with `npx`:
|
|
89
|
+
`obyte-mcp install --client vscode` runs `code --add-mcp` for you. To do it by hand, add to
|
|
90
|
+
`.vscode/mcp.json` (workspace) or your user `settings.json` under `"mcp"`:
|
|
101
91
|
|
|
102
92
|
```json
|
|
103
93
|
{
|
|
104
|
-
"
|
|
94
|
+
"servers": {
|
|
105
95
|
"obyte": {
|
|
96
|
+
"type": "stdio",
|
|
106
97
|
"command": "npx",
|
|
107
|
-
"args": ["-y", "obyte-mcp"
|
|
98
|
+
"args": ["-y", "obyte-mcp"]
|
|
108
99
|
}
|
|
109
100
|
}
|
|
110
101
|
}
|
|
111
102
|
```
|
|
112
103
|
|
|
113
|
-
|
|
104
|
+
VS Code uses `servers` (not `mcpServers`) and requires `"type": "stdio"`.
|
|
114
105
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
106
|
+
### Codex CLI
|
|
107
|
+
|
|
108
|
+
`obyte-mcp install --client codex` runs `codex mcp add`. To do it by hand, add to
|
|
109
|
+
`~/.codex/config.toml` (Codex uses TOML, not JSON):
|
|
110
|
+
|
|
111
|
+
```toml
|
|
112
|
+
[mcp_servers.obyte]
|
|
113
|
+
command = "npx"
|
|
114
|
+
args = ["-y", "obyte-mcp"]
|
|
124
115
|
```
|
|
125
116
|
|
|
126
|
-
|
|
117
|
+
### Claude Desktop
|
|
118
|
+
|
|
119
|
+
Claude Desktop has no CLI, so `obyte-mcp install --client claude-desktop` edits its config
|
|
120
|
+
file directly (it backs up the existing file to `*.bak` and merges, keeping your other
|
|
121
|
+
servers). To do it by hand, edit `claude_desktop_config.json` and restart Claude Desktop:
|
|
127
122
|
|
|
128
123
|
```json
|
|
129
124
|
{
|
|
130
125
|
"mcpServers": {
|
|
131
|
-
"obyte
|
|
126
|
+
"obyte": {
|
|
132
127
|
"command": "npx",
|
|
133
|
-
"args": ["-y", "obyte-mcp"
|
|
128
|
+
"args": ["-y", "obyte-mcp"]
|
|
134
129
|
}
|
|
135
130
|
}
|
|
136
131
|
}
|
|
137
132
|
```
|
|
138
133
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
## Install In Claude Desktop
|
|
142
|
-
|
|
143
|
-
Edit `claude_desktop_config.json`.
|
|
144
|
-
|
|
145
|
-
Common paths:
|
|
134
|
+
Config paths:
|
|
146
135
|
|
|
147
136
|
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
148
137
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
149
138
|
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
150
139
|
|
|
151
|
-
|
|
140
|
+
### Claude Code
|
|
152
141
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"command": "npx",
|
|
158
|
-
"args": ["-y", "obyte-mcp", "--network", "mainnet"]
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
142
|
+
`obyte-mcp install --client claude-code` runs:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
claude mcp add --transport stdio obyte -- npx -y obyte-mcp
|
|
162
146
|
```
|
|
163
147
|
|
|
164
|
-
|
|
148
|
+
The `--` before `npx` is required. Without it, Claude Code can parse server flags such as
|
|
149
|
+
`--network` as Claude Code flags. Useful commands: `claude mcp list`, `claude mcp get obyte`,
|
|
150
|
+
and `/mcp` inside Claude Code.
|
|
165
151
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
152
|
+
### One-click bundle (.mcpb) for Claude Desktop / Claude Code
|
|
153
|
+
|
|
154
|
+
Anthropic's [MCP Bundle](https://github.com/modelcontextprotocol/mcpb) format (`.mcpb`, formerly
|
|
155
|
+
`.dxt`) lets users install with a single click in Claude Desktop, Claude Code, and MCP for
|
|
156
|
+
Windows (VS Code and Codex do not support `.mcpb`). This repo ships a `manifest.json`. Build a
|
|
157
|
+
bundle with:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm ci --omit=dev # keep the bundle small (runtime deps only)
|
|
161
|
+
npm run bundle # builds, then runs `mcpb pack` -> obyte-mcp.mcpb
|
|
175
162
|
```
|
|
176
163
|
|
|
177
|
-
|
|
164
|
+
Then open `obyte-mcp.mcpb` in Claude Desktop and click Install. The bundle exposes a
|
|
165
|
+
"Default network" option and an optional testnet token registry in the install UI.
|
|
178
166
|
|
|
179
|
-
|
|
167
|
+
## Choosing A Network
|
|
180
168
|
|
|
181
|
-
|
|
169
|
+
This is the headline feature: **you do not pick a network when starting the server** — you pick
|
|
170
|
+
it per call.
|
|
182
171
|
|
|
183
|
-
|
|
172
|
+
- Every tool accepts an optional `network` argument: `"mainnet"` or `"testnet"`.
|
|
173
|
+
- When a call omits `network`, the server uses the **default network** (mainnet unless you set
|
|
174
|
+
`--network testnet` / `OBYTE_NETWORK=testnet`).
|
|
175
|
+
- The response `meta.network` and `meta.hub` always tell you which network actually answered.
|
|
176
|
+
- Ask your client things like *"check this balance on testnet"* or *"dry-run this AA on mainnet"*
|
|
177
|
+
and it will pass the right `network`. If the network is ambiguous, tools are documented to ask
|
|
178
|
+
you first.
|
|
184
179
|
|
|
185
|
-
|
|
186
|
-
claude mcp add --transport stdio obyte -- npx -y obyte-mcp --network mainnet
|
|
187
|
-
```
|
|
180
|
+
Inspect the live configuration for both networks any time with `obyte_get_network_info`.
|
|
188
181
|
|
|
189
|
-
|
|
182
|
+
## Configuration
|
|
190
183
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
Precedence, highest first:
|
|
185
|
+
|
|
186
|
+
1. Per-network environment variable (e.g. `OBYTE_TESTNET_HUB_ADDRESS`)
|
|
187
|
+
2. Per-network CLI flag (e.g. `--testnet-hub`)
|
|
188
|
+
3. Plain environment variable / CLI flag (applies to the **default** network only)
|
|
189
|
+
4. Built-in default
|
|
190
|
+
|
|
191
|
+
| Env var | CLI flag | Applies to | Default | Description |
|
|
192
|
+
| --- | --- | --- | --- | --- |
|
|
193
|
+
| `OBYTE_NETWORK` | `--network` | default network | `mainnet` | Network used when a call omits `network` |
|
|
194
|
+
| `OBYTE_HUB_ADDRESS` | `--hub` | default network | Network default | Custom hub URL |
|
|
195
|
+
| `OBYTE_TOKEN_REGISTRY_ADDRESS` | `--token-registry` | default network | Mainnet registry / unset | Token registry AA |
|
|
196
|
+
| `OBYTE_MAINNET_HUB_ADDRESS` | `--mainnet-hub` | mainnet | `https://obyte.org/api` | Custom mainnet hub |
|
|
197
|
+
| `OBYTE_TESTNET_HUB_ADDRESS` | `--testnet-hub` | testnet | `https://testnet.obyte.org/api` | Custom testnet hub |
|
|
198
|
+
| `OBYTE_MAINNET_TOKEN_REGISTRY_ADDRESS` | `--mainnet-token-registry` | mainnet | Official registry | Mainnet registry AA |
|
|
199
|
+
| `OBYTE_TESTNET_TOKEN_REGISTRY_ADDRESS` | `--testnet-token-registry` | testnet | unset | Testnet registry AA |
|
|
200
|
+
| `OBYTE_REQUEST_TIMEOUT_MS` | `--timeout-ms` | both | `20000` | Hub request timeout, `1000..120000` |
|
|
201
|
+
| `OBYTE_MAX_CONCURRENCY` | `--max-concurrency` | both | `4` | Concurrent hub requests, `1..10` |
|
|
202
|
+
| `OBYTE_MAX_OUTPUT_BYTES` | `--max-output-bytes` | both | `262144` | Max tool output bytes, `16384..1048576` |
|
|
194
203
|
|
|
195
|
-
|
|
204
|
+
Default hubs:
|
|
196
205
|
|
|
197
|
-
|
|
206
|
+
- Mainnet: `https://obyte.org/api`
|
|
207
|
+
- Testnet: `https://testnet.obyte.org/api`
|
|
198
208
|
|
|
199
|
-
|
|
200
|
-
claude mcp list
|
|
201
|
-
claude mcp get obyte
|
|
202
|
-
```
|
|
209
|
+
Custom hub URL policy (applies to any hub override):
|
|
203
210
|
|
|
204
|
-
|
|
211
|
+
- `https:` is allowed.
|
|
212
|
+
- `http:` is allowed only for `localhost`, `127.0.0.1`, and `::1`.
|
|
213
|
+
- URL credentials are rejected.
|
|
214
|
+
- Non-HTTP protocols are rejected.
|
|
205
215
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
216
|
+
## Updating
|
|
217
|
+
|
|
218
|
+
The server runs through `npx`, which resolves the latest published version. How to move to a
|
|
219
|
+
newer release depends on how it is registered:
|
|
220
|
+
|
|
221
|
+
- **npx-based configs (default in every snippet above).** `npx` caches packages. Clear the cache
|
|
222
|
+
so the next launch fetches the newest version, then restart the client:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npx -y obyte-mcp@latest --version # fetch + print the newest version
|
|
226
|
+
npm cache clean --force # optional: force-drop the npx cache
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
You can also pin a version in your config, e.g. `["-y", "obyte-mcp@0.1.2"]`, and bump it when
|
|
230
|
+
you want to update.
|
|
231
|
+
|
|
232
|
+
- **Claude Desktop / Claude Code / VS Code / Codex.** Nothing to re-register — they call the same
|
|
233
|
+
`npx` command. Just refresh the package as above and restart the client. To re-run the
|
|
234
|
+
installer (for example after changing flags), use `--name` to overwrite the same entry:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
npx -y obyte-mcp@latest install
|
|
238
|
+
```
|
|
209
239
|
|
|
210
|
-
|
|
240
|
+
- **`.mcpb` bundle.** Rebuild the bundle from the new source (`npm ci --omit=dev && npm run
|
|
241
|
+
bundle`) and re-install the new `obyte-mcp.mcpb` in Claude; it replaces the previous version.
|
|
242
|
+
|
|
243
|
+
- **Global install (if you used `npm i -g obyte-mcp`).** `npm update -g obyte-mcp`.
|
|
244
|
+
|
|
245
|
+
Check what you are running with `npx -y obyte-mcp --version` and `npx -y obyte-mcp doctor`.
|
|
211
246
|
|
|
212
247
|
## Recommended Tools
|
|
213
248
|
|
|
214
|
-
Use these first for agent-facing tasks
|
|
249
|
+
Use these first for agent-facing tasks. All accept an optional `network`.
|
|
215
250
|
|
|
216
251
|
- `obyte_analyze_address`: balances, profile units, definition, attestations, optional history.
|
|
217
252
|
- `obyte_analyze_unit`: joint plus optional AA response chain.
|
|
@@ -222,9 +257,9 @@ Use these first for agent-facing tasks:
|
|
|
222
257
|
|
|
223
258
|
## Raw Hub Tools
|
|
224
259
|
|
|
225
|
-
Advanced tools that mirror Obyte hub/client methods:
|
|
260
|
+
Advanced tools that mirror Obyte hub/client methods (each accepts an optional `network`):
|
|
226
261
|
|
|
227
|
-
- `obyte_get_network_info`
|
|
262
|
+
- `obyte_get_network_info` (returns config for **both** networks)
|
|
228
263
|
- `obyte_get_last_mci`
|
|
229
264
|
- `obyte_get_peers`
|
|
230
265
|
- `obyte_get_witnesses`
|
|
@@ -264,15 +299,17 @@ Mainnet default token registry:
|
|
|
264
299
|
O6H6ZIFI57X3PLTYHOCVYPP5A553CYFQ
|
|
265
300
|
```
|
|
266
301
|
|
|
267
|
-
On testnet,
|
|
302
|
+
On testnet, configure a registry if you need symbol lookups (or pass `token_registry_address`
|
|
303
|
+
per call):
|
|
268
304
|
|
|
269
305
|
```bash
|
|
270
|
-
npx -y obyte-mcp --
|
|
306
|
+
npx -y obyte-mcp --testnet-token-registry YOUR_TESTNET_REGISTRY_AA
|
|
271
307
|
```
|
|
272
308
|
|
|
273
309
|
## Tool Behavior
|
|
274
310
|
|
|
275
|
-
All tool responses are JSON text envelopes.
|
|
311
|
+
All tool responses are JSON text envelopes. `meta.network` and `meta.hub` report the network
|
|
312
|
+
that answered the call.
|
|
276
313
|
|
|
277
314
|
Success:
|
|
278
315
|
|
|
@@ -280,8 +317,8 @@ Success:
|
|
|
280
317
|
{
|
|
281
318
|
"ok": true,
|
|
282
319
|
"meta": {
|
|
283
|
-
"network": "
|
|
284
|
-
"hub": "https://obyte.org/api",
|
|
320
|
+
"network": "testnet",
|
|
321
|
+
"hub": "https://testnet.obyte.org/api",
|
|
285
322
|
"tool": "obyte_get_balances",
|
|
286
323
|
"request_id": "...",
|
|
287
324
|
"duration_ms": 123,
|
|
@@ -331,7 +368,7 @@ Error codes:
|
|
|
331
368
|
- Oracle arrays: max `10`
|
|
332
369
|
- State var prefix: max `128` characters
|
|
333
370
|
- Generic JSON payloads: max `64KB`
|
|
334
|
-
- All object schemas are strict and reject unknown fields
|
|
371
|
+
- All object schemas are strict and reject unknown fields (except the optional `network`)
|
|
335
372
|
|
|
336
373
|
## Output Limits And Truncation
|
|
337
374
|
|
|
@@ -370,7 +407,7 @@ Witnesses are cached:
|
|
|
370
407
|
|
|
371
408
|
- In memory only
|
|
372
409
|
- Per process
|
|
373
|
-
- Per `network + hub`
|
|
410
|
+
- Per `network + hub` (so mainnet and testnet caches are independent)
|
|
374
411
|
- TTL: `10 minutes`
|
|
375
412
|
|
|
376
413
|
`obyte_get_witnesses` accepts `update=true` to force refresh. `obyte_get_history` uses cached witnesses unless explicit witnesses are passed or `update_witnesses=true`.
|
|
@@ -424,18 +461,7 @@ Diagnostics are written to stderr as JSON Lines:
|
|
|
424
461
|
{"ts":"2026-07-07T12:00:00.000Z","package":"obyte-mcp","level":"error","event":"mcp_stdio_error","message":"..."}
|
|
425
462
|
```
|
|
426
463
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
- `ts`
|
|
430
|
-
- `package`
|
|
431
|
-
- `level`
|
|
432
|
-
- `event`
|
|
433
|
-
- `request_id`
|
|
434
|
-
- `tool`
|
|
435
|
-
- `message`
|
|
436
|
-
- `details`
|
|
437
|
-
|
|
438
|
-
`setup`, `doctor`, `--help`, and `--version` do not start MCP stdio and can write normal output to stdout.
|
|
464
|
+
`install`, `setup`, `doctor`, `--help`, and `--version` do not start MCP stdio and can write normal output to stdout.
|
|
439
465
|
|
|
440
466
|
## Resources
|
|
441
467
|
|
|
@@ -463,8 +489,8 @@ The server exposes:
|
|
|
463
489
|
|
|
464
490
|
Ask your MCP client:
|
|
465
491
|
|
|
466
|
-
- "Check this Obyte address balances and explain the assets."
|
|
467
|
-
- "Resolve this asset id to symbol and decimals."
|
|
492
|
+
- "Check this Obyte address balances on testnet and explain the assets."
|
|
493
|
+
- "Resolve this asset id to symbol and decimals on mainnet."
|
|
468
494
|
- "Inspect why this AA trigger failed."
|
|
469
495
|
- "Dry-run this AA trigger on testnet."
|
|
470
496
|
- "Summarize AA state vars with this prefix."
|
|
@@ -475,7 +501,7 @@ Ask your MCP client:
|
|
|
475
501
|
Run against the published package:
|
|
476
502
|
|
|
477
503
|
```bash
|
|
478
|
-
npx -y @modelcontextprotocol/inspector npx -y obyte-mcp
|
|
504
|
+
npx -y @modelcontextprotocol/inspector npx -y obyte-mcp
|
|
479
505
|
```
|
|
480
506
|
|
|
481
507
|
Run against a local build:
|
|
@@ -483,9 +509,58 @@ Run against a local build:
|
|
|
483
509
|
```bash
|
|
484
510
|
npm install
|
|
485
511
|
npm run build
|
|
486
|
-
npx -y @modelcontextprotocol/inspector node dist/index.js
|
|
512
|
+
npx -y @modelcontextprotocol/inspector node dist/index.js
|
|
487
513
|
```
|
|
488
514
|
|
|
515
|
+
## Distribution And Directory Listings
|
|
516
|
+
|
|
517
|
+
There is no single official CLI that installs an MCP server into every client at once. The
|
|
518
|
+
official building blocks from https://github.com/modelcontextprotocol are:
|
|
519
|
+
|
|
520
|
+
- **MCP Registry** (`server.json` + `mcp-publisher`): discovery and distribution. Registry-aware
|
|
521
|
+
clients and directories generate per-client install configs from it.
|
|
522
|
+
- **MCP Bundles** (`.mcpb`): one-click local install for Claude Desktop / Claude Code / MCP for
|
|
523
|
+
Windows (see the bundle section above).
|
|
524
|
+
|
|
525
|
+
The `obyte-mcp install` command covers the remaining gap by driving each client's own CLI so one
|
|
526
|
+
command reaches VS Code, Codex, Claude Desktop, and Claude Code.
|
|
527
|
+
|
|
528
|
+
### Official MCP Registry
|
|
529
|
+
|
|
530
|
+
The registry hosts metadata, not package artifacts. The npm package must already be published,
|
|
531
|
+
and npm ownership is verified through the `mcpName` field in `package.json`:
|
|
532
|
+
|
|
533
|
+
```json
|
|
534
|
+
{
|
|
535
|
+
"mcpName": "io.github.taump/obyte-mcp"
|
|
536
|
+
}
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
The matching registry metadata is in `server.json`. Publish a new npm version, then use
|
|
540
|
+
`mcp-publisher`:
|
|
541
|
+
|
|
542
|
+
```bash
|
|
543
|
+
npm run typecheck
|
|
544
|
+
npm test
|
|
545
|
+
npm run build
|
|
546
|
+
npm publish
|
|
547
|
+
|
|
548
|
+
# macOS/Linux via release tarball
|
|
549
|
+
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
|
|
550
|
+
sudo mv mcp-publisher /usr/local/bin/
|
|
551
|
+
|
|
552
|
+
mcp-publisher login github
|
|
553
|
+
mcp-publisher publish
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
Verify publication:
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.taump/obyte-mcp"
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
With GitHub authentication, the registry namespace must match the GitHub owner. This project uses `io.github.taump/obyte-mcp`, so publish while authenticated as the GitHub account that owns `Taump/obyte-mcp`, or publish from a GitHub Action in that repository.
|
|
563
|
+
|
|
489
564
|
## Local Development
|
|
490
565
|
|
|
491
566
|
```bash
|
|
@@ -500,14 +575,15 @@ node dist/index.js --help
|
|
|
500
575
|
|
|
501
576
|
Project structure:
|
|
502
577
|
|
|
503
|
-
- `src/index.ts`: CLI entrypoint
|
|
504
|
-
- `src/
|
|
578
|
+
- `src/index.ts`: CLI entrypoint (server / install / setup / doctor)
|
|
579
|
+
- `src/cliArgs.ts`: argument parsing
|
|
580
|
+
- `src/config.ts`: dual-network runtime config and URL policy
|
|
581
|
+
- `src/server.ts`: stdio MCP runtime (one hub client per network)
|
|
505
582
|
- `src/obyteClient.ts`: Obyte hub HTTP client
|
|
506
|
-
- `src/tools.ts`: MCP tool registration
|
|
507
|
-
- `src/
|
|
508
|
-
- `src/
|
|
509
|
-
- `src/symbols.ts
|
|
510
|
-
- `src/config.ts`: runtime config and URL policy
|
|
583
|
+
- `src/tools.ts`: MCP tool registration and per-call network routing
|
|
584
|
+
- `src/install.ts`: client CLI installer / Claude Desktop config writer
|
|
585
|
+
- `src/configSnippets.ts`: per-client config and command builders
|
|
586
|
+
- `src/resources.ts`, `src/prompts.ts`, `src/symbols.ts`, `src/schemas.ts`
|
|
511
587
|
|
|
512
588
|
## Compatibility Matrix
|
|
513
589
|
|
|
@@ -516,14 +592,13 @@ Project structure:
|
|
|
516
592
|
| Node.js | `>=20` |
|
|
517
593
|
| MCP SDK | `@modelcontextprotocol/server@^2.0.0-beta.2` |
|
|
518
594
|
| Transport | Local stdio only |
|
|
519
|
-
|
|
|
520
|
-
|
|
|
521
|
-
| Claude
|
|
522
|
-
|
|
|
523
|
-
| Linux | Supported |
|
|
595
|
+
| VS Code | `code --add-mcp` / `.vscode/mcp.json` |
|
|
596
|
+
| Codex CLI | `codex mcp add` / `~/.codex/config.toml` |
|
|
597
|
+
| Claude Desktop | config file / `.mcpb` bundle |
|
|
598
|
+
| Claude Code | `claude mcp add` / `.mcpb` bundle |
|
|
599
|
+
| macOS / Linux | Supported |
|
|
524
600
|
| Windows | Supported when Node/npx are available in the client environment |
|
|
525
|
-
| Obyte mainnet |
|
|
526
|
-
| Obyte testnet | Supported |
|
|
601
|
+
| Obyte mainnet + testnet | Both served simultaneously |
|
|
527
602
|
| Custom hub | HTTPS only, plus localhost HTTP for development |
|
|
528
603
|
|
|
529
604
|
## Release Checklist
|
|
@@ -541,11 +616,10 @@ npx -y ./obyte-mcp-*.tgz --help
|
|
|
541
616
|
Also:
|
|
542
617
|
|
|
543
618
|
- Test the packed tarball with MCP Inspector.
|
|
544
|
-
- Test
|
|
545
|
-
-
|
|
546
|
-
-
|
|
547
|
-
-
|
|
619
|
+
- Test `obyte-mcp install --dry-run` for each client.
|
|
620
|
+
- Verify VS Code, Codex, Claude Desktop, and Claude Code configs.
|
|
621
|
+
- Build and install the `.mcpb` bundle in Claude Desktop.
|
|
622
|
+
- Publish an npm version containing `mcpName`.
|
|
623
|
+
- Publish `server.json` to the Official MCP Registry with `mcp-publisher`.
|
|
548
624
|
- Verify README examples match actual CLI output.
|
|
549
|
-
- Publish with npm provenance if available.
|
|
550
625
|
- Create a GitHub release with changelog and compatibility notes.
|
|
551
|
-
|
package/dist/cliArgs.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CliOptions } from "./types.js";
|
|
2
|
-
export type CommandName = "server" | "setup" | "doctor" | "help" | "version";
|
|
3
|
-
export type ClientName = "codex" | "claude-desktop" | "claude-code";
|
|
2
|
+
export type CommandName = "server" | "setup" | "install" | "doctor" | "help" | "version";
|
|
3
|
+
export type ClientName = "codex" | "claude-desktop" | "claude-code" | "vscode";
|
|
4
|
+
export declare const CLIENT_NAMES: readonly ClientName[];
|
|
4
5
|
export interface ParsedCli {
|
|
5
6
|
command: CommandName;
|
|
6
7
|
options: CliOptions;
|
|
@@ -8,6 +9,11 @@ export interface ParsedCli {
|
|
|
8
9
|
printOnly: boolean;
|
|
9
10
|
client?: ClientName;
|
|
10
11
|
};
|
|
12
|
+
install: {
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
client?: ClientName;
|
|
15
|
+
serverName?: string;
|
|
16
|
+
};
|
|
11
17
|
doctor: {
|
|
12
18
|
json: boolean;
|
|
13
19
|
};
|
package/dist/cliArgs.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { ObyteMcpError } from "./errors.js";
|
|
2
2
|
import { parseNetwork } from "./config.js";
|
|
3
|
+
export const CLIENT_NAMES = ["vscode", "codex", "claude-desktop", "claude-code"];
|
|
3
4
|
export function parseCliArgs(argv) {
|
|
4
5
|
const parsed = {
|
|
5
6
|
command: "server",
|
|
6
7
|
options: {},
|
|
7
8
|
setup: { printOnly: false },
|
|
9
|
+
install: { dryRun: false },
|
|
8
10
|
doctor: { json: false }
|
|
9
11
|
};
|
|
10
12
|
const args = [...argv];
|
|
11
13
|
const first = args[0];
|
|
12
|
-
if (first === "setup" || first === "doctor") {
|
|
14
|
+
if (first === "setup" || first === "install" || first === "doctor") {
|
|
13
15
|
parsed.command = first;
|
|
14
16
|
args.shift();
|
|
15
17
|
}
|
|
@@ -29,6 +31,10 @@ export function parseCliArgs(argv) {
|
|
|
29
31
|
parsed.setup.printOnly = true;
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
34
|
+
if (arg === "--dry-run") {
|
|
35
|
+
parsed.install.dryRun = true;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
32
38
|
if (arg === "--json") {
|
|
33
39
|
parsed.doctor.json = true;
|
|
34
40
|
continue;
|
|
@@ -49,6 +55,26 @@ export function parseCliArgs(argv) {
|
|
|
49
55
|
index += 1;
|
|
50
56
|
continue;
|
|
51
57
|
}
|
|
58
|
+
if (arg === "--mainnet-hub") {
|
|
59
|
+
parsed.options.mainnetHubAddress = requireString(next, "--mainnet-hub");
|
|
60
|
+
index += 1;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (arg === "--testnet-hub") {
|
|
64
|
+
parsed.options.testnetHubAddress = requireString(next, "--testnet-hub");
|
|
65
|
+
index += 1;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (arg === "--mainnet-token-registry") {
|
|
69
|
+
parsed.options.mainnetTokenRegistryAddress = requireString(next, "--mainnet-token-registry");
|
|
70
|
+
index += 1;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (arg === "--testnet-token-registry") {
|
|
74
|
+
parsed.options.testnetTokenRegistryAddress = requireString(next, "--testnet-token-registry");
|
|
75
|
+
index += 1;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
52
78
|
if (arg === "--timeout-ms") {
|
|
53
79
|
parsed.options.timeoutMs = parseInteger(requireString(next, "--timeout-ms"), "--timeout-ms");
|
|
54
80
|
index += 1;
|
|
@@ -65,7 +91,14 @@ export function parseCliArgs(argv) {
|
|
|
65
91
|
continue;
|
|
66
92
|
}
|
|
67
93
|
if (arg === "--client") {
|
|
68
|
-
|
|
94
|
+
const client = parseClient(requireString(next, "--client"));
|
|
95
|
+
parsed.setup.client = client;
|
|
96
|
+
parsed.install.client = client;
|
|
97
|
+
index += 1;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (arg === "--name") {
|
|
101
|
+
parsed.install.serverName = requireString(next, "--name");
|
|
69
102
|
index += 1;
|
|
70
103
|
continue;
|
|
71
104
|
}
|
|
@@ -90,8 +123,8 @@ function parseInteger(value, label) {
|
|
|
90
123
|
return number;
|
|
91
124
|
}
|
|
92
125
|
function parseClient(value) {
|
|
93
|
-
if (value === "codex" || value === "claude-desktop" || value === "claude-code")
|
|
126
|
+
if (value === "codex" || value === "claude-desktop" || value === "claude-code" || value === "vscode")
|
|
94
127
|
return value;
|
|
95
|
-
throw new ObyteMcpError("CONFIG_ERROR", "--client must be codex, claude-desktop, or claude-code", { value });
|
|
128
|
+
throw new ObyteMcpError("CONFIG_ERROR", "--client must be vscode, codex, claude-desktop, or claude-code", { value });
|
|
96
129
|
}
|
|
97
130
|
//# sourceMappingURL=cliArgs.js.map
|