@one-source/api-mcp 3.1.0 → 4.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 +97 -125
- package/README.npm.md +97 -125
- package/README.repo.md +17 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,125 +1,97 @@
|
|
|
1
|
-
# onesource-api-mcp
|
|
2
|
-
|
|
3
|
-
MCP server for OneSource blockchain data. 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402 micropayments.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
npx onesource-api-mcp
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
|
50
|
-
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
2. Copy the key (it starts with `0x`)
|
|
99
|
-
|
|
100
|
-
**Option B — Generate a new wallet:**
|
|
101
|
-
```bash
|
|
102
|
-
# Using Foundry (cast)
|
|
103
|
-
cast wallet new
|
|
104
|
-
|
|
105
|
-
# Using OpenSSL
|
|
106
|
-
openssl rand -hex 32 | sed 's/^/0x/'
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Funding the Wallet
|
|
110
|
-
|
|
111
|
-
The wallet needs **USDC on Base** to pay for tool calls. Send USDC to your wallet address on the Base network. Typical tool calls cost fractions of a cent.
|
|
112
|
-
|
|
113
|
-
### Running with Payments
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# Inline
|
|
117
|
-
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Or configure the key in your MCP client's `env` block (see [Install](#install) above).
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## License
|
|
124
|
-
|
|
125
|
-
MIT
|
|
1
|
+
# onesource-api-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for OneSource blockchain data. 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402 micropayments.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx onesource-api-mcp
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
# Claude Code
|
|
13
|
+
claude mcp add onesource-api -- npx onesource-api-mcp
|
|
14
|
+
|
|
15
|
+
# Claude Desktop / Cursor — add to MCP config:
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"onesource-api": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": ["-y", "onesource-api-mcp"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Tools (22)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Live Chain Data (12 tools)
|
|
30
|
+
|
|
31
|
+
| Tool | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| `1s_allowance_live` | ERC20 allowance check |
|
|
34
|
+
| `1s_contract_info_live` | Contract type detection via ERC165 |
|
|
35
|
+
| `1s_erc1155_balance_live` | ERC1155 balance via RPC |
|
|
36
|
+
| `1s_erc20_balance_live` | ERC20 balance via balanceOf |
|
|
37
|
+
| `1s_erc20_transfers_live` | ERC20 Transfer logs via eth_getLogs |
|
|
38
|
+
| `1s_erc721_tokens_live` | ERC721 token enumeration |
|
|
39
|
+
| `1s_events_live` | Event logs via eth_getLogs |
|
|
40
|
+
| `1s_multi_balance_live` | ETH + multiple ERC20 balances |
|
|
41
|
+
| `1s_nft_metadata_live` | NFT metadata via tokenURI |
|
|
42
|
+
| `1s_nft_owner_live` | NFT owner via ownerOf |
|
|
43
|
+
| `1s_total_supply_live` | Token total supply |
|
|
44
|
+
| `1s_tx_details_live` | Transaction + receipt via RPC |
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Chain Utilities (10 tools)
|
|
48
|
+
|
|
49
|
+
| Tool | Description |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| `1s_contract_code` | Contract bytecode |
|
|
52
|
+
| `1s_ens_resolve` | ENS name/address resolution |
|
|
53
|
+
| `1s_estimate_gas` | Gas estimation |
|
|
54
|
+
| `1s_network_info` | Chain ID, block number, gas price |
|
|
55
|
+
| `1s_nonce` | Transaction count |
|
|
56
|
+
| `1s_pending_block` | Pending block from mempool |
|
|
57
|
+
| `1s_proxy_detect` | Proxy contract detection |
|
|
58
|
+
| `1s_simulate_call` | Simulate eth_call |
|
|
59
|
+
| `1s_storage_read` | Read storage slot |
|
|
60
|
+
| `1s_tx_receipt` | Transaction receipt |
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Networks
|
|
64
|
+
|
|
65
|
+
All tools accept an optional `network` parameter:
|
|
66
|
+
|
|
67
|
+
| Network | Description |
|
|
68
|
+
|---------|-------------|
|
|
69
|
+
| `ethereum` | Ethereum mainnet (default) |
|
|
70
|
+
| `sepolia` | Ethereum Sepolia testnet |
|
|
71
|
+
| `avax` | Avalanche C-Chain |
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Payment (x402)
|
|
75
|
+
|
|
76
|
+
Endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When the backend has payments enabled, tool calls return a 402 with payment details.
|
|
77
|
+
|
|
78
|
+
**Automatic payments:** Set `X402_PRIVATE_KEY` to a funded EVM wallet key. The server will automatically sign and settle USDC payments for each tool call.
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Without this key, 402 responses are returned as tool errors with a descriptive message.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
| Variable | Default | Description |
|
|
90
|
+
|----------|---------|-------------|
|
|
91
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | Skills API endpoint |
|
|
92
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (0x-prefixed hex) for automatic x402 USDC payments on Base |
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|
package/README.npm.md
CHANGED
|
@@ -1,125 +1,97 @@
|
|
|
1
|
-
# onesource-api-mcp
|
|
2
|
-
|
|
3
|
-
MCP server for OneSource blockchain data. 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402 micropayments.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
npx onesource-api-mcp
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
|
50
|
-
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
2. Copy the key (it starts with `0x`)
|
|
99
|
-
|
|
100
|
-
**Option B — Generate a new wallet:**
|
|
101
|
-
```bash
|
|
102
|
-
# Using Foundry (cast)
|
|
103
|
-
cast wallet new
|
|
104
|
-
|
|
105
|
-
# Using OpenSSL
|
|
106
|
-
openssl rand -hex 32 | sed 's/^/0x/'
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Funding the Wallet
|
|
110
|
-
|
|
111
|
-
The wallet needs **USDC on Base** to pay for tool calls. Send USDC to your wallet address on the Base network. Typical tool calls cost fractions of a cent.
|
|
112
|
-
|
|
113
|
-
### Running with Payments
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# Inline
|
|
117
|
-
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Or configure the key in your MCP client's `env` block (see [Install](#install) above).
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## License
|
|
124
|
-
|
|
125
|
-
MIT
|
|
1
|
+
# onesource-api-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for OneSource blockchain data. 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402 micropayments.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx onesource-api-mcp
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
# Claude Code
|
|
13
|
+
claude mcp add onesource-api -- npx onesource-api-mcp
|
|
14
|
+
|
|
15
|
+
# Claude Desktop / Cursor — add to MCP config:
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"onesource-api": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": ["-y", "onesource-api-mcp"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Tools (22)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Live Chain Data (12 tools)
|
|
30
|
+
|
|
31
|
+
| Tool | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| `1s_allowance_live` | ERC20 allowance check |
|
|
34
|
+
| `1s_contract_info_live` | Contract type detection via ERC165 |
|
|
35
|
+
| `1s_erc1155_balance_live` | ERC1155 balance via RPC |
|
|
36
|
+
| `1s_erc20_balance_live` | ERC20 balance via balanceOf |
|
|
37
|
+
| `1s_erc20_transfers_live` | ERC20 Transfer logs via eth_getLogs |
|
|
38
|
+
| `1s_erc721_tokens_live` | ERC721 token enumeration |
|
|
39
|
+
| `1s_events_live` | Event logs via eth_getLogs |
|
|
40
|
+
| `1s_multi_balance_live` | ETH + multiple ERC20 balances |
|
|
41
|
+
| `1s_nft_metadata_live` | NFT metadata via tokenURI |
|
|
42
|
+
| `1s_nft_owner_live` | NFT owner via ownerOf |
|
|
43
|
+
| `1s_total_supply_live` | Token total supply |
|
|
44
|
+
| `1s_tx_details_live` | Transaction + receipt via RPC |
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Chain Utilities (10 tools)
|
|
48
|
+
|
|
49
|
+
| Tool | Description |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| `1s_contract_code` | Contract bytecode |
|
|
52
|
+
| `1s_ens_resolve` | ENS name/address resolution |
|
|
53
|
+
| `1s_estimate_gas` | Gas estimation |
|
|
54
|
+
| `1s_network_info` | Chain ID, block number, gas price |
|
|
55
|
+
| `1s_nonce` | Transaction count |
|
|
56
|
+
| `1s_pending_block` | Pending block from mempool |
|
|
57
|
+
| `1s_proxy_detect` | Proxy contract detection |
|
|
58
|
+
| `1s_simulate_call` | Simulate eth_call |
|
|
59
|
+
| `1s_storage_read` | Read storage slot |
|
|
60
|
+
| `1s_tx_receipt` | Transaction receipt |
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Networks
|
|
64
|
+
|
|
65
|
+
All tools accept an optional `network` parameter:
|
|
66
|
+
|
|
67
|
+
| Network | Description |
|
|
68
|
+
|---------|-------------|
|
|
69
|
+
| `ethereum` | Ethereum mainnet (default) |
|
|
70
|
+
| `sepolia` | Ethereum Sepolia testnet |
|
|
71
|
+
| `avax` | Avalanche C-Chain |
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Payment (x402)
|
|
75
|
+
|
|
76
|
+
Endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When the backend has payments enabled, tool calls return a 402 with payment details.
|
|
77
|
+
|
|
78
|
+
**Automatic payments:** Set `X402_PRIVATE_KEY` to a funded EVM wallet key. The server will automatically sign and settle USDC payments for each tool call.
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Without this key, 402 responses are returned as tool errors with a descriptive message.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
| Variable | Default | Description |
|
|
90
|
+
|----------|---------|-------------|
|
|
91
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | Skills API endpoint |
|
|
92
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (0x-prefixed hex) for automatic x402 USDC payments on Base |
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|
package/README.repo.md
CHANGED
|
@@ -8,35 +8,21 @@ npx onesource-api-mcp
|
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```bash
|
|
11
|
+
```sh
|
|
12
|
+
# Claude Code
|
|
14
13
|
claude mcp add onesource-api -- npx onesource-api-mcp
|
|
15
14
|
|
|
16
|
-
#
|
|
17
|
-
claude mcp add onesource-api -e X402_PRIVATE_KEY=0x... -- npx onesource-api-mcp
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Claude Desktop / Cursor
|
|
21
|
-
|
|
22
|
-
Add to your MCP config (`claude_desktop_config.json` or Cursor settings):
|
|
23
|
-
|
|
24
|
-
```json
|
|
15
|
+
# Claude Desktop / Cursor — add to MCP config:
|
|
25
16
|
{
|
|
26
17
|
"mcpServers": {
|
|
27
18
|
"onesource-api": {
|
|
28
19
|
"command": "npx",
|
|
29
|
-
"args": ["-y", "onesource-api-mcp"]
|
|
30
|
-
"env": {
|
|
31
|
-
"X402_PRIVATE_KEY": "0x..."
|
|
32
|
-
}
|
|
20
|
+
"args": ["-y", "onesource-api-mcp"]
|
|
33
21
|
}
|
|
34
22
|
}
|
|
35
23
|
}
|
|
36
24
|
```
|
|
37
25
|
|
|
38
|
-
Remove the `env` block to run without payments.
|
|
39
|
-
|
|
40
26
|
## Tools (22)
|
|
41
27
|
|
|
42
28
|
|
|
@@ -87,37 +73,26 @@ All tools accept an optional `network` parameter:
|
|
|
87
73
|
|
|
88
74
|
## Payment (x402)
|
|
89
75
|
|
|
90
|
-
Endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When
|
|
91
|
-
|
|
92
|
-
### Getting a Private Key
|
|
76
|
+
Endpoints are priced in USDC on Base via [x402](https://github.com/coinbase/x402). When the backend has payments enabled, tool calls return a 402 with payment details.
|
|
93
77
|
|
|
94
|
-
`X402_PRIVATE_KEY`
|
|
78
|
+
**Automatic payments:** Set `X402_PRIVATE_KEY` to a funded EVM wallet key. The server will automatically sign and settle USDC payments for each tool call.
|
|
95
79
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
2. Copy the key (it starts with `0x`)
|
|
99
|
-
|
|
100
|
-
**Option B — Generate a new wallet:**
|
|
101
|
-
```bash
|
|
102
|
-
# Using Foundry (cast)
|
|
103
|
-
cast wallet new
|
|
104
|
-
|
|
105
|
-
# Using OpenSSL
|
|
106
|
-
openssl rand -hex 32 | sed 's/^/0x/'
|
|
80
|
+
```sh
|
|
81
|
+
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
107
82
|
```
|
|
108
83
|
|
|
109
|
-
|
|
84
|
+
Without this key, 402 responses are returned as tool errors with a descriptive message.
|
|
110
85
|
|
|
111
|
-
The wallet needs **USDC on Base** to pay for tool calls. Send USDC to your wallet address on the Base network. Typical tool calls cost fractions of a cent.
|
|
112
86
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# Inline
|
|
117
|
-
X402_PRIVATE_KEY=0x... npx onesource-api-mcp
|
|
118
|
-
```
|
|
87
|
+
## Configuration
|
|
119
88
|
|
|
120
|
-
|
|
89
|
+
| Variable | Default | Description |
|
|
90
|
+
|----------|---------|-------------|
|
|
91
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | Skills API endpoint |
|
|
92
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (0x-prefixed hex) for automatic x402 USDC payments on Base |
|
|
93
|
+
| `ONESOURCE_ANALYTICS` | `true` | Set `false` to disable all analytics |
|
|
94
|
+
| `ONESOURCE_ANALYTICS_URL` | `https://1s-analytics.vercel.app` | Dashboard endpoint for event ingestion (baked in by default) |
|
|
95
|
+
| `X402_ANALYTICS_KEY` | `onesource-api-mcp` | Bearer token for the analytics dashboard (baked in by default) |
|
|
121
96
|
|
|
122
97
|
## Transport Modes
|
|
123
98
|
|
package/package.json
CHANGED