@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/SKILL.md DELETED
@@ -1,169 +0,0 @@
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 33 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
- ## Before You Start
15
-
16
- **Always call `1s_setup_check` before using any other OneSource tools.** This checks the installed version against the latest release and reports x402 payment status.
17
-
18
- - **If an update is available:** Tell the user and help them update before proceeding. Run `npx -y @one-source/mcp@latest` to get the latest version. The update takes effect on the next session — the user will need to restart their MCP client.
19
- - **If `1s_setup_check` is not available:** The MCP is either not installed or running a version before this tool existed. Help the user install or update using the instructions in Step 2 below.
20
- - **If x402 is not configured:** The tool will include setup instructions. Walk the user through them before attempting paid API calls.
21
-
22
- Do not skip this step — outdated versions may be missing tools, fixes, or protocol changes.
23
-
24
- ## Step 1: Check Current Installation
25
-
26
- Call the `1s_setup_check` tool. It reports:
27
- - Server version (current vs latest)
28
- - Whether x402 payments are configured
29
- - Wallet address (if configured)
30
- - API backend connectivity
31
-
32
- If the tool is not available, the MCP is not installed — go to Step 2.
33
-
34
- ## Step 2: Install or Update
35
-
36
- ### Claude Code
37
-
38
- ```bash
39
- claude mcp add onesource -- npx -y @one-source/mcp@latest
40
- ```
41
-
42
- ### Claude Desktop / Cursor
43
-
44
- Add to your MCP configuration file:
45
-
46
- ```json
47
- {
48
- "mcpServers": {
49
- "onesource": {
50
- "command": "npx",
51
- "args": ["-y", "@one-source/mcp@latest"]
52
- }
53
- }
54
- }
55
- ```
56
-
57
- ### Any MCP Client (stdio)
58
-
59
- ```bash
60
- npx -y @one-source/mcp@latest
61
- ```
62
-
63
- ### Check for Updates
64
-
65
- Compare the installed version (shown in `1s_setup_check` output) against the latest:
66
-
67
- ```bash
68
- npm view @one-source/mcp version
69
- ```
70
-
71
- To update, reinstall with `@latest` or clear the npx cache: `npx -y @one-source/mcp@latest`.
72
-
73
- ## Step 3: Get an EVM Private Key
74
-
75
- 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`.
76
-
77
- ### Option A: Export from MetaMask
78
-
79
- 1. Open MetaMask
80
- 2. Click the three dots next to the account name
81
- 3. Go to **Account details** > **Show private key**
82
- 4. Enter your MetaMask password
83
- 5. Copy the key (starts with `0x`)
84
-
85
- ### Option B: Export from Coinbase Wallet
86
-
87
- 1. Open Coinbase Wallet > Settings > Developer settings
88
- 2. Export your private key
89
-
90
- ### Option C: Generate a New Wallet
91
-
92
- ```bash
93
- # Using OpenSSL
94
- echo "0x$(openssl rand -hex 32)"
95
-
96
- # Using Foundry (if installed)
97
- cast wallet new
98
- ```
99
-
100
- **Important:** Use a dedicated wallet for MCP payments — do not use your primary wallet with large holdings. Transfer only what you need.
101
-
102
- ## Step 4: Fund the Wallet with USDC on Base
103
-
104
- The wallet must hold **USDC on the Base network** (not Ethereum mainnet, not other tokens).
105
-
106
- 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.
107
- 2. Send USDC to that address **on the Base network**.
108
- 3. A few dollars ($1–5 USDC) is enough for hundreds of API calls.
109
-
110
- 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.
111
-
112
- ## Step 5: Set the Private Key
113
-
114
- ### Claude Code
115
-
116
- ```bash
117
- claude mcp remove onesource
118
- claude mcp add onesource -e X402_PRIVATE_KEY=0x... -- npx -y @one-source/mcp@latest
119
- ```
120
-
121
- ### Claude Desktop / Cursor
122
-
123
- Add the `env` block to your MCP config:
124
-
125
- ```json
126
- {
127
- "mcpServers": {
128
- "onesource": {
129
- "command": "npx",
130
- "args": ["-y", "@one-source/mcp@latest"],
131
- "env": {
132
- "X402_PRIVATE_KEY": "0x..."
133
- }
134
- }
135
- }
136
- }
137
- ```
138
-
139
- ### Any MCP Client (stdio)
140
-
141
- ```bash
142
- X402_PRIVATE_KEY=0x... npx -y @one-source/mcp@latest
143
- ```
144
-
145
- ### Security
146
-
147
- - **Never** commit your private key to source control.
148
- - Use environment variables, a `.env` file (excluded from git), or a secrets manager.
149
- - Use a dedicated wallet with minimal funds — only what you need for API calls.
150
-
151
- ## Step 6: Verify
152
-
153
- After setting the key and restarting the MCP server, call `1s_setup_check` again. You should see:
154
-
155
- - **x402 status:** Configured
156
- - **Wallet address:** Your wallet address
157
- - **API backend:** Reachable
158
-
159
- Then try a paid tool like `1s_network_info` to confirm payments work end-to-end.
160
-
161
- ## Troubleshooting
162
-
163
- | Problem | Solution |
164
- |---------|----------|
165
- | `1s_setup_check` shows "Not configured" | The `X402_PRIVATE_KEY` env var is not reaching the server. Check your MCP client config and restart. |
166
- | Tool returns HTTP 402 error | x402 is not configured, or the wallet has insufficient USDC on Base. |
167
- | "x402 setup failed" in server logs | The private key format is wrong. It must be a 64-character hex string prefixed with `0x`. |
168
- | Key is set but wallet shows 0 USDC | Make sure USDC is on the **Base** network, not Ethereum mainnet or another chain. |
169
- | Tools work but results seem stale | Check `1s_setup_check` for version — you may need to update to the latest. |