@one-source/mcp 5.0.1 → 5.0.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/README.md CHANGED
@@ -101,14 +101,14 @@ All blockchain API tools accept an optional `network` parameter:
101
101
 
102
102
  ## Authentication
103
103
 
104
- Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
104
+ Blockchain API tools require authentication. Two options are available — if both are set, API key takes priority.
105
105
 
106
106
  | Method | Variable | Description |
107
107
  |--------|----------|-------------|
108
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 |
109
+ | x402 micropayments | `X402_PRIVATE_KEY` | Pay-per-call via USDC on Base, no account required |
110
110
 
111
- ### Option 1: API Key (recommended)
111
+ ### Option 1: API Key
112
112
 
113
113
  #### Claude Code
114
114
 
@@ -138,16 +138,19 @@ claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@la
138
138
  ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
139
139
  ```
140
140
 
141
+ After adding, reload the MCP server and call `1s_setup_check` — it should show `Status: Configured (API key)`.
142
+
141
143
  ### Option 2: x402 Micropayments
142
144
 
143
- 1. **Get an EVM private key** export from MetaMask, Coinbase Wallet, or generate one. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
144
- 2. **Fund the wallet with USDC on Base** — bridge or transfer USDC to the derived wallet address on [Base](https://base.org).
145
- 3. **Pass the key to the server:**
145
+ Pay-per-call via USDC on Base using [x402](https://github.com/coinbase/x402). No account required just an EVM wallet funded with USDC. The server handles payments transparently.
146
+
147
+ 1. **Get an EVM private key** export from MetaMask, Coinbase Wallet, or generate a fresh one. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
148
+ 2. **Pass the key to the server:**
146
149
 
147
150
  #### Claude Code
148
151
 
149
152
  ```bash
150
- claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
153
+ claude mcp add onesource -e X402_PRIVATE_KEY=<key> -- npx -y @one-source/mcp@latest
151
154
  ```
152
155
 
153
156
  #### Claude Desktop / Cursor
@@ -159,7 +162,7 @@ claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@lat
159
162
  "command": "npx",
160
163
  "args": ["-y", "@one-source/mcp@latest"],
161
164
  "env": {
162
- "X402_PRIVATE_KEY": "0x..."
165
+ "X402_PRIVATE_KEY": "<key>"
163
166
  }
164
167
  }
165
168
  }
@@ -169,9 +172,13 @@ claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@lat
169
172
  #### Any MCP Client (stdio)
170
173
 
171
174
  ```bash
172
- X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
175
+ X402_PRIVATE_KEY=<key> npx -y @one-source/mcp@latest
173
176
  ```
174
177
 
178
+ 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".
179
+ 4. **Fund that address with USDC on Base** — send USDC to the address shown, on the [Base](https://base.org) network. A few dollars ($1–5 USDC) is enough for hundreds of calls. Bridge from Ethereum mainnet if needed using the [Base Bridge](https://bridge.base.org).
180
+ 5. **Verify** — call `1s_network_info` for ethereum. If it returns chain data, payments are working.
181
+
175
182
  ### Security
176
183
 
177
184
  Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
@@ -184,8 +191,6 @@ Never commit keys to source control. Use environment variables, a `.env` file (e
184
191
  |----------|---------|-------------|
185
192
  | `ONESOURCE_API_KEY` | — | OneSource API key for Bearer token auth. Takes priority over x402. |
186
193
  | `X402_PRIVATE_KEY` | — | EVM private key (64-char hex, `0x` prefix optional) for automatic x402 USDC payments on Base |
187
- | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
188
- | `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
189
194
 
190
195
  ## Troubleshooting
191
196
 
package/README.npm.md CHANGED
@@ -101,14 +101,14 @@ All blockchain API tools accept an optional `network` parameter:
101
101
 
102
102
  ## Authentication
103
103
 
104
- Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
104
+ Blockchain API tools require authentication. Two options are available — if both are set, API key takes priority.
105
105
 
106
106
  | Method | Variable | Description |
107
107
  |--------|----------|-------------|
108
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 |
109
+ | x402 micropayments | `X402_PRIVATE_KEY` | Pay-per-call via USDC on Base, no account required |
110
110
 
111
- ### Option 1: API Key (recommended)
111
+ ### Option 1: API Key
112
112
 
113
113
  #### Claude Code
114
114
 
@@ -138,16 +138,19 @@ claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@la
138
138
  ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
139
139
  ```
140
140
 
141
+ After adding, reload the MCP server and call `1s_setup_check` — it should show `Status: Configured (API key)`.
142
+
141
143
  ### Option 2: x402 Micropayments
142
144
 
143
- 1. **Get an EVM private key** export from MetaMask, Coinbase Wallet, or generate one. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
144
- 2. **Fund the wallet with USDC on Base** — bridge or transfer USDC to the derived wallet address on [Base](https://base.org).
145
- 3. **Pass the key to the server:**
145
+ Pay-per-call via USDC on Base using [x402](https://github.com/coinbase/x402). No account required just an EVM wallet funded with USDC. The server handles payments transparently.
146
+
147
+ 1. **Get an EVM private key** export from MetaMask, Coinbase Wallet, or generate a fresh one. The key is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
148
+ 2. **Pass the key to the server:**
146
149
 
147
150
  #### Claude Code
148
151
 
149
152
  ```bash
150
- claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
153
+ claude mcp add onesource -e X402_PRIVATE_KEY=<key> -- npx -y @one-source/mcp@latest
151
154
  ```
152
155
 
153
156
  #### Claude Desktop / Cursor
@@ -159,7 +162,7 @@ claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@lat
159
162
  "command": "npx",
160
163
  "args": ["-y", "@one-source/mcp@latest"],
161
164
  "env": {
162
- "X402_PRIVATE_KEY": "0x..."
165
+ "X402_PRIVATE_KEY": "<key>"
163
166
  }
164
167
  }
165
168
  }
@@ -169,9 +172,13 @@ claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@lat
169
172
  #### Any MCP Client (stdio)
170
173
 
171
174
  ```bash
172
- X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
175
+ X402_PRIVATE_KEY=<key> npx -y @one-source/mcp@latest
173
176
  ```
174
177
 
178
+ 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".
179
+ 4. **Fund that address with USDC on Base** — send USDC to the address shown, on the [Base](https://base.org) network. A few dollars ($1–5 USDC) is enough for hundreds of calls. Bridge from Ethereum mainnet if needed using the [Base Bridge](https://bridge.base.org).
180
+ 5. **Verify** — call `1s_network_info` for ethereum. If it returns chain data, payments are working.
181
+
175
182
  ### Security
176
183
 
177
184
  Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
@@ -184,8 +191,6 @@ Never commit keys to source control. Use environment variables, a `.env` file (e
184
191
  |----------|---------|-------------|
185
192
  | `ONESOURCE_API_KEY` | — | OneSource API key for Bearer token auth. Takes priority over x402. |
186
193
  | `X402_PRIVATE_KEY` | — | EVM private key (64-char hex, `0x` prefix optional) for automatic x402 USDC payments on Base |
187
- | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
188
- | `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
189
194
 
190
195
  ## Troubleshooting
191
196
 
package/README.repo.md CHANGED
@@ -101,14 +101,14 @@ All blockchain API tools accept an optional `network` parameter:
101
101
 
102
102
  ## Authentication
103
103
 
104
- Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
104
+ Blockchain API tools require authentication. Two options are available — if both are set, API key takes priority.
105
105
 
106
106
  | Method | Variable | Description |
107
107
  |--------|----------|-------------|
108
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 |
109
+ | x402 micropayments | `X402_PRIVATE_KEY` | Pay-per-call via USDC on Base, no account required |
110
110
 
111
- ### Option 1: API Key (recommended)
111
+ ### Option 1: API Key
112
112
 
113
113
  Set `ONESOURCE_API_KEY` with your OneSource API key.
114
114
 
@@ -142,18 +142,22 @@ Add the `env` block to your MCP config:
142
142
  ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
143
143
  ```
144
144
 
145
+ After adding, reload the MCP server and call `1s_setup_check` — it should show `Status: Configured (API key)`.
146
+
145
147
  ### Option 2: x402 Micropayments
146
148
 
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.
149
+ 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.
148
150
 
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.
151
+ 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.
152
+ 2. **Pass the key to the server** using one of the methods below.
153
+ 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".
154
+ 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).
155
+ 5. **Verify** — call `1s_network_info` for ethereum. If it returns chain data (block number, gas price), x402 payments are working end-to-end.
152
156
 
153
157
  #### Claude Code
154
158
 
155
159
  ```bash
156
- claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
160
+ claude mcp add onesource -e X402_PRIVATE_KEY=<key> -- npx -y @one-source/mcp@latest
157
161
  ```
158
162
 
159
163
  #### Claude Desktop / Cursor
@@ -167,7 +171,7 @@ Add the `env` block to your MCP config:
167
171
  "command": "npx",
168
172
  "args": ["-y", "@one-source/mcp@latest"],
169
173
  "env": {
170
- "X402_PRIVATE_KEY": "0x..."
174
+ "X402_PRIVATE_KEY": "<key>"
171
175
  }
172
176
  }
173
177
  }
@@ -177,7 +181,7 @@ Add the `env` block to your MCP config:
177
181
  #### Any MCP Client (stdio)
178
182
 
179
183
  ```bash
180
- X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
184
+ X402_PRIVATE_KEY=<key> npx -y @one-source/mcp@latest
181
185
  ```
182
186
 
183
187
  ### Config File Locations
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@one-source/mcp",
3
3
  "mcpName": "io.onesource/mcp",
4
- "version": "5.0.1",
4
+ "version": "5.0.3",
5
5
  "type": "module",
6
6
  "description": "Unified MCP server for OneSource — 24 tools for blockchain data",
7
7
  "bin": {
@@ -1,23 +1,23 @@
1
1
  ---
2
2
  name: onesource-mcp-setup
3
3
  description: >-
4
- Guide for installing and configuring the OneSource MCP server with x402
5
- payments. Covers installation, version checking, wallet setup, USDC
4
+ Guide for installing and configuring the OneSource MCP server. Covers both
5
+ authentication options (API key and x402 micropayments), wallet setup, USDC
6
6
  funding on Base, and verification. Use when a user needs help setting up
7
- OneSource MCP or configuring x402 payments.
7
+ OneSource MCP or configuring either auth method.
8
8
  ---
9
9
 
10
10
  # OneSource MCP Setup Guide
11
11
 
12
- OneSource MCP provides 24 tools for blockchain data and live chain queries. Blockchain API tools require authentication — either an API key (`ONESOURCE_API_KEY`) or x402 micropayments in USDC on the Base network (`X402_PRIVATE_KEY`).
12
+ OneSource MCP provides 24 tools for blockchain data and live chain queries. Blockchain API tools require authentication — either an API key (`ONESOURCE_API_KEY`) or x402 micropayments in USDC on the Base network (`X402_PRIVATE_KEY`). If both are set, API key takes priority.
13
13
 
14
14
  ## Before You Start
15
15
 
16
- **Always call `1s_setup_check` before using any other OneSource tools.** This checks the installed version against the latest release and reports x402 payment status.
16
+ **Always call `1s_setup_check` before using any other OneSource tools.** This checks the installed version against the latest release and reports authentication status.
17
17
 
18
18
  - **If an update is available:** Tell the user and help them update before proceeding. Run `npx -y @one-source/mcp@latest` to get the latest version. The update takes effect on the next session — the user will need to restart their MCP client.
19
19
  - **If `1s_setup_check` is not available:** The MCP is either not installed or running a version before this tool existed. Help the user install or update using the instructions in Step 2 below.
20
- - **If x402 is not configured:** The tool will include setup instructions. Walk the user through them before attempting paid API calls.
20
+ - **If auth is not configured:** The tool will include setup instructions. Walk the user through them before attempting API calls.
21
21
 
22
22
  Do not skip this step — outdated versions may be missing tools, fixes, or protocol changes.
23
23
 
@@ -25,8 +25,8 @@ Do not skip this step — outdated versions may be missing tools, fixes, or prot
25
25
 
26
26
  Call the `1s_setup_check` tool. It reports:
27
27
  - Server version (current vs latest)
28
- - Whether x402 payments are configured
29
- - Wallet address (if configured)
28
+ - Which auth method is active (API key, x402), or whether auth is not yet configured
29
+ - Wallet address (if x402 is configured)
30
30
  - API backend connectivity
31
31
 
32
32
  If the tool is not available, the MCP is not installed — go to Step 2.
@@ -70,7 +70,54 @@ npm view @one-source/mcp version
70
70
 
71
71
  To update, reinstall with `@latest` or clear the npx cache: `npx -y @one-source/mcp@latest`.
72
72
 
73
- ## Step 3: Get an EVM Private Key
73
+ ## Step 3: Configure Authentication
74
+
75
+ Choose one option. If both are set, API key takes priority.
76
+
77
+ ### Option A: API Key
78
+
79
+ Set `ONESOURCE_API_KEY` with your OneSource API key.
80
+
81
+ #### Claude Code
82
+
83
+ ```bash
84
+ claude mcp remove onesource
85
+ claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@latest
86
+ ```
87
+
88
+ #### Claude Desktop / Cursor
89
+
90
+ Add the `env` block to your MCP config:
91
+
92
+ ```json
93
+ {
94
+ "mcpServers": {
95
+ "onesource": {
96
+ "command": "npx",
97
+ "args": ["-y", "@one-source/mcp@latest"],
98
+ "env": {
99
+ "ONESOURCE_API_KEY": "<key>"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ #### Any MCP Client (stdio)
107
+
108
+ ```bash
109
+ ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
110
+ ```
111
+
112
+ After adding the key, reload the MCP server (run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor), then call `1s_setup_check`. It should show `Status: Configured (API key)`. You're done — skip to Step 7 to verify a live tool call.
113
+
114
+ ---
115
+
116
+ ### Option B: x402 Micropayments
117
+
118
+ Pay-per-call using USDC on Base. No account required — just an EVM wallet funded with USDC. The server handles payments transparently. Continue with Steps 3B through 6 below.
119
+
120
+ ## Step 3B: Get an EVM Private Key
74
121
 
75
122
  The `X402_PRIVATE_KEY` is an EVM wallet private key — the same kind used by MetaMask, Coinbase Wallet, or Foundry. It is a 64-character hex string. The `0x` prefix is optional — both formats are accepted.
76
123
 
@@ -104,7 +151,7 @@ cast wallet new
104
151
 
105
152
  **Important:** Use a dedicated wallet for MCP payments — do not use your primary wallet with large holdings. Transfer only what you need.
106
153
 
107
- ## Step 4: Set the Private Key
154
+ ## Step 4: Set the Private Key (x402)
108
155
 
109
156
  ### Claude Code
110
157
 
@@ -215,27 +262,32 @@ After setting the variable, restart your MCP client and run `1s_setup_check` to
215
262
  - Use environment variables, a `.env` file (excluded from git), or a secrets manager.
216
263
  - Use a dedicated wallet with minimal funds — only what you need for API calls.
217
264
 
218
- ## Step 5: Fund the Wallet with USDC on Base
265
+ ## Step 5: Find Your Wallet Address (x402)
266
+
267
+ After setting the key and reloading the MCP server:
268
+
269
+ 1. Call `1s_setup_check` — it shows the wallet address derived from your key under "Wallet address". This is the address you need to fund.
270
+ 2. Alternatively, import the key into MetaMask to see the address.
271
+
272
+ ## Step 6: Fund the Wallet with USDC on Base (x402)
219
273
 
220
274
  The wallet must hold **USDC on the Base network** (not Ethereum mainnet, not other tokens).
221
275
 
222
- 1. Get the wallet address call `1s_setup_check` (it shows the address after you set the key), or import the key into MetaMask to see it.
223
- 2. Send USDC to that address **on the Base network**.
224
- 3. A few dollars ($1–5 USDC) is enough for hundreds of API calls.
276
+ 1. Send USDC to the wallet address from Step 5 **on the Base network**.
277
+ 2. A few dollars ($1–5 USDC) is enough for hundreds of API calls.
225
278
 
226
- If you have USDC on Ethereum mainnet, bridge it to Base using the [Base Bridge](https://bridge.base.org) or any cross-chain bridge that supports Base.
279
+ If your USDC is on Ethereum mainnet, bridge it to Base using the [Base Bridge](https://bridge.base.org) or any cross-chain bridge that supports Base.
227
280
 
228
- ## Step 6: Verify
281
+ ## Step 7: Verify
229
282
 
230
- After setting the key, reload and verify:
283
+ After setting your auth (either option) and reloading:
231
284
 
232
- 1. **Reload the MCP server** — In Claude Code, run `/reload-plugins` to pick up config changes without restarting the session.
233
- 2. **Check MCP connection** — Run `/mcp` to confirm the `onesource` server is connected.
234
- 3. **Run `1s_setup_check`**You should see:
235
- - **x402 status:** Configured
236
- - **Wallet address:** Your wallet address
285
+ 1. **Check MCP connection** — Run `/mcp` to confirm the `onesource` server is connected.
286
+ 2. **Run `1s_setup_check`** You should see:
287
+ - **Authentication:** `Configured (API key)` or `Configured (x402)` not "Not configured"
288
+ - **Wallet address:** Your wallet address (x402 only)
237
289
  - **API backend:** Reachable
238
- 4. **Test a paid tool** — Try `1s_network_info` to confirm payments work end-to-end.
290
+ 3. **Test a live tool** — Call `1s_network_info` for ethereum. If it returns a block number and gas price, auth is working end-to-end.
239
291
 
240
292
  > **Tip:** If you edited the config file manually (instead of using `claude mcp add`), you must run `/reload-plugins` for changes to take effect. Restarting Claude Code also works.
241
293
 
@@ -244,9 +296,10 @@ After setting the key, reload and verify:
244
296
  | Problem | Solution |
245
297
  |---------|----------|
246
298
  | `1s_setup_check` shows "Not configured" | Most common cause: config was changed but the MCP server wasn't reloaded. Run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor. If the key still isn't reaching the server, try setting it as an environment variable directly — see **Alternative: Set the Key as an Environment Variable** above. |
299
+ | `1s_setup_check` shows API key configured but tools return 402 | The key may be invalid or the account may not have a developer plan. Verify the key at app.onesource.io. |
247
300
  | "MCP server onesource already exists" error | Run `claude mcp remove onesource` first, then re-add it with your updated config. |
248
301
  | Config changed but nothing happened | Run `/reload-plugins` in Claude Code to reload MCP servers, then `/mcp` to check connection status. |
249
- | Tool returns HTTP 402 error | x402 is not configured, or the wallet has insufficient USDC on Base. |
302
+ | Tool returns HTTP 402 error (x402 path) | x402 is not configured, or the wallet has insufficient USDC on Base. Check `1s_setup_check` for wallet address and balance. |
250
303
  | "x402 setup failed" in server logs | The private key format is wrong. It must be a 64-character hex string (with or without `0x` prefix). |
251
304
  | Key is set but wallet shows 0 USDC | Make sure USDC is on the **Base** network, not Ethereum mainnet or another chain. |
252
305
  | Tools work but results seem stale | Check `1s_setup_check` for version — you may need to update to the latest. |