@one-source/mcp 4.0.3 → 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.md +83 -30
- package/README.npm.md +83 -30
- package/README.repo.md +349 -297
- package/dist/analytics.d.ts +4 -3
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +78 -41
- package/dist/cli.js.map +1 -1
- package/dist/create-server.d.ts +7 -9
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +15 -7
- package/dist/create-server.js.map +1 -1
- package/dist/register-api-tools.d.ts +2 -0
- package/dist/register-api-tools.d.ts.map +1 -1
- package/dist/register-api-tools.js +3 -2
- package/dist/register-api-tools.js.map +1 -1
- package/dist/register-bug-report-tool.d.ts +21 -0
- package/dist/register-bug-report-tool.d.ts.map +1 -0
- package/dist/register-bug-report-tool.js +113 -0
- package/dist/register-bug-report-tool.js.map +1 -0
- package/dist/register-docs-tools.d.ts +6 -11
- package/dist/register-docs-tools.d.ts.map +1 -1
- package/dist/register-docs-tools.js +167 -93
- package/dist/register-docs-tools.js.map +1 -1
- package/package.json +3 -3
- package/skills/onesource-mcp-setup/SKILL.md +106 -23
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @one-source/mcp
|
|
2
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) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 24 tools for blockchain data and live chain queries in a single server.
|
|
6
4
|
|
|
7
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.
|
|
8
6
|
|
|
@@ -44,7 +42,9 @@ npx -y @one-source/mcp@latest --http --port=8080
|
|
|
44
42
|
|
|
45
43
|
Then connect your MCP client to `http://localhost:3000/`.
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
Health check: `GET http://localhost:3000/health`
|
|
46
|
+
|
|
47
|
+
## Tools (24)
|
|
48
48
|
|
|
49
49
|
### Blockchain API — Live Chain (12 tools)
|
|
50
50
|
|
|
@@ -65,6 +65,8 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
65
65
|
|
|
66
66
|
### Blockchain API — Chain Utilities (10 tools)
|
|
67
67
|
|
|
68
|
+
RPC only.
|
|
69
|
+
|
|
68
70
|
| Tool | Description |
|
|
69
71
|
|------|-------------|
|
|
70
72
|
| `1s_contract_code` | Contract bytecode |
|
|
@@ -78,23 +80,14 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
78
80
|
| `1s_storage_read` | Read storage slot |
|
|
79
81
|
| `1s_tx_receipt` | Transaction receipt |
|
|
80
82
|
|
|
81
|
-
###
|
|
83
|
+
### Setup & Ops (2 tools)
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
No authentication required.
|
|
84
86
|
|
|
85
87
|
| Tool | Purpose | When to use |
|
|
86
88
|
|------|---------|-------------|
|
|
87
|
-
| `1s_setup_check` | Server health, version,
|
|
88
|
-
| `
|
|
89
|
-
| `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
|
|
90
|
-
| `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
|
|
91
|
-
| `list_examples` | Browse or search working GraphQL examples | Finding ready-to-use query patterns |
|
|
92
|
-
| `list_supported_chains` | All supported blockchain networks + endpoints | First question: "What chains are supported?" |
|
|
93
|
-
| `get_filter_reference` | Filter fields and operators for a list query | Building filtered queries with correct syntax |
|
|
94
|
-
| `get_pagination_guide` | Cursor-based pagination pattern with examples | Implementing pagination for list queries |
|
|
95
|
-
| `get_schema_overview` | High-level summary of the entire schema | Exploring the API surface before diving in |
|
|
96
|
-
| `get_authentication_guide` | API key format, headers, and endpoints | Setting up authentication for the first time |
|
|
97
|
-
| `get_mcp_setup_guide` | MCP installation, setup, x402 config guide | Setting up the MCP server or configuring payments |
|
|
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 |
|
|
98
91
|
|
|
99
92
|
## Networks
|
|
100
93
|
|
|
@@ -106,27 +99,58 @@ All blockchain API tools accept an optional `network` parameter:
|
|
|
106
99
|
| `sepolia` | Ethereum Sepolia testnet |
|
|
107
100
|
| `avax` | Avalanche C-Chain |
|
|
108
101
|
|
|
109
|
-
##
|
|
102
|
+
## Authentication
|
|
110
103
|
|
|
111
|
-
Blockchain API
|
|
104
|
+
Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
|
|
112
105
|
|
|
113
|
-
|
|
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 |
|
|
114
110
|
|
|
115
|
-
###
|
|
111
|
+
### Option 1: API Key (recommended)
|
|
116
112
|
|
|
117
|
-
|
|
118
|
-
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.
|
|
119
|
-
3. **Pass the key to the server** using one of the methods below.
|
|
113
|
+
#### Claude Code
|
|
120
114
|
|
|
121
|
-
|
|
115
|
+
```bash
|
|
116
|
+
claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@latest
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Claude Desktop / Cursor
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"onesource": {
|
|
125
|
+
"command": "npx",
|
|
126
|
+
"args": ["-y", "@one-source/mcp@latest"],
|
|
127
|
+
"env": {
|
|
128
|
+
"ONESOURCE_API_KEY": "<key>"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### Any MCP Client (stdio)
|
|
122
136
|
|
|
123
137
|
```bash
|
|
124
|
-
|
|
138
|
+
ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
|
|
125
139
|
```
|
|
126
140
|
|
|
127
|
-
###
|
|
141
|
+
### Option 2: x402 Micropayments
|
|
142
|
+
|
|
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:**
|
|
146
|
+
|
|
147
|
+
#### Claude Code
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
|
|
151
|
+
```
|
|
128
152
|
|
|
129
|
-
|
|
153
|
+
#### Claude Desktop / Cursor
|
|
130
154
|
|
|
131
155
|
```json
|
|
132
156
|
{
|
|
@@ -142,7 +166,7 @@ Add the `env` block to your MCP config:
|
|
|
142
166
|
}
|
|
143
167
|
```
|
|
144
168
|
|
|
145
|
-
|
|
169
|
+
#### Any MCP Client (stdio)
|
|
146
170
|
|
|
147
171
|
```bash
|
|
148
172
|
X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
|
|
@@ -150,7 +174,36 @@ X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
|
|
|
150
174
|
|
|
151
175
|
### Security
|
|
152
176
|
|
|
153
|
-
Never commit
|
|
177
|
+
Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
178
|
+
|
|
179
|
+
> **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.
|
|
180
|
+
|
|
181
|
+
## Environment Variables
|
|
182
|
+
|
|
183
|
+
| Variable | Default | Description |
|
|
184
|
+
|----------|---------|-------------|
|
|
185
|
+
| `ONESOURCE_API_KEY` | — | OneSource API key for Bearer token auth. Takes priority over x402. |
|
|
186
|
+
| `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
|
+
|
|
190
|
+
## Troubleshooting
|
|
191
|
+
|
|
192
|
+
**`1s_setup_check` shows "Not configured"** — Set either `ONESOURCE_API_KEY` or `X402_PRIVATE_KEY`. Reload the MCP server after setting either variable. If the key still isn't reaching the server, set it as a shell environment variable directly.
|
|
193
|
+
|
|
194
|
+
**"MCP server onesource already exists" error** — Run `claude mcp remove onesource` first, then re-add.
|
|
195
|
+
|
|
196
|
+
**Windows: `npx` requires `cmd /c` wrapper** — Update your MCP config to use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@one-source/mcp@latest"]`. Claude Code's `/doctor` command can diagnose this.
|
|
197
|
+
|
|
198
|
+
**`npx` hangs with no output** — That's normal in stdio mode. Use `--http` for an HTTP server.
|
|
199
|
+
|
|
200
|
+
**Port already in use** — Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
|
|
201
|
+
|
|
202
|
+
## Links
|
|
203
|
+
|
|
204
|
+
- [GitHub Repository](https://github.com/blockparty-global/1s-mcp)
|
|
205
|
+
- [OneSource Documentation](https://docs.onesource.io)
|
|
206
|
+
- [Report an Issue](https://github.com/blockparty-global/1s-mcp/issues)
|
|
154
207
|
|
|
155
208
|
## License
|
|
156
209
|
|
package/README.npm.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @one-source/mcp
|
|
2
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) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
|
|
3
|
+
Unified MCP server for [OneSource](https://docs.onesource.io) — 24 tools for blockchain data and live chain queries in a single server.
|
|
6
4
|
|
|
7
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.
|
|
8
6
|
|
|
@@ -44,7 +42,9 @@ npx -y @one-source/mcp@latest --http --port=8080
|
|
|
44
42
|
|
|
45
43
|
Then connect your MCP client to `http://localhost:3000/`.
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
Health check: `GET http://localhost:3000/health`
|
|
46
|
+
|
|
47
|
+
## Tools (24)
|
|
48
48
|
|
|
49
49
|
### Blockchain API — Live Chain (12 tools)
|
|
50
50
|
|
|
@@ -65,6 +65,8 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
65
65
|
|
|
66
66
|
### Blockchain API — Chain Utilities (10 tools)
|
|
67
67
|
|
|
68
|
+
RPC only.
|
|
69
|
+
|
|
68
70
|
| Tool | Description |
|
|
69
71
|
|------|-------------|
|
|
70
72
|
| `1s_contract_code` | Contract bytecode |
|
|
@@ -78,23 +80,14 @@ Then connect your MCP client to `http://localhost:3000/`.
|
|
|
78
80
|
| `1s_storage_read` | Read storage slot |
|
|
79
81
|
| `1s_tx_receipt` | Transaction receipt |
|
|
80
82
|
|
|
81
|
-
###
|
|
83
|
+
### Setup & Ops (2 tools)
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
No authentication required.
|
|
84
86
|
|
|
85
87
|
| Tool | Purpose | When to use |
|
|
86
88
|
|------|---------|-------------|
|
|
87
|
-
| `1s_setup_check` | Server health, version,
|
|
88
|
-
| `
|
|
89
|
-
| `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
|
|
90
|
-
| `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
|
|
91
|
-
| `list_examples` | Browse or search working GraphQL examples | Finding ready-to-use query patterns |
|
|
92
|
-
| `list_supported_chains` | All supported blockchain networks + endpoints | First question: "What chains are supported?" |
|
|
93
|
-
| `get_filter_reference` | Filter fields and operators for a list query | Building filtered queries with correct syntax |
|
|
94
|
-
| `get_pagination_guide` | Cursor-based pagination pattern with examples | Implementing pagination for list queries |
|
|
95
|
-
| `get_schema_overview` | High-level summary of the entire schema | Exploring the API surface before diving in |
|
|
96
|
-
| `get_authentication_guide` | API key format, headers, and endpoints | Setting up authentication for the first time |
|
|
97
|
-
| `get_mcp_setup_guide` | MCP installation, setup, x402 config guide | Setting up the MCP server or configuring payments |
|
|
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 |
|
|
98
91
|
|
|
99
92
|
## Networks
|
|
100
93
|
|
|
@@ -106,27 +99,58 @@ All blockchain API tools accept an optional `network` parameter:
|
|
|
106
99
|
| `sepolia` | Ethereum Sepolia testnet |
|
|
107
100
|
| `avax` | Avalanche C-Chain |
|
|
108
101
|
|
|
109
|
-
##
|
|
102
|
+
## Authentication
|
|
110
103
|
|
|
111
|
-
Blockchain API
|
|
104
|
+
Blockchain API tools require authentication. Two options are available — API key takes priority if both are set.
|
|
112
105
|
|
|
113
|
-
|
|
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 |
|
|
114
110
|
|
|
115
|
-
###
|
|
111
|
+
### Option 1: API Key (recommended)
|
|
116
112
|
|
|
117
|
-
|
|
118
|
-
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.
|
|
119
|
-
3. **Pass the key to the server** using one of the methods below.
|
|
113
|
+
#### Claude Code
|
|
120
114
|
|
|
121
|
-
|
|
115
|
+
```bash
|
|
116
|
+
claude mcp add onesource -e ONESOURCE_API_KEY=<key> -- npx -y @one-source/mcp@latest
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Claude Desktop / Cursor
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"onesource": {
|
|
125
|
+
"command": "npx",
|
|
126
|
+
"args": ["-y", "@one-source/mcp@latest"],
|
|
127
|
+
"env": {
|
|
128
|
+
"ONESOURCE_API_KEY": "<key>"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### Any MCP Client (stdio)
|
|
122
136
|
|
|
123
137
|
```bash
|
|
124
|
-
|
|
138
|
+
ONESOURCE_API_KEY=<key> npx -y @one-source/mcp@latest
|
|
125
139
|
```
|
|
126
140
|
|
|
127
|
-
###
|
|
141
|
+
### Option 2: x402 Micropayments
|
|
142
|
+
|
|
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:**
|
|
146
|
+
|
|
147
|
+
#### Claude Code
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
|
|
151
|
+
```
|
|
128
152
|
|
|
129
|
-
|
|
153
|
+
#### Claude Desktop / Cursor
|
|
130
154
|
|
|
131
155
|
```json
|
|
132
156
|
{
|
|
@@ -142,7 +166,7 @@ Add the `env` block to your MCP config:
|
|
|
142
166
|
}
|
|
143
167
|
```
|
|
144
168
|
|
|
145
|
-
|
|
169
|
+
#### Any MCP Client (stdio)
|
|
146
170
|
|
|
147
171
|
```bash
|
|
148
172
|
X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
|
|
@@ -150,7 +174,36 @@ X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
|
|
|
150
174
|
|
|
151
175
|
### Security
|
|
152
176
|
|
|
153
|
-
Never commit
|
|
177
|
+
Never commit keys to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
|
|
178
|
+
|
|
179
|
+
> **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.
|
|
180
|
+
|
|
181
|
+
## Environment Variables
|
|
182
|
+
|
|
183
|
+
| Variable | Default | Description |
|
|
184
|
+
|----------|---------|-------------|
|
|
185
|
+
| `ONESOURCE_API_KEY` | — | OneSource API key for Bearer token auth. Takes priority over x402. |
|
|
186
|
+
| `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
|
+
|
|
190
|
+
## Troubleshooting
|
|
191
|
+
|
|
192
|
+
**`1s_setup_check` shows "Not configured"** — Set either `ONESOURCE_API_KEY` or `X402_PRIVATE_KEY`. Reload the MCP server after setting either variable. If the key still isn't reaching the server, set it as a shell environment variable directly.
|
|
193
|
+
|
|
194
|
+
**"MCP server onesource already exists" error** — Run `claude mcp remove onesource` first, then re-add.
|
|
195
|
+
|
|
196
|
+
**Windows: `npx` requires `cmd /c` wrapper** — Update your MCP config to use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@one-source/mcp@latest"]`. Claude Code's `/doctor` command can diagnose this.
|
|
197
|
+
|
|
198
|
+
**`npx` hangs with no output** — That's normal in stdio mode. Use `--http` for an HTTP server.
|
|
199
|
+
|
|
200
|
+
**Port already in use** — Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
|
|
201
|
+
|
|
202
|
+
## Links
|
|
203
|
+
|
|
204
|
+
- [GitHub Repository](https://github.com/blockparty-global/1s-mcp)
|
|
205
|
+
- [OneSource Documentation](https://docs.onesource.io)
|
|
206
|
+
- [Report an Issue](https://github.com/blockparty-global/1s-mcp/issues)
|
|
154
207
|
|
|
155
208
|
## License
|
|
156
209
|
|