@one-source/mcp 5.0.4 → 5.1.0
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 +190 -190
- package/README.md +227 -220
- package/README.npm.md +227 -220
- package/README.repo.md +365 -356
- package/dist/cli.js +1 -1
- package/dist/create-server.d.ts +2 -2
- package/dist/create-server.js +2 -2
- package/dist/register-api-tools.d.ts +1 -1
- package/dist/register-api-tools.d.ts.map +1 -1
- package/dist/register-api-tools.js +10 -2
- package/dist/register-api-tools.js.map +1 -1
- package/dist/register-docs-tools.d.ts.map +1 -1
- package/dist/register-docs-tools.js +7 -0
- package/dist/register-docs-tools.js.map +1 -1
- package/package.json +60 -60
- package/skills/onesource-mcp-setup/SKILL.md +308 -308
package/README.repo.md
CHANGED
|
@@ -1,356 +1,365 @@
|
|
|
1
|
-
# @one-source/mcp
|
|
2
|
-
|
|
3
|
-
Unified MCP server for [OneSource](https://docs.onesource.io) —
|
|
4
|
-
|
|
5
|
-
> **What is MCP?** The [Model Context Protocol](https://modelcontextprotocol.io) lets AI assistants call tools and access data sources. This server exposes both the OneSource blockchain API and its documentation as tools.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
### Claude Code
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
claude mcp add onesource -- npx -y @one-source/mcp@latest
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Claude Desktop / Cursor
|
|
16
|
-
|
|
17
|
-
Add to your MCP config:
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"mcpServers": {
|
|
22
|
-
"onesource": {
|
|
23
|
-
"command": "npx",
|
|
24
|
-
"args": ["-y", "@one-source/mcp@latest"]
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Any MCP Client (stdio)
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npx -y @one-source/mcp@latest
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### HTTP Server (self-hosted)
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx -y @one-source/mcp@latest --http
|
|
40
|
-
npx -y @one-source/mcp@latest --http --port=8080
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Then connect your MCP client to `http://localhost:3000/`.
|
|
44
|
-
|
|
45
|
-
Health check: `GET http://localhost:3000/health`
|
|
46
|
-
|
|
47
|
-
## Tools (
|
|
48
|
-
|
|
49
|
-
### Blockchain API — Live Chain (12 tools)
|
|
50
|
-
|
|
51
|
-
| Tool | Description |
|
|
52
|
-
|------|-------------|
|
|
53
|
-
| `1s_allowance_live` | ERC20 allowance check |
|
|
54
|
-
| `1s_contract_info_live` | Contract type detection via ERC165 |
|
|
55
|
-
| `1s_erc1155_balance_live` | ERC1155 balance via RPC |
|
|
56
|
-
| `1s_erc20_balance_live` | ERC20 balance via balanceOf |
|
|
57
|
-
| `1s_erc20_transfers_live` | ERC20 Transfer logs via eth_getLogs |
|
|
58
|
-
| `1s_erc721_tokens_live` | ERC721 token enumeration |
|
|
59
|
-
| `1s_events_live` | Event logs via eth_getLogs |
|
|
60
|
-
| `1s_multi_balance_live` | ETH + multiple ERC20 balances |
|
|
61
|
-
| `1s_nft_metadata_live` | NFT metadata via tokenURI |
|
|
62
|
-
| `1s_nft_owner_live` | NFT owner via ownerOf |
|
|
63
|
-
| `1s_total_supply_live` | Token total supply |
|
|
64
|
-
| `1s_tx_details_live` | Transaction + receipt via RPC |
|
|
65
|
-
|
|
66
|
-
### Blockchain API — Chain Utilities (
|
|
67
|
-
|
|
68
|
-
RPC only.
|
|
69
|
-
|
|
70
|
-
| Tool | Description |
|
|
71
|
-
|------|-------------|
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
|
198
|
-
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
|
220
|
-
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
| `
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
**
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
**
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
```
|
|
342
|
-
mcp
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
1
|
+
# @one-source/mcp
|
|
2
|
+
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 27 tools for blockchain data and live chain queries in a single server.
|
|
4
|
+
|
|
5
|
+
> **What is MCP?** The [Model Context Protocol](https://modelcontextprotocol.io) lets AI assistants call tools and access data sources. This server exposes both the OneSource blockchain API and its documentation as tools.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Claude Code
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
claude mcp add onesource -- npx -y @one-source/mcp@latest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Claude Desktop / Cursor
|
|
16
|
+
|
|
17
|
+
Add to your MCP config:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"onesource": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "@one-source/mcp@latest"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Any MCP Client (stdio)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx -y @one-source/mcp@latest
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### HTTP Server (self-hosted)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx -y @one-source/mcp@latest --http
|
|
40
|
+
npx -y @one-source/mcp@latest --http --port=8080
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then connect your MCP client to `http://localhost:3000/`.
|
|
44
|
+
|
|
45
|
+
Health check: `GET http://localhost:3000/health`
|
|
46
|
+
|
|
47
|
+
## Tools (27)
|
|
48
|
+
|
|
49
|
+
### Blockchain API — Live Chain (12 tools)
|
|
50
|
+
|
|
51
|
+
| Tool | Description |
|
|
52
|
+
|------|-------------|
|
|
53
|
+
| `1s_allowance_live` | ERC20 allowance check |
|
|
54
|
+
| `1s_contract_info_live` | Contract type detection via ERC165 |
|
|
55
|
+
| `1s_erc1155_balance_live` | ERC1155 balance via RPC |
|
|
56
|
+
| `1s_erc20_balance_live` | ERC20 balance via balanceOf |
|
|
57
|
+
| `1s_erc20_transfers_live` | ERC20 Transfer logs via eth_getLogs |
|
|
58
|
+
| `1s_erc721_tokens_live` | ERC721 token enumeration |
|
|
59
|
+
| `1s_events_live` | Event logs via eth_getLogs |
|
|
60
|
+
| `1s_multi_balance_live` | ETH + multiple ERC20 balances |
|
|
61
|
+
| `1s_nft_metadata_live` | NFT metadata via tokenURI |
|
|
62
|
+
| `1s_nft_owner_live` | NFT owner via ownerOf |
|
|
63
|
+
| `1s_total_supply_live` | Token total supply |
|
|
64
|
+
| `1s_tx_details_live` | Transaction + receipt via RPC |
|
|
65
|
+
|
|
66
|
+
### Blockchain API — Chain Utilities (13 tools)
|
|
67
|
+
|
|
68
|
+
RPC only.
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `1s_block_by_number` | Block details by number via RPC |
|
|
73
|
+
| `1s_block_number` | Latest block number |
|
|
74
|
+
| `1s_chain_id` | EIP-155 chain ID |
|
|
75
|
+
| `1s_contract_code` | Contract bytecode |
|
|
76
|
+
| `1s_ens_resolve` | ENS name/address resolution |
|
|
77
|
+
| `1s_estimate_gas` | Gas estimation |
|
|
78
|
+
| `1s_network_info` | Chain ID, block number, gas price |
|
|
79
|
+
| `1s_nonce` | Transaction count |
|
|
80
|
+
| `1s_pending_block` | Pending block from mempool |
|
|
81
|
+
| `1s_proxy_detect` | Proxy contract detection |
|
|
82
|
+
| `1s_simulate_call` | Simulate eth_call |
|
|
83
|
+
| `1s_storage_read` | Read storage slot |
|
|
84
|
+
| `1s_tx_receipt` | Transaction receipt |
|
|
85
|
+
|
|
86
|
+
### Setup & Ops (2 tools)
|
|
87
|
+
|
|
88
|
+
No authentication required.
|
|
89
|
+
|
|
90
|
+
| Tool | Purpose | When to use |
|
|
91
|
+
|------|---------|-------------|
|
|
92
|
+
| `1s_setup_check` | Server health, version, auth status, setup instructions | First thing to call — checks if everything is configured |
|
|
93
|
+
| `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
|
|
94
|
+
|
|
95
|
+
## Networks
|
|
96
|
+
|
|
97
|
+
All blockchain API tools accept an optional `network` parameter:
|
|
98
|
+
|
|
99
|
+
| Network | Description |
|
|
100
|
+
|---------|-------------|
|
|
101
|
+
| `ethereum` | Ethereum mainnet (default) |
|
|
102
|
+
| `sepolia` | Ethereum Sepolia testnet |
|
|
103
|
+
| `avax` | Avalanche C-Chain |
|
|
104
|
+
|
|
105
|
+
## Authentication
|
|
106
|
+
|
|
107
|
+
Blockchain API tools require authentication. Two options are available — if both are set, API key takes priority.
|
|
108
|
+
|
|
109
|
+
| Method | Variable | Description |
|
|
110
|
+
|--------|----------|-------------|
|
|
111
|
+
| API key | `ONESOURCE_API_KEY` | Unlimited calls, no per-call cost |
|
|
112
|
+
| x402 micropayments | `X402_PRIVATE_KEY` | Pay-per-call via USDC on Base, no account required |
|
|
113
|
+
|
|
114
|
+
### Option 1: API Key
|
|
115
|
+
|
|
116
|
+
1. Go to [app.onesource.io](https://app.onesource.io) and create an account.
|
|
117
|
+
2. Subscribe to a developer plan (Stripe checkout).
|
|
118
|
+
3. Navigate to **API Keys** and generate a key.
|
|
119
|
+
4. Copy the key — it starts with `sk_`.
|
|
120
|
+
|
|
121
|
+
#### Claude Code
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@latest
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Claude Desktop / Cursor
|
|
128
|
+
|
|
129
|
+
Add the `env` block to your MCP config:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"onesource": {
|
|
135
|
+
"command": "npx",
|
|
136
|
+
"args": ["-y", "@one-source/mcp@latest"],
|
|
137
|
+
"env": {
|
|
138
|
+
"ONESOURCE_API_KEY": "<key>"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Any MCP Client (stdio)
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
After adding, reload the MCP server and call `1s_setup_check` — it should show `Status: Configured (API key)`.
|
|
152
|
+
|
|
153
|
+
### Option 2: x402 Micropayments
|
|
154
|
+
|
|
155
|
+
Blockchain API endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When you set `X402_PRIVATE_KEY`, the server automatically handles payments — tool calls are paid and retried transparently without any extra work from the agent.
|
|
156
|
+
|
|
157
|
+
1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet, or generate a fresh one. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
|
|
158
|
+
2. **Pass the key to the server** using one of the methods below.
|
|
159
|
+
3. **Reload and find your wallet address** — reload the MCP server, then call `1s_setup_check`. It will show the wallet address derived from your key under "Wallet address".
|
|
160
|
+
4. **Fund that address with USDC on Base** — send USDC to the address shown in `1s_setup_check`, on the [Base](https://base.org) network. A few dollars ($1–5 USDC) is enough for hundreds of calls. If your USDC is on Ethereum mainnet, bridge it using the [Base Bridge](https://bridge.base.org).
|
|
161
|
+
5. **Verify** — call `1s_network_info` for ethereum. If it returns chain data (block number, gas price), x402 payments are working end-to-end.
|
|
162
|
+
|
|
163
|
+
#### Claude Code
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=<key> -- npx -y @one-source/mcp@latest
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Claude Desktop / Cursor
|
|
170
|
+
|
|
171
|
+
Add the `env` block to your MCP config:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"mcpServers": {
|
|
176
|
+
"onesource": {
|
|
177
|
+
"command": "npx",
|
|
178
|
+
"args": ["-y", "@one-source/mcp@latest"],
|
|
179
|
+
"env": {
|
|
180
|
+
"X402_PRIVATE_KEY": "<key>"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Any MCP Client (stdio)
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
X402_PRIVATE_KEY=<key> npx -y @one-source/mcp@latest
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Config File Locations
|
|
194
|
+
|
|
195
|
+
If you prefer editing the config file directly instead of using CLI commands:
|
|
196
|
+
|
|
197
|
+
| Client | Config file path |
|
|
198
|
+
|--------|-----------------|
|
|
199
|
+
| Claude Code | Run `claude mcp get onesource` to see the file path |
|
|
200
|
+
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
201
|
+
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
202
|
+
| Cursor (macOS) | `~/.cursor/mcp.json` |
|
|
203
|
+
| Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
|
|
204
|
+
|
|
205
|
+
Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
|
|
206
|
+
|
|
207
|
+
### Alternative: Set as an Environment Variable
|
|
208
|
+
|
|
209
|
+
Instead of the `env` config block, you can set either variable as a shell or system environment variable: `export ONESOURCE_API_KEY=<key>` (bash/zsh) or `$env:ONESOURCE_API_KEY = "<key>"` (PowerShell). Set it at the OS level for persistence across sessions.
|
|
210
|
+
|
|
211
|
+
### Security
|
|
212
|
+
|
|
213
|
+
Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
214
|
+
|
|
215
|
+
> **After any config change:** Run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor. The MCP server must be reloaded to pick up new environment variables.
|
|
216
|
+
|
|
217
|
+
## Environment Variables
|
|
218
|
+
|
|
219
|
+
| Variable | Default | Description |
|
|
220
|
+
|----------|---------|-------------|
|
|
221
|
+
| `ONESOURCE_API_KEY` | — | OneSource API key for Bearer token auth. Takes priority over x402. |
|
|
222
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (64-char hex, `0x` prefix optional) for automatic x402 USDC payments on Base |
|
|
223
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
|
|
224
|
+
| `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
|
|
225
|
+
| `ONESOURCE_ANALYTICS_URL` | — | Dashboard endpoint for analytics |
|
|
226
|
+
| `X402_ANALYTICS_KEY` | — | API key for dashboard analytics |
|
|
227
|
+
|
|
228
|
+
## Troubleshooting
|
|
229
|
+
|
|
230
|
+
**`1s_setup_check` shows "Not configured"**
|
|
231
|
+
Set either `ONESOURCE_API_KEY` or `X402_PRIVATE_KEY`. Reload the MCP server after setting either variable (see note above). If the key still isn't reaching the server, set it as a shell environment variable directly.
|
|
232
|
+
|
|
233
|
+
**Getting 403 / wrong key active despite correct setup**
|
|
234
|
+
A key set in your shell profile (e.g. `~/.zshrc`, `~/.bash_profile`) is picked up by the MCP server process even if it isn't in your Claude MCP config. Run `echo $ONESOURCE_API_KEY` in your terminal to check. If it prints a value you didn't intend, unset it (`unset ONESOURCE_API_KEY`) or explicitly clear it when adding the server: `claude mcp add onesource -e ONESOURCE_API_KEY= -e X402_PRIVATE_KEY=<key> -- npx -y @one-source/mcp@latest`. `1s_setup_check` shows the first 6 characters of whichever key is active so you can confirm which one the server is using.
|
|
235
|
+
|
|
236
|
+
**Instructions show wrong auth method after reinstall**
|
|
237
|
+
`/reload-plugins` in Claude Code reconnects tools but may not refresh the system prompt the LLM sees. If you switch auth method (e.g. API key → x402), do a full Claude Code restart to ensure the instructions reflect the new auth.
|
|
238
|
+
|
|
239
|
+
**"MCP server onesource already exists" error**
|
|
240
|
+
Run `claude mcp remove onesource` first, then re-add with your updated config.
|
|
241
|
+
|
|
242
|
+
**Windows: `npx` requires `cmd /c` wrapper**
|
|
243
|
+
Claude Code's `/doctor` command may warn about this. Update your MCP config to use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@one-source/mcp@latest"]`.
|
|
244
|
+
|
|
245
|
+
**`npx` hangs with no output**
|
|
246
|
+
That's normal — stdio mode waits for JSON-RPC input on stdin. Use `--http` if you want an HTTP server you can curl.
|
|
247
|
+
|
|
248
|
+
**Port already in use**
|
|
249
|
+
Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
|
|
250
|
+
|
|
251
|
+
## Registry Publishing
|
|
252
|
+
|
|
253
|
+
This package is listed on the [official MCP Registry](https://registry.modelcontextprotocol.io) under the verified namespace `io.onesource/mcp` and on [Glama](https://glama.ai/mcp/servers). When releasing a new version, update both registries.
|
|
254
|
+
|
|
255
|
+
### MCP Registry
|
|
256
|
+
|
|
257
|
+
#### First-Time Setup
|
|
258
|
+
|
|
259
|
+
##### 1. Install Go
|
|
260
|
+
|
|
261
|
+
Download the installer for your platform from [go.dev/dl](https://go.dev/dl/) and run it. Verify:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
go version
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
##### 2. Install mcp-publisher
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
go install github.com/modelcontextprotocol/registry/cmd/mcp-publisher@latest
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
If the Go module path has changed and the command fails, download the binary directly from the [mcp-publisher GitHub releases](https://github.com/modelcontextprotocol/registry/releases) page instead.
|
|
274
|
+
|
|
275
|
+
On Windows, add Go's bin directory to your PATH if the command isn't recognized:
|
|
276
|
+
|
|
277
|
+
```powershell
|
|
278
|
+
$env:PATH += ";$env:USERPROFILE\go\bin"
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Verify:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
mcp-publisher --help
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
##### 3. DNS Authentication (already done)
|
|
288
|
+
|
|
289
|
+
The `onesource.io` domain has a DNS TXT record that proves ownership of the `io.onesource` namespace. This is already configured — you don't need to redo it.
|
|
290
|
+
|
|
291
|
+
The record is on the root domain (`onesource.io`, not `_mcp-registry.onesource.io`):
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
v=MCPv1; k=ed25519; p=7D3U5rufgNXb/lH2MthTRZdDzEGeE7/Jvg8YkiArQc8=
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
You can verify it resolves:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
nslookup -type=TXT onesource.io 8.8.8.8
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
##### 4. Get the Private Key
|
|
304
|
+
|
|
305
|
+
Authentication requires the ed25519 private key in **hex format** that corresponds to the public key in the DNS record. Ask the team lead for this key — it's stored in the team's password manager / vault.
|
|
306
|
+
|
|
307
|
+
If you need to regenerate the keypair (this invalidates the current DNS record and requires updating it):
|
|
308
|
+
|
|
309
|
+
1. Generate a new ed25519 keypair (e.g., `openssl genpkey -algorithm Ed25519 -out key.pem`)
|
|
310
|
+
2. Extract the raw 32-byte private key seed and convert to hex:
|
|
311
|
+
```bash
|
|
312
|
+
openssl pkey -in key.pem -outform DER | tail -c 32 | xxd -p -c 32
|
|
313
|
+
```
|
|
314
|
+
3. Extract the public key in base64 for the DNS TXT record:
|
|
315
|
+
```bash
|
|
316
|
+
openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64
|
|
317
|
+
```
|
|
318
|
+
4. Update the DNS TXT record on `onesource.io` with the new public key:
|
|
319
|
+
```
|
|
320
|
+
v=MCPv1; k=ed25519; p=<base64-public-key>
|
|
321
|
+
```
|
|
322
|
+
5. Wait for DNS propagation before attempting to log in.
|
|
323
|
+
|
|
324
|
+
#### Publishing a New Version
|
|
325
|
+
|
|
326
|
+
Every time you release a new npm version, update the MCP Registry:
|
|
327
|
+
|
|
328
|
+
1. **Publish to npm** (the registry validates the package exists, so this must happen first):
|
|
329
|
+
```bash
|
|
330
|
+
npm run build
|
|
331
|
+
npm publish --access public
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
2. **Update `server.json`** — set both `version` fields to match the new npm version:
|
|
335
|
+
```json
|
|
336
|
+
{
|
|
337
|
+
"version": "x.y.z",
|
|
338
|
+
...
|
|
339
|
+
"packages": [{ "version": "x.y.z", ... }]
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
The `mcpName` field in `package.json` must be `"io.onesource/mcp"` and must match the `name` field in `server.json`. This is already set — don't remove it.
|
|
343
|
+
|
|
344
|
+
3. **Authenticate** (tokens expire, so do this each time):
|
|
345
|
+
```bash
|
|
346
|
+
mcp-publisher login dns --domain onesource.io --private-key <ed25519-hex-private-key>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
4. **Publish to the registry:**
|
|
350
|
+
```bash
|
|
351
|
+
mcp-publisher publish
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
5. **Verify:**
|
|
355
|
+
```bash
|
|
356
|
+
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=onesource"
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Glama
|
|
360
|
+
|
|
361
|
+
Glama auto-syncs from the GitHub repo daily. No manual steps needed after a release — just make sure changes are pushed to `main`. The `glama.json` file in the repo root controls ownership. Manual re-sync is available from the [Glama admin panel](https://glama.ai/mcp/servers) after claiming the server.
|
|
362
|
+
|
|
363
|
+
## License
|
|
364
|
+
|
|
365
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|