@one-source/mcp 3.0.0 → 3.1.1
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 +47 -6
- package/README.npm.md +47 -6
- package/README.repo.md +296 -255
- package/SKILL.md +159 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -1
- package/dist/cli.js.map +1 -1
- package/dist/create-server.d.ts +5 -1
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +3 -1
- package/dist/create-server.js.map +1 -1
- package/dist/register-docs-tools.d.ts +5 -1
- package/dist/register-docs-tools.d.ts.map +1 -1
- package/dist/register-docs-tools.js +102 -3
- package/dist/register-docs-tools.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @one-source/mcp
|
|
2
2
|
|
|
3
|
-
Unified MCP server for [OneSource](https://docs.onesource.io) —
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 32 tools for blockchain data, live chain queries, and API documentation in a single server.
|
|
4
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) (
|
|
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) (10 tools) so your AI assistant gets full access to OneSource with one MCP connection.
|
|
6
6
|
|
|
7
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
8
|
|
|
@@ -44,7 +44,7 @@ npx @one-source/mcp --http --port=8080
|
|
|
44
44
|
|
|
45
45
|
Then connect your MCP client to `http://localhost:3000/`.
|
|
46
46
|
|
|
47
|
-
## Tools (
|
|
47
|
+
## Tools (32)
|
|
48
48
|
|
|
49
49
|
### Blockchain API — Live Chain (12 tools)
|
|
50
50
|
|
|
@@ -78,12 +78,13 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
78
78
|
| `1s_storage_read` | Read storage slot |
|
|
79
79
|
| `1s_tx_receipt` | Transaction receipt |
|
|
80
80
|
|
|
81
|
-
### Documentation (
|
|
81
|
+
### Documentation & Setup (10 tools)
|
|
82
82
|
|
|
83
83
|
Read-only, no API key required.
|
|
84
84
|
|
|
85
85
|
| Tool | Purpose | When to use |
|
|
86
86
|
|------|---------|-------------|
|
|
87
|
+
| `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
|
|
87
88
|
| `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
|
|
88
89
|
| `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
|
|
89
90
|
| `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
|
|
@@ -106,9 +107,49 @@ All blockchain API tools accept an optional `network` parameter:
|
|
|
106
107
|
|
|
107
108
|
## Payment (x402)
|
|
108
109
|
|
|
109
|
-
Blockchain API endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When the
|
|
110
|
+
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.
|
|
110
111
|
|
|
111
|
-
Documentation tools are always free — no
|
|
112
|
+
Documentation tools are always free — no key or payment needed.
|
|
113
|
+
|
|
114
|
+
### Setup
|
|
115
|
+
|
|
116
|
+
1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key is a hex string starting with `0x`.
|
|
117
|
+
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.
|
|
118
|
+
3. **Pass the key to the server** using one of the methods below.
|
|
119
|
+
|
|
120
|
+
### Claude Code
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx @one-source/mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Claude Desktop / Cursor
|
|
127
|
+
|
|
128
|
+
Add the `env` block to your MCP config:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"onesource": {
|
|
134
|
+
"command": "npx",
|
|
135
|
+
"args": ["-y", "@one-source/mcp"],
|
|
136
|
+
"env": {
|
|
137
|
+
"X402_PRIVATE_KEY": "0x..."
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Any MCP Client (stdio)
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
X402_PRIVATE_KEY=0x... npx @one-source/mcp
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Security
|
|
151
|
+
|
|
152
|
+
Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
112
153
|
|
|
113
154
|
## License
|
|
114
155
|
|
package/README.npm.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @one-source/mcp
|
|
2
2
|
|
|
3
|
-
Unified MCP server for [OneSource](https://docs.onesource.io) —
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 32 tools for blockchain data, live chain queries, and API documentation in a single server.
|
|
4
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) (
|
|
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) (10 tools) so your AI assistant gets full access to OneSource with one MCP connection.
|
|
6
6
|
|
|
7
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
8
|
|
|
@@ -44,7 +44,7 @@ npx @one-source/mcp --http --port=8080
|
|
|
44
44
|
|
|
45
45
|
Then connect your MCP client to `http://localhost:3000/`.
|
|
46
46
|
|
|
47
|
-
## Tools (
|
|
47
|
+
## Tools (32)
|
|
48
48
|
|
|
49
49
|
### Blockchain API — Live Chain (12 tools)
|
|
50
50
|
|
|
@@ -78,12 +78,13 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
78
78
|
| `1s_storage_read` | Read storage slot |
|
|
79
79
|
| `1s_tx_receipt` | Transaction receipt |
|
|
80
80
|
|
|
81
|
-
### Documentation (
|
|
81
|
+
### Documentation & Setup (10 tools)
|
|
82
82
|
|
|
83
83
|
Read-only, no API key required.
|
|
84
84
|
|
|
85
85
|
| Tool | Purpose | When to use |
|
|
86
86
|
|------|---------|-------------|
|
|
87
|
+
| `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
|
|
87
88
|
| `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
|
|
88
89
|
| `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
|
|
89
90
|
| `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
|
|
@@ -106,9 +107,49 @@ All blockchain API tools accept an optional `network` parameter:
|
|
|
106
107
|
|
|
107
108
|
## Payment (x402)
|
|
108
109
|
|
|
109
|
-
Blockchain API endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When the
|
|
110
|
+
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.
|
|
110
111
|
|
|
111
|
-
Documentation tools are always free — no
|
|
112
|
+
Documentation tools are always free — no key or payment needed.
|
|
113
|
+
|
|
114
|
+
### Setup
|
|
115
|
+
|
|
116
|
+
1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key is a hex string starting with `0x`.
|
|
117
|
+
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.
|
|
118
|
+
3. **Pass the key to the server** using one of the methods below.
|
|
119
|
+
|
|
120
|
+
### Claude Code
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx @one-source/mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Claude Desktop / Cursor
|
|
127
|
+
|
|
128
|
+
Add the `env` block to your MCP config:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"onesource": {
|
|
134
|
+
"command": "npx",
|
|
135
|
+
"args": ["-y", "@one-source/mcp"],
|
|
136
|
+
"env": {
|
|
137
|
+
"X402_PRIVATE_KEY": "0x..."
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Any MCP Client (stdio)
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
X402_PRIVATE_KEY=0x... npx @one-source/mcp
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Security
|
|
151
|
+
|
|
152
|
+
Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
112
153
|
|
|
113
154
|
## License
|
|
114
155
|
|
package/README.repo.md
CHANGED
|
@@ -1,255 +1,296 @@
|
|
|
1
|
-
# @one-source/mcp
|
|
2
|
-
|
|
3
|
-
Unified MCP server for [OneSource](https://docs.onesource.io) —
|
|
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) (
|
|
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 @one-source/mcp
|
|
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"]
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Any MCP Client (stdio)
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx @one-source/mcp
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### HTTP Server (self-hosted)
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx @one-source/mcp --http
|
|
42
|
-
npx @one-source/mcp --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 (
|
|
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 (
|
|
86
|
-
|
|
87
|
-
Read-only, no API key required.
|
|
88
|
-
|
|
89
|
-
| Tool | Purpose | When to use |
|
|
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
|
-
mcp
|
|
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
|
-
|
|
1
|
+
# @one-source/mcp
|
|
2
|
+
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 32 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) (10 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 @one-source/mcp
|
|
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"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Any MCP Client (stdio)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx @one-source/mcp
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### HTTP Server (self-hosted)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx @one-source/mcp --http
|
|
42
|
+
npx @one-source/mcp --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 (32)
|
|
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 (10 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
|
+
| `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
|
|
93
|
+
| `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
|
|
94
|
+
| `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
|
|
95
|
+
| `list_examples` | Browse or search working GraphQL examples | Finding ready-to-use query patterns |
|
|
96
|
+
| `list_supported_chains` | All supported blockchain networks + endpoints | First question: "What chains are supported?" |
|
|
97
|
+
| `get_filter_reference` | Filter fields and operators for a list query | Building filtered queries with correct syntax |
|
|
98
|
+
| `get_pagination_guide` | Cursor-based pagination pattern with examples | Implementing pagination for list queries |
|
|
99
|
+
| `get_schema_overview` | High-level summary of the entire schema | Exploring the API surface before diving in |
|
|
100
|
+
| `get_authentication_guide` | API key format, headers, and endpoints | Setting up authentication for the first time |
|
|
101
|
+
|
|
102
|
+
## Networks
|
|
103
|
+
|
|
104
|
+
All blockchain API tools accept an optional `network` parameter:
|
|
105
|
+
|
|
106
|
+
| Network | Description |
|
|
107
|
+
|---------|-------------|
|
|
108
|
+
| `ethereum` | Ethereum mainnet (default) |
|
|
109
|
+
| `sepolia` | Ethereum Sepolia testnet |
|
|
110
|
+
| `avax` | Avalanche C-Chain |
|
|
111
|
+
|
|
112
|
+
## Payment (x402)
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
Documentation tools are always free — no key or payment needed.
|
|
117
|
+
|
|
118
|
+
### Setup
|
|
119
|
+
|
|
120
|
+
1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key is a hex string starting with `0x`.
|
|
121
|
+
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.
|
|
122
|
+
3. **Pass the key to the server** using one of the methods below.
|
|
123
|
+
|
|
124
|
+
### Claude Code
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx @one-source/mcp
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Claude Desktop / Cursor
|
|
131
|
+
|
|
132
|
+
Add the `env` block to your MCP config:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"mcpServers": {
|
|
137
|
+
"onesource": {
|
|
138
|
+
"command": "npx",
|
|
139
|
+
"args": ["-y", "@one-source/mcp"],
|
|
140
|
+
"env": {
|
|
141
|
+
"X402_PRIVATE_KEY": "0x..."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Any MCP Client (stdio)
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
X402_PRIVATE_KEY=0x... npx @one-source/mcp
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Security
|
|
155
|
+
|
|
156
|
+
Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
157
|
+
|
|
158
|
+
## Environment Variables
|
|
159
|
+
|
|
160
|
+
| Variable | Default | Description |
|
|
161
|
+
|----------|---------|-------------|
|
|
162
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
|
|
163
|
+
| `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
|
|
164
|
+
| `ONESOURCE_ANALYTICS_URL` | — | Dashboard endpoint for analytics |
|
|
165
|
+
| `X402_ANALYTICS_KEY` | — | API key for dashboard analytics |
|
|
166
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (hex, 0x-prefixed) for automatic x402 USDC payments on Base |
|
|
167
|
+
|
|
168
|
+
## Troubleshooting
|
|
169
|
+
|
|
170
|
+
**`npx` hangs with no output**
|
|
171
|
+
That's normal — stdio mode waits for JSON-RPC input on stdin. Use `--http` if you want an HTTP server you can curl.
|
|
172
|
+
|
|
173
|
+
**Port already in use**
|
|
174
|
+
Specify a different port: `npx @one-source/mcp --http --port=8080`
|
|
175
|
+
|
|
176
|
+
**Tools return "Data files may be missing"**
|
|
177
|
+
Try reinstalling: `npm install @one-source/mcp`
|
|
178
|
+
|
|
179
|
+
**"Type not found" even though it exists**
|
|
180
|
+
Type names are case-insensitive but must match the GraphQL name (e.g. `Transaction`, not `transaction_type`). The tool will suggest close matches.
|
|
181
|
+
|
|
182
|
+
## Registry Publishing
|
|
183
|
+
|
|
184
|
+
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.
|
|
185
|
+
|
|
186
|
+
### MCP Registry
|
|
187
|
+
|
|
188
|
+
#### First-Time Setup
|
|
189
|
+
|
|
190
|
+
##### 1. Install Go
|
|
191
|
+
|
|
192
|
+
Download the installer for your platform from [go.dev/dl](https://go.dev/dl/) and run it. Verify:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
go version
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
##### 2. Install mcp-publisher
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
go install github.com/modelcontextprotocol/registry/cmd/mcp-publisher@latest
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
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.
|
|
205
|
+
|
|
206
|
+
On Windows, add Go's bin directory to your PATH if the command isn't recognized:
|
|
207
|
+
|
|
208
|
+
```powershell
|
|
209
|
+
$env:PATH += ";$env:USERPROFILE\go\bin"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Verify:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
mcp-publisher --help
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
##### 3. DNS Authentication (already done)
|
|
219
|
+
|
|
220
|
+
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.
|
|
221
|
+
|
|
222
|
+
The record is on the root domain (`onesource.io`, not `_mcp-registry.onesource.io`):
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
v=MCPv1; k=ed25519; p=7D3U5rufgNXb/lH2MthTRZdDzEGeE7/Jvg8YkiArQc8=
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
You can verify it resolves:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
nslookup -type=TXT onesource.io 8.8.8.8
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
##### 4. Get the Private Key
|
|
235
|
+
|
|
236
|
+
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.
|
|
237
|
+
|
|
238
|
+
If you need to regenerate the keypair (this invalidates the current DNS record and requires updating it):
|
|
239
|
+
|
|
240
|
+
1. Generate a new ed25519 keypair (e.g., `openssl genpkey -algorithm Ed25519 -out key.pem`)
|
|
241
|
+
2. Extract the raw 32-byte private key seed and convert to hex:
|
|
242
|
+
```bash
|
|
243
|
+
openssl pkey -in key.pem -outform DER | tail -c 32 | xxd -p -c 32
|
|
244
|
+
```
|
|
245
|
+
3. Extract the public key in base64 for the DNS TXT record:
|
|
246
|
+
```bash
|
|
247
|
+
openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64
|
|
248
|
+
```
|
|
249
|
+
4. Update the DNS TXT record on `onesource.io` with the new public key:
|
|
250
|
+
```
|
|
251
|
+
v=MCPv1; k=ed25519; p=<base64-public-key>
|
|
252
|
+
```
|
|
253
|
+
5. Wait for DNS propagation before attempting to log in.
|
|
254
|
+
|
|
255
|
+
#### Publishing a New Version
|
|
256
|
+
|
|
257
|
+
Every time you release a new npm version, update the MCP Registry:
|
|
258
|
+
|
|
259
|
+
1. **Publish to npm** (the registry validates the package exists, so this must happen first):
|
|
260
|
+
```bash
|
|
261
|
+
npm run build
|
|
262
|
+
npm publish --access public
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
2. **Update `server.json`** — set both `version` fields to match the new npm version:
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"version": "x.y.z",
|
|
269
|
+
...
|
|
270
|
+
"packages": [{ "version": "x.y.z", ... }]
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
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.
|
|
274
|
+
|
|
275
|
+
3. **Authenticate** (tokens expire, so do this each time):
|
|
276
|
+
```bash
|
|
277
|
+
mcp-publisher login dns --domain onesource.io --private-key <ed25519-hex-private-key>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
4. **Publish to the registry:**
|
|
281
|
+
```bash
|
|
282
|
+
mcp-publisher publish
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
5. **Verify:**
|
|
286
|
+
```bash
|
|
287
|
+
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=onesource"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Glama
|
|
291
|
+
|
|
292
|
+
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.
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: onesource-mcp-setup
|
|
3
|
+
description: >-
|
|
4
|
+
Guide for installing and configuring the OneSource MCP server with x402
|
|
5
|
+
payments. Covers installation, version checking, wallet setup, USDC
|
|
6
|
+
funding on Base, and verification. Use when a user needs help setting up
|
|
7
|
+
OneSource MCP or configuring x402 payments.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# OneSource MCP Setup Guide
|
|
11
|
+
|
|
12
|
+
OneSource MCP provides 32 tools for blockchain data, live chain queries, and API documentation. Documentation tools are free. Blockchain API tools require x402 micropayments in USDC on the Base network.
|
|
13
|
+
|
|
14
|
+
## Step 1: Check Current Installation
|
|
15
|
+
|
|
16
|
+
Call the `1s_setup_check` tool. It reports:
|
|
17
|
+
- Server version (current vs latest)
|
|
18
|
+
- Whether x402 payments are configured
|
|
19
|
+
- Wallet address (if configured)
|
|
20
|
+
- API backend connectivity
|
|
21
|
+
|
|
22
|
+
If the tool is not available, the MCP is not installed — go to Step 2.
|
|
23
|
+
|
|
24
|
+
## Step 2: Install or Update
|
|
25
|
+
|
|
26
|
+
### Claude Code
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add onesource -- npx @one-source/mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Claude Desktop / Cursor
|
|
33
|
+
|
|
34
|
+
Add to your MCP configuration file:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"onesource": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "@one-source/mcp"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Any MCP Client (stdio)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @one-source/mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Check for Updates
|
|
54
|
+
|
|
55
|
+
Compare the installed version (shown in `1s_setup_check` output) against the latest:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm view @one-source/mcp version
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
To update, reinstall or use `npx @one-source/mcp@latest`.
|
|
62
|
+
|
|
63
|
+
## Step 3: Get an EVM Private Key
|
|
64
|
+
|
|
65
|
+
The `X402_PRIVATE_KEY` is an EVM wallet private key — the same kind used by MetaMask, Coinbase Wallet, or Foundry. It must be a hex string starting with `0x`.
|
|
66
|
+
|
|
67
|
+
### Option A: Export from MetaMask
|
|
68
|
+
|
|
69
|
+
1. Open MetaMask
|
|
70
|
+
2. Click the three dots next to the account name
|
|
71
|
+
3. Go to **Account details** > **Show private key**
|
|
72
|
+
4. Enter your MetaMask password
|
|
73
|
+
5. Copy the key (starts with `0x`)
|
|
74
|
+
|
|
75
|
+
### Option B: Export from Coinbase Wallet
|
|
76
|
+
|
|
77
|
+
1. Open Coinbase Wallet > Settings > Developer settings
|
|
78
|
+
2. Export your private key
|
|
79
|
+
|
|
80
|
+
### Option C: Generate a New Wallet
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Using OpenSSL
|
|
84
|
+
echo "0x$(openssl rand -hex 32)"
|
|
85
|
+
|
|
86
|
+
# Using Foundry (if installed)
|
|
87
|
+
cast wallet new
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Important:** Use a dedicated wallet for MCP payments — do not use your primary wallet with large holdings. Transfer only what you need.
|
|
91
|
+
|
|
92
|
+
## Step 4: Fund the Wallet with USDC on Base
|
|
93
|
+
|
|
94
|
+
The wallet must hold **USDC on the Base network** (not Ethereum mainnet, not other tokens).
|
|
95
|
+
|
|
96
|
+
1. Get the wallet address — set the key (Step 5) and call `1s_setup_check` to see the address, or import the key into MetaMask to see it.
|
|
97
|
+
2. Send USDC to that address **on the Base network**.
|
|
98
|
+
3. A few dollars ($1–5 USDC) is enough for hundreds of API calls.
|
|
99
|
+
|
|
100
|
+
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.
|
|
101
|
+
|
|
102
|
+
## Step 5: Set the Private Key
|
|
103
|
+
|
|
104
|
+
### Claude Code
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
claude mcp remove onesource
|
|
108
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx @one-source/mcp
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Claude Desktop / Cursor
|
|
112
|
+
|
|
113
|
+
Add the `env` block to your MCP config:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"onesource": {
|
|
119
|
+
"command": "npx",
|
|
120
|
+
"args": ["-y", "@one-source/mcp"],
|
|
121
|
+
"env": {
|
|
122
|
+
"X402_PRIVATE_KEY": "0x..."
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Any MCP Client (stdio)
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
X402_PRIVATE_KEY=0x... npx @one-source/mcp
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Security
|
|
136
|
+
|
|
137
|
+
- **Never** commit your private key to source control.
|
|
138
|
+
- Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
139
|
+
- Use a dedicated wallet with minimal funds — only what you need for API calls.
|
|
140
|
+
|
|
141
|
+
## Step 6: Verify
|
|
142
|
+
|
|
143
|
+
After setting the key and restarting the MCP server, call `1s_setup_check` again. You should see:
|
|
144
|
+
|
|
145
|
+
- **x402 status:** Configured
|
|
146
|
+
- **Wallet address:** Your wallet address
|
|
147
|
+
- **API backend:** Reachable
|
|
148
|
+
|
|
149
|
+
Then try a paid tool like `1s_network_info` to confirm payments work end-to-end.
|
|
150
|
+
|
|
151
|
+
## Troubleshooting
|
|
152
|
+
|
|
153
|
+
| Problem | Solution |
|
|
154
|
+
|---------|----------|
|
|
155
|
+
| `1s_setup_check` shows "Not configured" | The `X402_PRIVATE_KEY` env var is not reaching the server. Check your MCP client config and restart. |
|
|
156
|
+
| Tool returns HTTP 402 error | x402 is not configured, or the wallet has insufficient USDC on Base. |
|
|
157
|
+
| "x402 setup failed" in server logs | The private key format is wrong. It must be a 64-character hex string prefixed with `0x`. |
|
|
158
|
+
| Key is set but wallet shows 0 USDC | Make sure USDC is on the **Base** network, not Ethereum mainnet or another chain. |
|
|
159
|
+
| Tools work but results seem stale | Check `1s_setup_check` for version — you may need to update to the latest. |
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAuPH,OAAO,EAAE,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -39,12 +39,16 @@ if (args.includes('--http')) {
|
|
|
39
39
|
const { createClientFromEnv } = await import('@one-source/api-mcp/client');
|
|
40
40
|
// x402 payment wrapper — only active when X402_PRIVATE_KEY is set
|
|
41
41
|
let x402Fetch;
|
|
42
|
+
let x402Enabled = false;
|
|
43
|
+
let x402Address;
|
|
42
44
|
try {
|
|
43
45
|
const { setupX402 } = await import('@one-source/api-mcp/x402');
|
|
44
46
|
const x402 = setupX402();
|
|
45
47
|
if (x402.enabled) {
|
|
46
48
|
console.error(`[onesource] x402 payments enabled (wallet: ${x402.address})`);
|
|
47
49
|
x402Fetch = x402.fetch;
|
|
50
|
+
x402Enabled = true;
|
|
51
|
+
x402Address = x402.address;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
catch (err) {
|
|
@@ -62,6 +66,8 @@ if (args.includes('--http')) {
|
|
|
62
66
|
analytics: sharedAnalytics,
|
|
63
67
|
client: sharedClient,
|
|
64
68
|
transport: 'http',
|
|
69
|
+
x402Enabled,
|
|
70
|
+
x402Address,
|
|
65
71
|
});
|
|
66
72
|
const httpServer = createServer(async (req, res) => {
|
|
67
73
|
// CORS headers
|
|
@@ -100,6 +106,8 @@ if (args.includes('--http')) {
|
|
|
100
106
|
analytics: sharedAnalytics,
|
|
101
107
|
client: sharedClient,
|
|
102
108
|
transport: 'http',
|
|
109
|
+
x402Enabled,
|
|
110
|
+
x402Address,
|
|
103
111
|
});
|
|
104
112
|
const httpTransport = new StreamableHTTPServerTransport({
|
|
105
113
|
sessionIdGenerator: undefined,
|
|
@@ -166,19 +174,23 @@ else {
|
|
|
166
174
|
const { createClientFromEnv } = await import('@one-source/api-mcp/client');
|
|
167
175
|
// x402 payment wrapper — only active when X402_PRIVATE_KEY is set
|
|
168
176
|
let x402Fetch;
|
|
177
|
+
let x402Enabled = false;
|
|
178
|
+
let x402Address;
|
|
169
179
|
try {
|
|
170
180
|
const { setupX402 } = await import('@one-source/api-mcp/x402');
|
|
171
181
|
const x402 = setupX402();
|
|
172
182
|
if (x402.enabled) {
|
|
173
183
|
console.error(`[onesource] x402 payments enabled (wallet: ${x402.address})`);
|
|
174
184
|
x402Fetch = x402.fetch;
|
|
185
|
+
x402Enabled = true;
|
|
186
|
+
x402Address = x402.address;
|
|
175
187
|
}
|
|
176
188
|
}
|
|
177
189
|
catch (err) {
|
|
178
190
|
console.error(`[onesource] x402 setup failed, continuing without payments: ${err instanceof Error ? err.message : err}`);
|
|
179
191
|
}
|
|
180
192
|
const client = createClientFromEnv({ fetch: x402Fetch });
|
|
181
|
-
const { server, analytics } = createMcpServer({ client, transport: 'stdio' });
|
|
193
|
+
const { server, analytics } = createMcpServer({ client, transport: 'stdio', x402Enabled, x402Address });
|
|
182
194
|
const stdioTransport = new StdioServerTransport();
|
|
183
195
|
await server.connect(stdioTransport);
|
|
184
196
|
console.error('[onesource] Server connected via stdio');
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC5B,kCAAkC;IAElC,4EAA4E;IAC5E,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAC/B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CACjD,CAAC;IACF,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IACjC,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,IAAI,KAAK,E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,CAAC,CAAC;IAEH,kDAAkD;IAClD,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAChC,SAAS,CAAC,YAAY,CAAC;YACrB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,WAAW;YACpB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;QACH,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,CAAC,IAAI,CAAC;YACjB,CAAC,KAAK,IAAI,EAAE;gBACV,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;gBACxB,cAAc,CAAC,KAAK,EAAE,CAAC;gBACvB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;YACvB,CAAC,CAAC,EAAE;YACJ,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC3D,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/create-server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Unified MCP Server Factory
|
|
3
3
|
*
|
|
4
|
-
* Creates a single McpServer named 'onesource' with all
|
|
4
|
+
* Creates a single McpServer named 'onesource' with all 32 tools
|
|
5
5
|
* (22 API + 9 docs) by delegating to the two register modules.
|
|
6
6
|
*/
|
|
7
7
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
@@ -18,6 +18,10 @@ export interface CreateServerOptions {
|
|
|
18
18
|
client?: OneSourceClient;
|
|
19
19
|
/** Transport mode — passed through to analytics events. */
|
|
20
20
|
transport?: 'stdio' | 'http';
|
|
21
|
+
/** Whether x402 payments are enabled (set during startup). */
|
|
22
|
+
x402Enabled?: boolean;
|
|
23
|
+
/** Wallet address derived from X402_PRIVATE_KEY (set during startup). */
|
|
24
|
+
x402Address?: string;
|
|
21
25
|
}
|
|
22
26
|
export interface CreateServerResult {
|
|
23
27
|
server: McpServer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-server.d.ts","sourceRoot":"","sources":["../src/create-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAqB,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,kFAAkF;IAClF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"create-server.d.ts","sourceRoot":"","sources":["../src/create-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAqB,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,kFAAkF;IAClF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CA0B9E;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC"}
|
package/dist/create-server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Unified MCP Server Factory
|
|
3
3
|
*
|
|
4
|
-
* Creates a single McpServer named 'onesource' with all
|
|
4
|
+
* Creates a single McpServer named 'onesource' with all 32 tools
|
|
5
5
|
* (22 API + 9 docs) by delegating to the two register modules.
|
|
6
6
|
*/
|
|
7
7
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
@@ -30,6 +30,8 @@ export function createMcpServer(opts) {
|
|
|
30
30
|
analytics,
|
|
31
31
|
transport,
|
|
32
32
|
data: opts?.docsData,
|
|
33
|
+
x402Enabled: opts?.x402Enabled,
|
|
34
|
+
x402Address: opts?.x402Address,
|
|
33
35
|
});
|
|
34
36
|
return { server, analytics, client, toolCount: apiCount + docsCount };
|
|
35
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-server.js","sourceRoot":"","sources":["../src/create-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAmB,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"create-server.js","sourceRoot":"","sources":["../src/create-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAmB,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwBvC;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAA0B;IACxD,MAAM,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,eAAe,EAAE,CAAC;IACvD,MAAM,SAAS,GAAG,IAAI,EAAE,SAAS,CAAC;IAElC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACnD,MAAM;QACN,SAAS;QACT,SAAS;QACT,MAAM,EAAE,IAAI,EAAE,MAAM;KACrB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,iBAAiB,CAAC;QAClC,MAAM;QACN,SAAS;QACT,SAAS;QACT,IAAI,EAAE,IAAI,EAAE,QAAQ;QACpB,WAAW,EAAE,IAAI,EAAE,WAAW;QAC9B,WAAW,EAAE,IAAI,EAAE,WAAW;KAC/B,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE,CAAC;AACxE,CAAC;AAED,OAAO,EAAE,QAAQ,EAAmB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Register all
|
|
2
|
+
* Register all 10 docs tools from @one-source/docs-mcp onto a shared McpServer.
|
|
3
3
|
*
|
|
4
4
|
* Replicates the exact instrumentation pattern from docs-mcp's create-server.ts:
|
|
5
5
|
* performance timing, session hashing, and error sanitization.
|
|
@@ -14,6 +14,10 @@ export interface RegisterDocsToolsOptions {
|
|
|
14
14
|
transport?: 'stdio' | 'http';
|
|
15
15
|
/** Pre-loaded docs data (avoids re-reading files per request in HTTP mode). */
|
|
16
16
|
data?: LoadedData;
|
|
17
|
+
/** Whether x402 payments are enabled (set during startup). */
|
|
18
|
+
x402Enabled?: boolean;
|
|
19
|
+
/** Wallet address derived from X402_PRIVATE_KEY (set during startup). */
|
|
20
|
+
x402Address?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Register all docs tools and return the tool count.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-docs-tools.d.ts","sourceRoot":"","sources":["../src/register-docs-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAWjE,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAgF/D,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"register-docs-tools.d.ts","sourceRoot":"","sources":["../src/register-docs-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAWjE,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAgF/D,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,MAAM,CAmLxE;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Register all
|
|
2
|
+
* Register all 10 docs tools from @one-source/docs-mcp onto a shared McpServer.
|
|
3
3
|
*
|
|
4
4
|
* Replicates the exact instrumentation pattern from docs-mcp's create-server.ts:
|
|
5
5
|
* performance timing, session hashing, and error sanitization.
|
|
@@ -55,7 +55,7 @@ handler) {
|
|
|
55
55
|
source: 'unified',
|
|
56
56
|
};
|
|
57
57
|
try {
|
|
58
|
-
const text = handler(input);
|
|
58
|
+
const text = await handler(input);
|
|
59
59
|
const durationMs = Math.round(performance.now() - start);
|
|
60
60
|
analytics.trackTool({
|
|
61
61
|
...base,
|
|
@@ -97,7 +97,106 @@ export function registerDocsTools(opts) {
|
|
|
97
97
|
instrumentedTool(server, analytics, transport, 'get_pagination_guide', 'Get the cursor-based pagination pattern with examples for a list query.', getPaginationGuideSchema.shape, (input) => handleGetPaginationGuide(input, schema));
|
|
98
98
|
instrumentedTool(server, analytics, transport, 'get_schema_overview', 'Get a high-level summary of the entire GraphQL schema — all queries, types, enums, and scalars.', getSchemaOverviewSchema.shape, () => handleGetSchemaOverview(schema));
|
|
99
99
|
instrumentedTool(server, analytics, transport, 'get_authentication_guide', 'Get the authentication guide — API key format, endpoints, headers, and common mistakes.', getAuthenticationGuideSchema.shape, () => handleGetAuthenticationGuide());
|
|
100
|
-
|
|
100
|
+
const x402Enabled = opts.x402Enabled;
|
|
101
|
+
const x402Address = opts.x402Address;
|
|
102
|
+
instrumentedTool(server, analytics, transport, '1s_setup_check', 'Check OneSource MCP server health — version (current vs latest), x402 payment status, wallet address, API connectivity, and setup instructions if anything is missing. Free, no payment required. Call this first when troubleshooting.', {}, async () => {
|
|
103
|
+
const sections = [];
|
|
104
|
+
// 1. Server version
|
|
105
|
+
sections.push('## Server Version\n');
|
|
106
|
+
sections.push(`Current: ${VERSION}`);
|
|
107
|
+
let latestVersion = 'unknown';
|
|
108
|
+
try {
|
|
109
|
+
const res = await fetch('https://registry.npmjs.org/@one-source/mcp/latest', {
|
|
110
|
+
signal: AbortSignal.timeout(5000),
|
|
111
|
+
});
|
|
112
|
+
if (res.ok) {
|
|
113
|
+
const data = await res.json();
|
|
114
|
+
latestVersion = data.version;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch { /* network error — skip */ }
|
|
118
|
+
sections.push(`Latest: ${latestVersion}`);
|
|
119
|
+
if (latestVersion !== 'unknown' && latestVersion !== VERSION) {
|
|
120
|
+
sections.push('\n**Update available!** Run: `npx @one-source/mcp@latest`');
|
|
121
|
+
}
|
|
122
|
+
else if (latestVersion === VERSION) {
|
|
123
|
+
sections.push('\nYou are on the latest version.');
|
|
124
|
+
}
|
|
125
|
+
// 2. x402 payment status
|
|
126
|
+
sections.push('\n## x402 Payment Status\n');
|
|
127
|
+
const enabled = x402Enabled ?? !!process.env.X402_PRIVATE_KEY;
|
|
128
|
+
if (enabled && x402Address) {
|
|
129
|
+
sections.push('Status: **Configured**');
|
|
130
|
+
sections.push(`Wallet: \`${x402Address}\``);
|
|
131
|
+
sections.push('\nThis wallet must hold USDC on the **Base** network to pay for API calls.');
|
|
132
|
+
}
|
|
133
|
+
else if (enabled) {
|
|
134
|
+
sections.push('Status: **Configured** (wallet address not available)');
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
sections.push('Status: **Not configured**');
|
|
138
|
+
sections.push('\nBlockchain API tools require x402 payment. Without a key, paid endpoints return HTTP 402 errors.\n');
|
|
139
|
+
sections.push('### How to configure x402\n');
|
|
140
|
+
sections.push('1. **Get an EVM private key** — export from MetaMask, Coinbase Wallet, or generate one:');
|
|
141
|
+
sections.push(' ```');
|
|
142
|
+
sections.push(' # Generate a new key');
|
|
143
|
+
sections.push(' echo "0x$(openssl rand -hex 32)"');
|
|
144
|
+
sections.push(' ```\n');
|
|
145
|
+
sections.push('2. **Fund the wallet** with USDC on the **Base** network (not Ethereum mainnet). A few dollars is enough for hundreds of queries.\n');
|
|
146
|
+
sections.push('3. **Set the key** for your MCP client:\n');
|
|
147
|
+
sections.push(' **Claude Code:**');
|
|
148
|
+
sections.push(' ```');
|
|
149
|
+
sections.push(' claude mcp remove onesource');
|
|
150
|
+
sections.push(' claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx @one-source/mcp');
|
|
151
|
+
sections.push(' ```\n');
|
|
152
|
+
sections.push(' **Claude Desktop / Cursor** — add an `env` block to your MCP config:');
|
|
153
|
+
sections.push(' ```json');
|
|
154
|
+
sections.push(' {');
|
|
155
|
+
sections.push(' "mcpServers": {');
|
|
156
|
+
sections.push(' "onesource": {');
|
|
157
|
+
sections.push(' "command": "npx",');
|
|
158
|
+
sections.push(' "args": ["-y", "@one-source/mcp"],');
|
|
159
|
+
sections.push(' "env": { "X402_PRIVATE_KEY": "0x..." }');
|
|
160
|
+
sections.push(' }');
|
|
161
|
+
sections.push(' }');
|
|
162
|
+
sections.push(' }');
|
|
163
|
+
sections.push(' ```\n');
|
|
164
|
+
sections.push(' **Any MCP client (stdio):**');
|
|
165
|
+
sections.push(' ```');
|
|
166
|
+
sections.push(' X402_PRIVATE_KEY=0x... npx @one-source/mcp');
|
|
167
|
+
sections.push(' ```\n');
|
|
168
|
+
sections.push('4. **Restart the MCP server** after setting the key.\n');
|
|
169
|
+
sections.push('**Security:** Never commit your private key to source control. Use environment variables or a secrets manager.');
|
|
170
|
+
}
|
|
171
|
+
// 3. API connectivity
|
|
172
|
+
sections.push('\n## API Connectivity\n');
|
|
173
|
+
const baseUrl = process.env.ONESOURCE_BASE_URL ?? 'https://skills.onesource.io';
|
|
174
|
+
try {
|
|
175
|
+
const res = await fetch(baseUrl, { method: 'HEAD', signal: AbortSignal.timeout(5000) });
|
|
176
|
+
sections.push(`Backend: **Reachable** (${baseUrl})`);
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
180
|
+
sections.push(`Backend: **Unreachable** — ${msg}`);
|
|
181
|
+
}
|
|
182
|
+
// 4. Transport
|
|
183
|
+
sections.push('\n## Transport\n');
|
|
184
|
+
sections.push(`Mode: ${transport ?? 'unknown'}`);
|
|
185
|
+
// 5. Next steps
|
|
186
|
+
sections.push('\n## Next Steps\n');
|
|
187
|
+
if (!enabled) {
|
|
188
|
+
sections.push('- Configure x402 payments to use blockchain API tools (see instructions above)');
|
|
189
|
+
}
|
|
190
|
+
if (latestVersion !== 'unknown' && latestVersion !== VERSION) {
|
|
191
|
+
sections.push('- Update to the latest version: `npx @one-source/mcp@latest`');
|
|
192
|
+
}
|
|
193
|
+
sections.push('- Documentation tools are free — try `search_docs` or `list_supported_chains`');
|
|
194
|
+
if (enabled) {
|
|
195
|
+
sections.push('- Try a paid API tool: `1s_network_info` (returns chain ID, block number, gas price)');
|
|
196
|
+
}
|
|
197
|
+
return sections.join('\n');
|
|
198
|
+
});
|
|
199
|
+
return 10;
|
|
101
200
|
}
|
|
102
201
|
export { loadData };
|
|
103
202
|
//# sourceMappingURL=register-docs-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-docs-tools.js","sourceRoot":"","sources":["../src/register-docs-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AACrH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AACrH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAClH,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AAGjI,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,SAAS,WAAW,CAAC,SA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C;QAC/F,IAAI,OAAO,EAAE,CAAC;YACZ,QAAQ,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;QACxG,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CACF,CAAC;IAEF,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@one-source/mcp",
|
|
3
3
|
"mcpName": "io.onesource/mcp",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1.1",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "Unified MCP server for OneSource —
|
|
6
|
+
"description": "Unified MCP server for OneSource — 32 tools for blockchain data and API documentation",
|
|
7
7
|
"bin": {
|
|
8
8
|
"onesource-mcp": "./dist/cli.js"
|
|
9
9
|
},
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist/",
|
|
20
20
|
"README.md",
|
|
21
|
+
"SKILL.md",
|
|
21
22
|
"LICENSE"
|
|
22
23
|
],
|
|
23
24
|
"scripts": {
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31
|
-
"@one-source/api-mcp": "^3.
|
|
32
|
-
"@one-source/docs-mcp": "^3.
|
|
32
|
+
"@one-source/api-mcp": "^3.1.0",
|
|
33
|
+
"@one-source/docs-mcp": "^3.1.0",
|
|
33
34
|
"zod": "^3.24.0"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|