@one-source/api-mcp 4.0.0 → 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/LICENSE +21 -21
- package/README.md +125 -97
- package/README.npm.md +125 -97
- package/README.repo.md +172 -144
- package/dist/analytics.d.ts +2 -1
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +0 -8
- package/dist/analytics.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +26 -7
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +26 -4
- package/dist/client.js.map +1 -1
- package/dist/create-server.d.ts +4 -1
- package/dist/create-server.d.ts.map +1 -1
- package/dist/create-server.js +4 -3
- package/dist/create-server.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/x402.d.ts.map +1 -1
- package/dist/x402.js +6 -5
- package/dist/x402.js.map +1 -1
- package/package.json +89 -89
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 BlockParty
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BlockParty
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,97 +1,125 @@
|
|
|
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
|
-
##
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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 API key or 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
|
+
## Authentication
|
|
75
|
+
|
|
76
|
+
Two auth methods are supported. **API key takes priority** when both are configured.
|
|
77
|
+
|
|
78
|
+
### API Key (recommended)
|
|
79
|
+
|
|
80
|
+
Set `ONESOURCE_API_KEY` to your OneSource API key. The server sends it as a Bearer token on every request.
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
ONESOURCE_API_KEY=your-key-here npx onesource-api-mcp
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Or in your MCP config:
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"onesource-api": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["-y", "onesource-api-mcp"],
|
|
93
|
+
"env": {
|
|
94
|
+
"ONESOURCE_API_KEY": "your-key-here"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### x402 Micropayments
|
|
102
|
+
|
|
103
|
+
Set `X402_PRIVATE_KEY` to a funded EVM wallet key. The server automatically signs and settles USDC payments on Base via [x402](https://github.com/coinbase/x402).
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
X402_PRIVATE_KEY=your-private-key-hex npx onesource-api-mcp
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### No auth
|
|
110
|
+
|
|
111
|
+
Without either variable, tools work for free endpoints. Paid endpoints return 402 errors with a descriptive message.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
| Variable | Default | Description |
|
|
117
|
+
|----------|---------|-------------|
|
|
118
|
+
| `ONESOURCE_API_KEY` | — | OneSource API key. Sent as `Authorization: Bearer <key>`. Takes priority over x402. |
|
|
119
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | Skills API endpoint |
|
|
120
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (hex, with or without 0x prefix) for automatic x402 USDC payments on Base |
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
MIT
|
package/README.npm.md
CHANGED
|
@@ -1,97 +1,125 @@
|
|
|
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
|
-
##
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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 API key or 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
|
+
## Authentication
|
|
75
|
+
|
|
76
|
+
Two auth methods are supported. **API key takes priority** when both are configured.
|
|
77
|
+
|
|
78
|
+
### API Key (recommended)
|
|
79
|
+
|
|
80
|
+
Set `ONESOURCE_API_KEY` to your OneSource API key. The server sends it as a Bearer token on every request.
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
ONESOURCE_API_KEY=your-key-here npx onesource-api-mcp
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Or in your MCP config:
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"onesource-api": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["-y", "onesource-api-mcp"],
|
|
93
|
+
"env": {
|
|
94
|
+
"ONESOURCE_API_KEY": "your-key-here"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### x402 Micropayments
|
|
102
|
+
|
|
103
|
+
Set `X402_PRIVATE_KEY` to a funded EVM wallet key. The server automatically signs and settles USDC payments on Base via [x402](https://github.com/coinbase/x402).
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
X402_PRIVATE_KEY=your-private-key-hex npx onesource-api-mcp
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### No auth
|
|
110
|
+
|
|
111
|
+
Without either variable, tools work for free endpoints. Paid endpoints return 402 errors with a descriptive message.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
| Variable | Default | Description |
|
|
117
|
+
|----------|---------|-------------|
|
|
118
|
+
| `ONESOURCE_API_KEY` | — | OneSource API key. Sent as `Authorization: Bearer <key>`. Takes priority over x402. |
|
|
119
|
+
| `ONESOURCE_BASE_URL` | `https://skills.onesource.io` | Skills API endpoint |
|
|
120
|
+
| `X402_PRIVATE_KEY` | — | EVM private key (hex, with or without 0x prefix) for automatic x402 USDC payments on Base |
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
MIT
|