@one-source/mcp 4.0.4 → 5.0.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/README.repo.md CHANGED
@@ -1,327 +1,349 @@
1
- # @one-source/mcp
2
-
3
- Unified MCP server for [OneSource](https://docs.onesource.io) — 34 tools for blockchain data, live chain queries, and API documentation in a single server.
4
-
5
- Combines [`@one-source/api-mcp`](https://www.npmjs.com/package/@one-source/api-mcp) (22 tools) and [`@one-source/docs-mcp`](https://www.npmjs.com/package/@one-source/docs-mcp) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
6
-
7
- > **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.
8
-
9
- ## Quick Start
10
-
11
- ### Claude Code
12
-
13
- ```bash
14
- claude mcp add onesource -- npx -y @one-source/mcp@latest
15
- ```
16
-
17
- ### Claude Desktop / Cursor
18
-
19
- Add to your MCP config:
20
-
21
- ```json
22
- {
23
- "mcpServers": {
24
- "onesource": {
25
- "command": "npx",
26
- "args": ["-y", "@one-source/mcp@latest"]
27
- }
28
- }
29
- }
30
- ```
31
-
32
- ### Any MCP Client (stdio)
33
-
34
- ```bash
35
- npx -y @one-source/mcp@latest
36
- ```
37
-
38
- ### HTTP Server (self-hosted)
39
-
40
- ```bash
41
- npx -y @one-source/mcp@latest --http
42
- npx -y @one-source/mcp@latest --http --port=8080
43
- ```
44
-
45
- Then connect your MCP client to `http://localhost:3000/`.
46
-
47
- Health check: `GET http://localhost:3000/health`
48
-
49
- ## Tools (34)
50
-
51
- ### Blockchain API Live Chain (12 tools)
52
-
53
- | Tool | Description |
54
- |------|-------------|
55
- | `1s_allowance_live` | ERC20 allowance check |
56
- | `1s_contract_info_live` | Contract type detection via ERC165 |
57
- | `1s_erc1155_balance_live` | ERC1155 balance via RPC |
58
- | `1s_erc20_balance_live` | ERC20 balance via balanceOf |
59
- | `1s_erc20_transfers_live` | ERC20 Transfer logs via eth_getLogs |
60
- | `1s_erc721_tokens_live` | ERC721 token enumeration |
61
- | `1s_events_live` | Event logs via eth_getLogs |
62
- | `1s_multi_balance_live` | ETH + multiple ERC20 balances |
63
- | `1s_nft_metadata_live` | NFT metadata via tokenURI |
64
- | `1s_nft_owner_live` | NFT owner via ownerOf |
65
- | `1s_total_supply_live` | Token total supply |
66
- | `1s_tx_details_live` | Transaction + receipt via RPC |
67
-
68
- ### Blockchain API — Chain Utilities (10 tools)
69
-
70
- RPC only.
71
-
72
- | Tool | Description |
73
- |------|-------------|
74
- | `1s_contract_code` | Contract bytecode |
75
- | `1s_ens_resolve` | ENS name/address resolution |
76
- | `1s_estimate_gas` | Gas estimation |
77
- | `1s_network_info` | Chain ID, block number, gas price |
78
- | `1s_nonce` | Transaction count |
79
- | `1s_pending_block` | Pending block from mempool |
80
- | `1s_proxy_detect` | Proxy contract detection |
81
- | `1s_simulate_call` | Simulate eth_call |
82
- | `1s_storage_read` | Read storage slot |
83
- | `1s_tx_receipt` | Transaction receipt |
84
-
85
- ### Documentation, Setup & Ops (12 tools)
86
-
87
- Read-only, no API key required.
88
-
89
- | Tool | Purpose | When to use |
90
- |------|---------|-------------|
91
- | `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
92
- | `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
93
- | `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
94
- | `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
95
- | `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
96
- | `list_examples` | Browse or search working GraphQL examples | Finding ready-to-use query patterns |
97
- | `list_supported_chains` | All supported blockchain networks + endpoints | First question: "What chains are supported?" |
98
- | `get_filter_reference` | Filter fields and operators for a list query | Building filtered queries with correct syntax |
99
- | `get_pagination_guide` | Cursor-based pagination pattern with examples | Implementing pagination for list queries |
100
- | `get_schema_overview` | High-level summary of the entire schema | Exploring the API surface before diving in |
101
- | `get_authentication_guide` | API key format, headers, and endpoints | Setting up authentication for the first time |
102
- | `get_mcp_setup_guide` | MCP installation, setup, x402 config guide | Setting up the MCP server or configuring payments |
103
-
104
- ## Networks
105
-
106
- All blockchain API tools accept an optional `network` parameter:
107
-
108
- | Network | Description |
109
- |---------|-------------|
110
- | `ethereum` | Ethereum mainnet (default) |
111
- | `sepolia` | Ethereum Sepolia testnet |
112
- | `avax` | Avalanche C-Chain |
113
-
114
- ## Payment (x402)
115
-
116
- 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 that return HTTP 402 are paid and retried without any extra work from the agent.
117
-
118
- Documentation tools are always free no key or payment needed.
119
-
120
- ### Setup
121
-
122
- 1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key must start with `0x` followed by 64 hex characters (e.g. `0x4c08...7e3d`). Some wallets export the key without the `0x` prefix — if yours is just letters and numbers without `0x` at the start, add `0x` to the beginning yourself.
123
- 2. **Fund the wallet with USDC on Base** — the wallet address derived from the key must hold USDC on the [Base](https://base.org) network. Bridge or transfer USDC to it.
124
- 3. **Pass the key to the server** using one of the methods below.
125
-
126
- ### Claude Code
127
-
128
- ```bash
129
- claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
130
- ```
131
-
132
- ### Claude Desktop / Cursor
133
-
134
- Add the `env` block to your MCP config:
135
-
136
- ```json
137
- {
138
- "mcpServers": {
139
- "onesource": {
140
- "command": "npx",
141
- "args": ["-y", "@one-source/mcp@latest"],
142
- "env": {
143
- "X402_PRIVATE_KEY": "0x..."
144
- }
145
- }
146
- }
147
- }
148
- ```
149
-
150
- ### Any MCP Client (stdio)
151
-
152
- ```bash
153
- X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
154
- ```
155
-
156
- ### Config File Locations
157
-
158
- If you prefer editing the config file directly instead of using CLI commands:
159
-
160
- | Client | Config file path |
161
- |--------|-----------------|
162
- | Claude Code | Run `claude mcp get onesource` to see the file path |
163
- | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
164
- | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
165
- | Cursor (macOS) | `~/.cursor/mcp.json` |
166
- | Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
167
-
168
- Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
169
-
170
- ### Alternative: Set as an Environment Variable
171
-
172
- Instead of the `env` config block, you can set `X402_PRIVATE_KEY` as a shell or system environment variable: `export X402_PRIVATE_KEY=0x...` (bash/zsh) or `$env:X402_PRIVATE_KEY = "0x..."` (PowerShell). Set it at the OS level for persistence across sessions.
173
-
174
- ### Security
175
-
176
- Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
177
-
178
- > **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.
179
-
180
- ## Environment Variables
181
-
182
- | Variable | Default | Description |
183
- |----------|---------|-------------|
184
- | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
185
- | `ONESOURCE_ANALYTICS` | | Set to `false` to disable analytics |
186
- | `ONESOURCE_ANALYTICS_URL` | — | Dashboard endpoint for analytics |
187
- | `X402_ANALYTICS_KEY` | | API key for dashboard analytics |
188
- | `X402_PRIVATE_KEY` | — | EVM private key (hex, 0x-prefixed) for automatic x402 USDC payments on Base |
189
-
190
- ## Troubleshooting
191
-
192
- **`1s_setup_check` shows "Not configured"**
193
- Reload the MCP server first (see note above). If the key still isn't reaching the server after reloading, set it as an environment variable directly.
194
-
195
- **"MCP server onesource already exists" error**
196
- Run `claude mcp remove onesource` first, then re-add with your updated config.
197
-
198
- **Windows: `npx` requires `cmd /c` wrapper**
199
- 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"]`.
200
-
201
- **`npx` hangs with no output**
202
- That's normal — stdio mode waits for JSON-RPC input on stdin. Use `--http` if you want an HTTP server you can curl.
203
-
204
- **Port already in use**
205
- Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
206
-
207
- **Tools return "Data files may be missing"**
208
- Try reinstalling: `npm install @one-source/mcp`
209
-
210
- **"Type not found" even though it exists**
211
- Type names are case-insensitive but must match the GraphQL name (e.g. `Transaction`, not `transaction_type`). The tool will suggest close matches.
212
-
213
- ## Registry Publishing
214
-
215
- 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.
216
-
217
- ### MCP Registry
218
-
219
- #### First-Time Setup
220
-
221
- ##### 1. Install Go
222
-
223
- Download the installer for your platform from [go.dev/dl](https://go.dev/dl/) and run it. Verify:
224
-
225
- ```bash
226
- go version
227
- ```
228
-
229
- ##### 2. Install mcp-publisher
230
-
231
- ```bash
232
- go install github.com/modelcontextprotocol/registry/cmd/mcp-publisher@latest
233
- ```
234
-
235
- 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.
236
-
237
- On Windows, add Go's bin directory to your PATH if the command isn't recognized:
238
-
239
- ```powershell
240
- $env:PATH += ";$env:USERPROFILE\go\bin"
241
- ```
242
-
243
- Verify:
244
-
245
- ```bash
246
- mcp-publisher --help
247
- ```
248
-
249
- ##### 3. DNS Authentication (already done)
250
-
251
- 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.
252
-
253
- The record is on the root domain (`onesource.io`, not `_mcp-registry.onesource.io`):
254
-
255
- ```
256
- v=MCPv1; k=ed25519; p=7D3U5rufgNXb/lH2MthTRZdDzEGeE7/Jvg8YkiArQc8=
257
- ```
258
-
259
- You can verify it resolves:
260
-
261
- ```bash
262
- nslookup -type=TXT onesource.io 8.8.8.8
263
- ```
264
-
265
- ##### 4. Get the Private Key
266
-
267
- 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.
268
-
269
- If you need to regenerate the keypair (this invalidates the current DNS record and requires updating it):
270
-
271
- 1. Generate a new ed25519 keypair (e.g., `openssl genpkey -algorithm Ed25519 -out key.pem`)
272
- 2. Extract the raw 32-byte private key seed and convert to hex:
273
- ```bash
274
- openssl pkey -in key.pem -outform DER | tail -c 32 | xxd -p -c 32
275
- ```
276
- 3. Extract the public key in base64 for the DNS TXT record:
277
- ```bash
278
- openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64
279
- ```
280
- 4. Update the DNS TXT record on `onesource.io` with the new public key:
281
- ```
282
- v=MCPv1; k=ed25519; p=<base64-public-key>
283
- ```
284
- 5. Wait for DNS propagation before attempting to log in.
285
-
286
- #### Publishing a New Version
287
-
288
- Every time you release a new npm version, update the MCP Registry:
289
-
290
- 1. **Publish to npm** (the registry validates the package exists, so this must happen first):
291
- ```bash
292
- npm run build
293
- npm publish --access public
294
- ```
295
-
296
- 2. **Update `server.json`** set both `version` fields to match the new npm version:
297
- ```json
298
- {
299
- "version": "x.y.z",
300
- ...
301
- "packages": [{ "version": "x.y.z", ... }]
302
- }
303
- ```
304
- 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.
305
-
306
- 3. **Authenticate** (tokens expire, so do this each time):
307
- ```bash
308
- mcp-publisher login dns --domain onesource.io --private-key <ed25519-hex-private-key>
309
- ```
310
-
311
- 4. **Publish to the registry:**
312
- ```bash
313
- mcp-publisher publish
314
- ```
315
-
316
- 5. **Verify:**
317
- ```bash
318
- curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=onesource"
319
- ```
320
-
321
- ### Glama
322
-
323
- 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.
324
-
325
- ## License
326
-
327
- Apache 2.0 — see [LICENSE](LICENSE) for details.
1
+ # @one-source/mcp
2
+
3
+ Unified MCP server for [OneSource](https://docs.onesource.io) — 24 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 (24)
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 (10 tools)
67
+
68
+ RPC only.
69
+
70
+ | Tool | Description |
71
+ |------|-------------|
72
+ | `1s_contract_code` | Contract bytecode |
73
+ | `1s_ens_resolve` | ENS name/address resolution |
74
+ | `1s_estimate_gas` | Gas estimation |
75
+ | `1s_network_info` | Chain ID, block number, gas price |
76
+ | `1s_nonce` | Transaction count |
77
+ | `1s_pending_block` | Pending block from mempool |
78
+ | `1s_proxy_detect` | Proxy contract detection |
79
+ | `1s_simulate_call` | Simulate eth_call |
80
+ | `1s_storage_read` | Read storage slot |
81
+ | `1s_tx_receipt` | Transaction receipt |
82
+
83
+ ### Setup & Ops (2 tools)
84
+
85
+ No authentication required.
86
+
87
+ | Tool | Purpose | When to use |
88
+ |------|---------|-------------|
89
+ | `1s_setup_check` | Server health, version, auth status, setup instructions | First thing to call — checks if everything is configured |
90
+ | `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
91
+
92
+ ## Networks
93
+
94
+ All blockchain API tools accept an optional `network` parameter:
95
+
96
+ | Network | Description |
97
+ |---------|-------------|
98
+ | `ethereum` | Ethereum mainnet (default) |
99
+ | `sepolia` | Ethereum Sepolia testnet |
100
+ | `avax` | Avalanche C-Chain |
101
+
102
+ ## Authentication
103
+
104
+ Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
105
+
106
+ | Method | Variable | Description |
107
+ |--------|----------|-------------|
108
+ | API key | `ONESOURCE_API_KEY` | Unlimited calls, no per-call cost |
109
+ | x402 micropayments | `X402_PRIVATE_KEY` | Pay-per-call via USDC on Base |
110
+
111
+ ### Option 1: API Key (recommended)
112
+
113
+ Set `ONESOURCE_API_KEY` with your OneSource API key.
114
+
115
+ #### Claude Code
116
+
117
+ ```bash
118
+ claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@latest
119
+ ```
120
+
121
+ #### Claude Desktop / Cursor
122
+
123
+ Add the `env` block to your MCP config:
124
+
125
+ ```json
126
+ {
127
+ "mcpServers": {
128
+ "onesource": {
129
+ "command": "npx",
130
+ "args": ["-y", "@one-source/mcp@latest"],
131
+ "env": {
132
+ "ONESOURCE_API_KEY": "<key>"
133
+ }
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ #### Any MCP Client (stdio)
140
+
141
+ ```bash
142
+ ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
143
+ ```
144
+
145
+ ### Option 2: x402 Micropayments
146
+
147
+ 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 that return HTTP 402 are paid and retried without any extra work from the agent.
148
+
149
+ 1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
150
+ 2. **Fund the wallet with USDC on Base** — the wallet address derived from the key must hold USDC on the [Base](https://base.org) network. Bridge or transfer USDC to it.
151
+ 3. **Pass the key to the server** using one of the methods below.
152
+
153
+ #### Claude Code
154
+
155
+ ```bash
156
+ claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
157
+ ```
158
+
159
+ #### Claude Desktop / Cursor
160
+
161
+ Add the `env` block to your MCP config:
162
+
163
+ ```json
164
+ {
165
+ "mcpServers": {
166
+ "onesource": {
167
+ "command": "npx",
168
+ "args": ["-y", "@one-source/mcp@latest"],
169
+ "env": {
170
+ "X402_PRIVATE_KEY": "0x..."
171
+ }
172
+ }
173
+ }
174
+ }
175
+ ```
176
+
177
+ #### Any MCP Client (stdio)
178
+
179
+ ```bash
180
+ X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
181
+ ```
182
+
183
+ ### Config File Locations
184
+
185
+ If you prefer editing the config file directly instead of using CLI commands:
186
+
187
+ | Client | Config file path |
188
+ |--------|-----------------|
189
+ | Claude Code | Run `claude mcp get onesource` to see the file path |
190
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
191
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
192
+ | Cursor (macOS) | `~/.cursor/mcp.json` |
193
+ | Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
194
+
195
+ Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
196
+
197
+ ### Alternative: Set as an Environment Variable
198
+
199
+ 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.
200
+
201
+ ### Security
202
+
203
+ Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
204
+
205
+ > **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.
206
+
207
+ ## Environment Variables
208
+
209
+ | Variable | Default | Description |
210
+ |----------|---------|-------------|
211
+ | `ONESOURCE_API_KEY` | | OneSource API key for Bearer token auth. Takes priority over x402. |
212
+ | `X402_PRIVATE_KEY` | — | EVM private key (64-char hex, `0x` prefix optional) for automatic x402 USDC payments on Base |
213
+ | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
214
+ | `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
215
+ | `ONESOURCE_ANALYTICS_URL` | | Dashboard endpoint for analytics |
216
+ | `X402_ANALYTICS_KEY` | — | API key for dashboard analytics |
217
+
218
+ ## Troubleshooting
219
+
220
+ **`1s_setup_check` shows "Not configured"**
221
+ 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.
222
+
223
+ **"MCP server onesource already exists" error**
224
+ Run `claude mcp remove onesource` first, then re-add with your updated config.
225
+
226
+ **Windows: `npx` requires `cmd /c` wrapper**
227
+ 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"]`.
228
+
229
+ **`npx` hangs with no output**
230
+ That's normal — stdio mode waits for JSON-RPC input on stdin. Use `--http` if you want an HTTP server you can curl.
231
+
232
+ **Port already in use**
233
+ Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
234
+
235
+ ## Registry Publishing
236
+
237
+ 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.
238
+
239
+ ### MCP Registry
240
+
241
+ #### First-Time Setup
242
+
243
+ ##### 1. Install Go
244
+
245
+ Download the installer for your platform from [go.dev/dl](https://go.dev/dl/) and run it. Verify:
246
+
247
+ ```bash
248
+ go version
249
+ ```
250
+
251
+ ##### 2. Install mcp-publisher
252
+
253
+ ```bash
254
+ go install github.com/modelcontextprotocol/registry/cmd/mcp-publisher@latest
255
+ ```
256
+
257
+ 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.
258
+
259
+ On Windows, add Go's bin directory to your PATH if the command isn't recognized:
260
+
261
+ ```powershell
262
+ $env:PATH += ";$env:USERPROFILE\go\bin"
263
+ ```
264
+
265
+ Verify:
266
+
267
+ ```bash
268
+ mcp-publisher --help
269
+ ```
270
+
271
+ ##### 3. DNS Authentication (already done)
272
+
273
+ 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.
274
+
275
+ The record is on the root domain (`onesource.io`, not `_mcp-registry.onesource.io`):
276
+
277
+ ```
278
+ v=MCPv1; k=ed25519; p=7D3U5rufgNXb/lH2MthTRZdDzEGeE7/Jvg8YkiArQc8=
279
+ ```
280
+
281
+ You can verify it resolves:
282
+
283
+ ```bash
284
+ nslookup -type=TXT onesource.io 8.8.8.8
285
+ ```
286
+
287
+ ##### 4. Get the Private Key
288
+
289
+ 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.
290
+
291
+ If you need to regenerate the keypair (this invalidates the current DNS record and requires updating it):
292
+
293
+ 1. Generate a new ed25519 keypair (e.g., `openssl genpkey -algorithm Ed25519 -out key.pem`)
294
+ 2. Extract the raw 32-byte private key seed and convert to hex:
295
+ ```bash
296
+ openssl pkey -in key.pem -outform DER | tail -c 32 | xxd -p -c 32
297
+ ```
298
+ 3. Extract the public key in base64 for the DNS TXT record:
299
+ ```bash
300
+ openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64
301
+ ```
302
+ 4. Update the DNS TXT record on `onesource.io` with the new public key:
303
+ ```
304
+ v=MCPv1; k=ed25519; p=<base64-public-key>
305
+ ```
306
+ 5. Wait for DNS propagation before attempting to log in.
307
+
308
+ #### Publishing a New Version
309
+
310
+ Every time you release a new npm version, update the MCP Registry:
311
+
312
+ 1. **Publish to npm** (the registry validates the package exists, so this must happen first):
313
+ ```bash
314
+ npm run build
315
+ npm publish --access public
316
+ ```
317
+
318
+ 2. **Update `server.json`** — set both `version` fields to match the new npm version:
319
+ ```json
320
+ {
321
+ "version": "x.y.z",
322
+ ...
323
+ "packages": [{ "version": "x.y.z", ... }]
324
+ }
325
+ ```
326
+ 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.
327
+
328
+ 3. **Authenticate** (tokens expire, so do this each time):
329
+ ```bash
330
+ mcp-publisher login dns --domain onesource.io --private-key <ed25519-hex-private-key>
331
+ ```
332
+
333
+ 4. **Publish to the registry:**
334
+ ```bash
335
+ mcp-publisher publish
336
+ ```
337
+
338
+ 5. **Verify:**
339
+ ```bash
340
+ curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=onesource"
341
+ ```
342
+
343
+ ### Glama
344
+
345
+ 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.
346
+
347
+ ## License
348
+
349
+ Apache 2.0 — see [LICENSE](LICENSE) for details.