@one-source/mcp 4.0.1 → 4.0.4

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
@@ -1,6 +1,6 @@
1
1
  # @one-source/mcp
2
2
 
3
- Unified MCP server for [OneSource](https://docs.onesource.io) — 33 tools for blockchain data, live chain queries, and API documentation in a single server.
3
+ Unified MCP server for [OneSource](https://docs.onesource.io) — 34 tools for blockchain data, live chain queries, and API documentation in a single server.
4
4
 
5
5
  Combines [`@one-source/api-mcp`](https://www.npmjs.com/package/@one-source/api-mcp) (22 tools) and [`@one-source/docs-mcp`](https://www.npmjs.com/package/@one-source/docs-mcp) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
6
6
 
@@ -44,7 +44,9 @@ npx -y @one-source/mcp@latest --http --port=8080
44
44
 
45
45
  Then connect your MCP client to `http://localhost:3000/`.
46
46
 
47
- ## Tools (33)
47
+ Health check: `GET http://localhost:3000/health`
48
+
49
+ ## Tools (34)
48
50
 
49
51
  ### Blockchain API — Live Chain (12 tools)
50
52
 
@@ -65,6 +67,8 @@ Then connect your MCP client to `http://localhost:3000/`.
65
67
 
66
68
  ### Blockchain API — Chain Utilities (10 tools)
67
69
 
70
+ RPC only.
71
+
68
72
  | Tool | Description |
69
73
  |------|-------------|
70
74
  | `1s_contract_code` | Contract bytecode |
@@ -78,13 +82,14 @@ Then connect your MCP client to `http://localhost:3000/`.
78
82
  | `1s_storage_read` | Read storage slot |
79
83
  | `1s_tx_receipt` | Transaction receipt |
80
84
 
81
- ### Documentation & Setup (11 tools)
85
+ ### Documentation, Setup & Ops (12 tools)
82
86
 
83
87
  Read-only, no API key required.
84
88
 
85
89
  | Tool | Purpose | When to use |
86
90
  |------|---------|-------------|
87
91
  | `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
92
+ | `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
88
93
  | `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
89
94
  | `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
90
95
  | `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
@@ -114,7 +119,7 @@ Documentation tools are always free — no key or payment needed.
114
119
 
115
120
  ### Setup
116
121
 
117
- 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`.
122
+ 1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key must start with `0x` followed by 64 hex characters (e.g. `0x4c08...7e3d`). Some wallets export the key without the `0x` prefix — if yours is just letters and numbers without `0x` at the start, add `0x` to the beginning yourself.
118
123
  2. **Fund the wallet with USDC on Base** — the wallet address derived from the key must hold USDC on the [Base](https://base.org) network. Bridge or transfer USDC to it.
119
124
  3. **Pass the key to the server** using one of the methods below.
120
125
 
@@ -148,10 +153,56 @@ Add the `env` block to your MCP config:
148
153
  X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
149
154
  ```
150
155
 
156
+ ### Config File Locations
157
+
158
+ If you prefer editing the config file directly instead of using CLI commands:
159
+
160
+ | Client | Config file path |
161
+ |--------|-----------------|
162
+ | Claude Code | Run `claude mcp get onesource` to see the file path |
163
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
164
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
165
+ | Cursor (macOS) | `~/.cursor/mcp.json` |
166
+ | Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
167
+
168
+ Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
169
+
170
+ ### Alternative: Set as an Environment Variable
171
+
172
+ Instead of the `env` config block, you can set `X402_PRIVATE_KEY` as a shell or system environment variable: `export X402_PRIVATE_KEY=0x...` (bash/zsh) or `$env:X402_PRIVATE_KEY = "0x..."` (PowerShell). Set it at the OS level for persistence across sessions.
173
+
151
174
  ### Security
152
175
 
153
176
  Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
154
177
 
178
+ > **After any config change:** Run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor. The MCP server must be reloaded to pick up new environment variables.
179
+
180
+ ## Environment Variables
181
+
182
+ | Variable | Default | Description |
183
+ |----------|---------|-------------|
184
+ | `X402_PRIVATE_KEY` | — | EVM private key (hex, 0x-prefixed) for automatic x402 USDC payments on Base |
185
+ | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
186
+ | `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
187
+
188
+ ## Troubleshooting
189
+
190
+ **`1s_setup_check` shows "Not configured"** — Reload the MCP server first (see note above). If the key still isn't reaching the server after reloading, set it as an environment variable directly.
191
+
192
+ **"MCP server onesource already exists" error** — Run `claude mcp remove onesource` first, then re-add.
193
+
194
+ **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.
195
+
196
+ **`npx` hangs with no output** — That's normal in stdio mode. Use `--http` for an HTTP server.
197
+
198
+ **Port already in use** — Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
199
+
200
+ ## Links
201
+
202
+ - [GitHub Repository](https://github.com/blockparty-global/1s-mcp)
203
+ - [OneSource Documentation](https://docs.onesource.io)
204
+ - [Report an Issue](https://github.com/blockparty-global/1s-mcp/issues)
205
+
155
206
  ## License
156
207
 
157
208
  Apache 2.0
package/README.npm.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @one-source/mcp
2
2
 
3
- Unified MCP server for [OneSource](https://docs.onesource.io) — 33 tools for blockchain data, live chain queries, and API documentation in a single server.
3
+ Unified MCP server for [OneSource](https://docs.onesource.io) — 34 tools for blockchain data, live chain queries, and API documentation in a single server.
4
4
 
5
5
  Combines [`@one-source/api-mcp`](https://www.npmjs.com/package/@one-source/api-mcp) (22 tools) and [`@one-source/docs-mcp`](https://www.npmjs.com/package/@one-source/docs-mcp) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
6
6
 
@@ -44,7 +44,9 @@ npx -y @one-source/mcp@latest --http --port=8080
44
44
 
45
45
  Then connect your MCP client to `http://localhost:3000/`.
46
46
 
47
- ## Tools (33)
47
+ Health check: `GET http://localhost:3000/health`
48
+
49
+ ## Tools (34)
48
50
 
49
51
  ### Blockchain API — Live Chain (12 tools)
50
52
 
@@ -65,6 +67,8 @@ Then connect your MCP client to `http://localhost:3000/`.
65
67
 
66
68
  ### Blockchain API — Chain Utilities (10 tools)
67
69
 
70
+ RPC only.
71
+
68
72
  | Tool | Description |
69
73
  |------|-------------|
70
74
  | `1s_contract_code` | Contract bytecode |
@@ -78,13 +82,14 @@ Then connect your MCP client to `http://localhost:3000/`.
78
82
  | `1s_storage_read` | Read storage slot |
79
83
  | `1s_tx_receipt` | Transaction receipt |
80
84
 
81
- ### Documentation & Setup (11 tools)
85
+ ### Documentation, Setup & Ops (12 tools)
82
86
 
83
87
  Read-only, no API key required.
84
88
 
85
89
  | Tool | Purpose | When to use |
86
90
  |------|---------|-------------|
87
91
  | `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
92
+ | `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
88
93
  | `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
89
94
  | `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
90
95
  | `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
@@ -114,7 +119,7 @@ Documentation tools are always free — no key or payment needed.
114
119
 
115
120
  ### Setup
116
121
 
117
- 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`.
122
+ 1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key must start with `0x` followed by 64 hex characters (e.g. `0x4c08...7e3d`). Some wallets export the key without the `0x` prefix — if yours is just letters and numbers without `0x` at the start, add `0x` to the beginning yourself.
118
123
  2. **Fund the wallet with USDC on Base** — the wallet address derived from the key must hold USDC on the [Base](https://base.org) network. Bridge or transfer USDC to it.
119
124
  3. **Pass the key to the server** using one of the methods below.
120
125
 
@@ -148,10 +153,56 @@ Add the `env` block to your MCP config:
148
153
  X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
149
154
  ```
150
155
 
156
+ ### Config File Locations
157
+
158
+ If you prefer editing the config file directly instead of using CLI commands:
159
+
160
+ | Client | Config file path |
161
+ |--------|-----------------|
162
+ | Claude Code | Run `claude mcp get onesource` to see the file path |
163
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
164
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
165
+ | Cursor (macOS) | `~/.cursor/mcp.json` |
166
+ | Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
167
+
168
+ Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
169
+
170
+ ### Alternative: Set as an Environment Variable
171
+
172
+ Instead of the `env` config block, you can set `X402_PRIVATE_KEY` as a shell or system environment variable: `export X402_PRIVATE_KEY=0x...` (bash/zsh) or `$env:X402_PRIVATE_KEY = "0x..."` (PowerShell). Set it at the OS level for persistence across sessions.
173
+
151
174
  ### Security
152
175
 
153
176
  Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
154
177
 
178
+ > **After any config change:** Run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor. The MCP server must be reloaded to pick up new environment variables.
179
+
180
+ ## Environment Variables
181
+
182
+ | Variable | Default | Description |
183
+ |----------|---------|-------------|
184
+ | `X402_PRIVATE_KEY` | — | EVM private key (hex, 0x-prefixed) for automatic x402 USDC payments on Base |
185
+ | `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | API base URL |
186
+ | `ONESOURCE_ANALYTICS` | — | Set to `false` to disable analytics |
187
+
188
+ ## Troubleshooting
189
+
190
+ **`1s_setup_check` shows "Not configured"** — Reload the MCP server first (see note above). If the key still isn't reaching the server after reloading, set it as an environment variable directly.
191
+
192
+ **"MCP server onesource already exists" error** — Run `claude mcp remove onesource` first, then re-add.
193
+
194
+ **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.
195
+
196
+ **`npx` hangs with no output** — That's normal in stdio mode. Use `--http` for an HTTP server.
197
+
198
+ **Port already in use** — Specify a different port: `npx -y @one-source/mcp@latest --http --port=8080`
199
+
200
+ ## Links
201
+
202
+ - [GitHub Repository](https://github.com/blockparty-global/1s-mcp)
203
+ - [OneSource Documentation](https://docs.onesource.io)
204
+ - [Report an Issue](https://github.com/blockparty-global/1s-mcp/issues)
205
+
155
206
  ## License
156
207
 
157
208
  Apache 2.0
package/README.repo.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @one-source/mcp
2
2
 
3
- Unified MCP server for [OneSource](https://docs.onesource.io) — 33 tools for blockchain data, live chain queries, and API documentation in a single server.
3
+ Unified MCP server for [OneSource](https://docs.onesource.io) — 34 tools for blockchain data, live chain queries, and API documentation in a single server.
4
4
 
5
5
  Combines [`@one-source/api-mcp`](https://www.npmjs.com/package/@one-source/api-mcp) (22 tools) and [`@one-source/docs-mcp`](https://www.npmjs.com/package/@one-source/docs-mcp) (11 tools) so your AI assistant gets full access to OneSource with one MCP connection.
6
6
 
@@ -46,7 +46,7 @@ Then connect your MCP client to `http://localhost:3000/`.
46
46
 
47
47
  Health check: `GET http://localhost:3000/health`
48
48
 
49
- ## Tools (33)
49
+ ## Tools (34)
50
50
 
51
51
  ### Blockchain API — Live Chain (12 tools)
52
52
 
@@ -82,13 +82,14 @@ RPC only.
82
82
  | `1s_storage_read` | Read storage slot |
83
83
  | `1s_tx_receipt` | Transaction receipt |
84
84
 
85
- ### Documentation & Setup (11 tools)
85
+ ### Documentation, Setup & Ops (12 tools)
86
86
 
87
87
  Read-only, no API key required.
88
88
 
89
89
  | Tool | Purpose | When to use |
90
90
  |------|---------|-------------|
91
91
  | `1s_setup_check` | Server health, version, x402 status, setup instructions | First thing to call — checks if everything is configured |
92
+ | `1s_report_bug` | Report bugs to Slack (or GitHub Issues fallback) | When a tool errors or user wants to report an issue |
92
93
  | `search_docs` | Keyword search across all documentation | Finding guides, concepts, or API patterns |
93
94
  | `get_query_reference` | Full reference for a root GraphQL query | Building a specific query with correct args/filters |
94
95
  | `get_type_definition` | Schema definition for any type/enum/input | Understanding field shapes and return types |
@@ -118,7 +119,7 @@ Documentation tools are always free — no key or payment needed.
118
119
 
119
120
  ### Setup
120
121
 
121
- 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`.
122
+ 1. **Get an EVM private key** — export one from MetaMask, Coinbase Wallet, or any EVM wallet. The key must start with `0x` followed by 64 hex characters (e.g. `0x4c08...7e3d`). Some wallets export the key without the `0x` prefix — if yours is just letters and numbers without `0x` at the start, add `0x` to the beginning yourself.
122
123
  2. **Fund the wallet with USDC on Base** — the wallet address derived from the key must hold USDC on the [Base](https://base.org) network. Bridge or transfer USDC to it.
123
124
  3. **Pass the key to the server** using one of the methods below.
124
125
 
@@ -152,10 +153,30 @@ Add the `env` block to your MCP config:
152
153
  X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
153
154
  ```
154
155
 
156
+ ### Config File Locations
157
+
158
+ If you prefer editing the config file directly instead of using CLI commands:
159
+
160
+ | Client | Config file path |
161
+ |--------|-----------------|
162
+ | Claude Code | Run `claude mcp get onesource` to see the file path |
163
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
164
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
165
+ | Cursor (macOS) | `~/.cursor/mcp.json` |
166
+ | Cursor (Windows) | `%USERPROFILE%\.cursor\mcp.json` |
167
+
168
+ Add the `onesource` entry inside `"mcpServers"` using the JSON block shown above.
169
+
170
+ ### Alternative: Set as an Environment Variable
171
+
172
+ Instead of the `env` config block, you can set `X402_PRIVATE_KEY` as a shell or system environment variable: `export X402_PRIVATE_KEY=0x...` (bash/zsh) or `$env:X402_PRIVATE_KEY = "0x..."` (PowerShell). Set it at the OS level for persistence across sessions.
173
+
155
174
  ### Security
156
175
 
157
176
  Never commit your private key to source control. Use environment variables, a `.env` file (excluded from git), or a secrets manager.
158
177
 
178
+ > **After any config change:** Run `/reload-plugins` in Claude Code, or restart Claude Desktop / Cursor. The MCP server must be reloaded to pick up new environment variables.
179
+
159
180
  ## Environment Variables
160
181
 
161
182
  | Variable | Default | Description |
@@ -168,6 +189,15 @@ Never commit your private key to source control. Use environment variables, a `.
168
189
 
169
190
  ## Troubleshooting
170
191
 
192
+ **`1s_setup_check` shows "Not configured"**
193
+ Reload the MCP server first (see note above). If the key still isn't reaching the server after reloading, set it as an environment variable directly.
194
+
195
+ **"MCP server onesource already exists" error**
196
+ Run `claude mcp remove onesource` first, then re-add with your updated config.
197
+
198
+ **Windows: `npx` requires `cmd /c` wrapper**
199
+ Claude Code's `/doctor` command may warn about this. Update your MCP config to use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@one-source/mcp@latest"]`.
200
+
171
201
  **`npx` hangs with no output**
172
202
  That's normal — stdio mode waits for JSON-RPC input on stdin. Use `--http` if you want an HTTP server you can curl.
173
203
 
@@ -9,7 +9,7 @@
9
9
  import { type Analytics as _Analytics, type ToolCallEvent as _ToolCallEvent, type HttpCallEvent as _HttpCallEvent, type ServiceEvent as _ServiceEvent } from '@one-source/api-mcp/analytics';
10
10
  /** ToolCallEvent with category widened to include docs tools. */
11
11
  export type ToolCallEvent = Omit<_ToolCallEvent, 'category'> & {
12
- category: _ToolCallEvent['category'] | 'docs';
12
+ category: _ToolCallEvent['category'] | 'docs' | 'ops';
13
13
  source?: string;
14
14
  };
15
15
  export type HttpCallEvent = _HttpCallEvent & {
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,KAAK,SAAS,IAAI,UAAU,EAC5B,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,YAAY,IAAI,aAAa,EACnC,MAAM,+BAA+B,CAAC;AAEvC,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC7D,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,0EAA0E;AAC1E,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAC7F,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CACzC;AAED,mFAAmF;AACnF,wBAAgB,eAAe,IAAI,SAAS,CAK3C"}
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,KAAK,SAAS,IAAI,UAAU,EAC5B,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,YAAY,IAAI,aAAa,EACnC,MAAM,+BAA+B,CAAC;AAEvC,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC7D,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,0EAA0E;AAC1E,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAC7F,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CACzC;AAED,mFAAmF;AACnF,wBAAgB,eAAe,IAAI,SAAS,CAK3C"}
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;AAkTH,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AA8TH,OAAO,EAAE,CAAC"}
package/dist/cli.js CHANGED
@@ -26,11 +26,13 @@ async function checkLatestVersion() {
26
26
  /** Build the MCP instructions string based on version comparison. */
27
27
  function buildInstructions(currentVersion, latestVersion) {
28
28
  const baseline = [
29
- 'OneSource MCP — 33 tools for blockchain data and API documentation.',
29
+ 'OneSource MCP — 34 tools for blockchain data and API documentation.',
30
30
  '',
31
31
  'Blockchain API tools require x402 payment (USDC on Base). If a tool returns a 402 error, the user needs to configure X402_PRIVATE_KEY. Call 1s_setup_check for diagnostics and setup instructions.',
32
32
  '',
33
33
  'Documentation tools (search_docs, get_query_reference, etc.) are always free.',
34
+ '',
35
+ 'Bug Reporting: When any blockchain API tool (1s_* prefix) returns an error, automatically call 1s_report_bug with the tool_name, error_message, and a brief description of what was attempted. Set severity based on the error: "critical" for server crashes or data loss, "high" for broken features, "medium" for degraded functionality, "low" for cosmetic issues. Do NOT auto-report x402 payment errors (HTTP 402) — those mean the user needs to configure X402_PRIVATE_KEY, not that there is a bug. Do not report the same error more than once per conversation. Also call 1s_report_bug when the user explicitly asks to report a bug or issue.',
34
36
  ].join('\n');
35
37
  if (latestVersion && latestVersion !== currentVersion) {
36
38
  return [
@@ -87,6 +89,8 @@ if (args.includes('--http')) {
87
89
  catch (err) {
88
90
  console.error(`[onesource] x402 setup failed, continuing without payments: ${err instanceof Error ? err.message : err}`);
89
91
  }
92
+ // Bug report endpoint (silent override for dev/testing)
93
+ const bugReportUrl = process.env.ONESOURCE_BUG_REPORT_URL;
90
94
  // Pre-load docs data once at startup
91
95
  const docsData = loadData();
92
96
  // Check for updates (non-blocking, 3s timeout)
@@ -104,6 +108,7 @@ if (args.includes('--http')) {
104
108
  // Shared singletons — reused across stateless per-request servers
105
109
  const sharedAnalytics = createAnalytics();
106
110
  console.error(`[onesource] analytics: ${process.env.ONESOURCE_ANALYTICS === 'false' ? 'disabled' : `dashboard (${process.env.ONESOURCE_ANALYTICS_URL})`}`);
111
+ console.error(`[onesource] bug reporting: ${bugReportUrl ?? 'https://1s-analytics.vercel.app/api/bugs'}`);
107
112
  const sharedClient = createClientFromEnv({ fetch: x402Fetch });
108
113
  // Compute tool count once at startup (server object is discarded)
109
114
  const { toolCount } = createMcpServer({
@@ -114,6 +119,7 @@ if (args.includes('--http')) {
114
119
  x402Enabled,
115
120
  x402Address,
116
121
  instructions,
122
+ bugReportUrl,
117
123
  });
118
124
  const httpServer = createServer(async (req, res) => {
119
125
  // CORS headers
@@ -155,6 +161,7 @@ if (args.includes('--http')) {
155
161
  x402Enabled,
156
162
  x402Address,
157
163
  instructions,
164
+ bugReportUrl,
158
165
  });
159
166
  const httpTransport = new StreamableHTTPServerTransport({
160
167
  sessionIdGenerator: undefined,
@@ -236,6 +243,8 @@ else {
236
243
  catch (err) {
237
244
  console.error(`[onesource] x402 setup failed, continuing without payments: ${err instanceof Error ? err.message : err}`);
238
245
  }
246
+ // Bug report endpoint (silent override for dev/testing)
247
+ const bugReportUrl = process.env.ONESOURCE_BUG_REPORT_URL;
239
248
  // Check for updates (non-blocking, 3s timeout)
240
249
  const latestVersion = await checkLatestVersion();
241
250
  const instructions = buildInstructions(VERSION, latestVersion);
@@ -249,11 +258,12 @@ else {
249
258
  console.error(`[onesource] v${VERSION}`);
250
259
  }
251
260
  const client = createClientFromEnv({ fetch: x402Fetch });
252
- const { server, analytics } = createMcpServer({ client, transport: 'stdio', x402Enabled, x402Address, instructions });
261
+ const { server, analytics } = createMcpServer({ client, transport: 'stdio', x402Enabled, x402Address, instructions, bugReportUrl });
253
262
  const stdioTransport = new StdioServerTransport();
254
263
  await server.connect(stdioTransport);
255
264
  console.error('[onesource] Server connected via stdio');
256
265
  console.error(`[onesource] analytics: ${process.env.ONESOURCE_ANALYTICS === 'false' ? 'disabled' : `dashboard (${process.env.ONESOURCE_ANALYTICS_URL})`}`);
266
+ console.error(`[onesource] bug reporting: ${bugReportUrl ?? 'https://1s-analytics.vercel.app/api/bugs'}`);
257
267
  analytics.trackService({
258
268
  type: 'service_start',
259
269
  service: 'onesource',
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,yFAAyF;AACzF,KAAK,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CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,EAAE,CAAC,CAAC;IAC3J,OAAO,CAAC,KAAK,CAAC,8BAA8B,YAAY,IAAI,0CAA0C,EAAE,CAAC,CAAC;IAE1G,SAAS,CAAC,YAAY,CAAC;QACrB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,SAAS;KAClB,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"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Unified MCP Server Factory
3
3
  *
4
- * Creates a single McpServer named 'onesource' with all 33 tools
5
- * (22 API + 9 docs) by delegating to the two register modules.
4
+ * Creates a single McpServer named 'onesource' with all 34 tools
5
+ * (22 API + 11 docs + 1 bug report) by delegating to the register modules.
6
6
  */
7
7
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
8
  import type { OneSourceClient } from '@one-source/api-mcp/client';
@@ -24,6 +24,8 @@ export interface CreateServerOptions {
24
24
  x402Address?: string;
25
25
  /** Server instructions injected into the LLM's system prompt by MCP clients. */
26
26
  instructions?: string;
27
+ /** Override the default bug report endpoint (for dev/testing). */
28
+ bugReportUrl?: string;
27
29
  }
28
30
  export interface CreateServerResult {
29
31
  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;IAC7B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,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C;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CAiC9E;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC"}
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * Unified MCP Server Factory
3
3
  *
4
- * Creates a single McpServer named 'onesource' with all 33 tools
5
- * (22 API + 9 docs) by delegating to the two register modules.
4
+ * Creates a single McpServer named 'onesource' with all 34 tools
5
+ * (22 API + 11 docs + 1 bug report) by delegating to the register modules.
6
6
  */
7
7
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
8
  import { registerApiTools } from './register-api-tools.js';
9
9
  import { registerDocsTools, loadData } from './register-docs-tools.js';
10
+ import { registerBugReportTool } from './register-bug-report-tool.js';
10
11
  import { createAnalytics } from './analytics.js';
11
12
  import { VERSION } from './version.js';
12
13
  /**
@@ -30,7 +31,13 @@ export function createMcpServer(opts) {
30
31
  x402Enabled: opts?.x402Enabled,
31
32
  x402Address: opts?.x402Address,
32
33
  });
33
- return { server, analytics, client, toolCount: apiCount + docsCount };
34
+ const bugCount = registerBugReportTool({
35
+ server,
36
+ analytics,
37
+ transport,
38
+ bugReportUrl: opts?.bugReportUrl,
39
+ });
40
+ return { server, analytics, client, toolCount: apiCount + docsCount + bugCount };
34
41
  }
35
42
  export { loadData };
36
43
  export { VERSION };
@@ -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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S,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,EAAE,CAAC;AACnF,CAAC;AAED,OAAO,EAAE,QAAQ,EAAmB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Register the 1s_report_bug tool onto a shared McpServer.
3
+ *
4
+ * Sends structured bug reports to the OneSource bug report endpoint,
5
+ * which forwards them to Slack. Works out of the box — no configuration
6
+ * needed. The endpoint URL defaults to the analytics dashboard.
7
+ */
8
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
+ import type { Analytics } from './analytics.js';
10
+ export interface RegisterBugReportToolOptions {
11
+ server: McpServer;
12
+ analytics: Analytics;
13
+ transport?: 'stdio' | 'http';
14
+ /** Override the default bug report endpoint (for dev/testing). */
15
+ bugReportUrl?: string;
16
+ }
17
+ /**
18
+ * Register the bug report tool and return the tool count (1).
19
+ */
20
+ export declare function registerBugReportTool(opts: RegisterBugReportToolOptions): number;
21
+ //# sourceMappingURL=register-bug-report-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-bug-report-tool.d.ts","sourceRoot":"","sources":["../src/register-bug-report-tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAoB/D,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,GAAG,MAAM,CA2GhF"}