@hypurrquant/defi-cli 0.3.5 → 0.4.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 +195 -199
- package/config/pools.example.toml +31 -0
- package/dist/index.js +297 -2082
- package/dist/index.js.map +1 -1
- package/dist/main.js +303 -2093
- package/dist/main.js.map +1 -1
- package/dist/mcp-server.js +318 -844
- package/dist/mcp-server.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@hypurrquant/defi-cli)
|
|
5
5
|
[](https://github.com/hypurrquant/defi-cli/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
Multi-chain DeFi CLI — **HyperEVM** and **Mantle**
|
|
7
|
+
Multi-chain DeFi CLI — **HyperEVM** (17 protocols) and **Mantle** (4 protocols) for lending, DEX, LP, bridge, and portfolio operations.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g @hypurrquant/defi-cli # global install
|
|
@@ -17,18 +17,17 @@ npx -y @hypurrquant/defi-cli --json status
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
- **2 Chains** — HyperEVM (chain 999) and Mantle (chain 5000)
|
|
20
|
-
- **
|
|
21
|
-
- **Lending** — rates, positions, supply,
|
|
22
|
-
- **DEX** —
|
|
23
|
-
- **LP Management** — add
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **Farm** — deposit, withdraw, claim yields
|
|
29
|
-
- **Portfolio** — unified balance and position overview
|
|
20
|
+
- **21 Protocols** — lending (Aave V3 forks, Morpho, HypurrFi), DEX (KittenSwap, Ramses, Uniswap V3, Merchant Moe LB), vaults, CDP
|
|
21
|
+
- **Lending** — rates, positions, supply, withdraw across all lending protocols
|
|
22
|
+
- **DEX** — add/remove liquidity with multicall optimization
|
|
23
|
+
- **LP Management** — discover 134 emission pools, add, farm, claim, remove, autopilot
|
|
24
|
+
- **DEX Aggregator** — best-price swap via KyberSwap, OpenOcean, LiquidSwap
|
|
25
|
+
- **Bridge** — cross-chain token transfer via LI.FI, deBridge, CCTP
|
|
26
|
+
- **Portfolio** — aggregate positions across lending and LP
|
|
27
|
+
- **Auto-Approve** — checks allowance, exact-approves, then executes in one flow
|
|
30
28
|
- **Agent-First Design** — `--json`, `--fields`, `--ndjson`, `--dry-run`, runtime schema introspection
|
|
31
|
-
- **
|
|
29
|
+
- **MCP Server** — 14 tools for Claude Desktop, Cursor, and other MCP clients
|
|
30
|
+
- **Claude Code Skill** — installable skill for AI-assisted DeFi operations
|
|
32
31
|
|
|
33
32
|
## Setup
|
|
34
33
|
|
|
@@ -41,262 +40,231 @@ export DEFI_WALLET_ADDRESS="0x..." # Wallet address for queries
|
|
|
41
40
|
export HYPEREVM_RPC_URL="https://..."
|
|
42
41
|
export MANTLE_RPC_URL="https://..."
|
|
43
42
|
|
|
43
|
+
# Interactive setup wizard
|
|
44
|
+
defi setup
|
|
45
|
+
|
|
44
46
|
# Verify setup
|
|
45
47
|
defi --json status
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
## Command
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `farm` |
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `compare` | yields, rates, costs | Cross-protocol comparison |
|
|
71
|
-
| `swap` | aggregator | Aggregated DEX swap finder |
|
|
72
|
-
| `arb` | scan, execute, monitor | Arbitrage opportunities |
|
|
73
|
-
| `monitor` | positions, yields, risks | Live monitoring and alerts |
|
|
74
|
-
| `alert` | setup, add, test, list, start, stop | Telegram price and yield alerts |
|
|
75
|
-
| `nft` | collections, balances | NFT portfolio tracking |
|
|
50
|
+
## Command Reference
|
|
51
|
+
|
|
52
|
+
| Command | Description |
|
|
53
|
+
|---------|-------------|
|
|
54
|
+
| `defi` | Dashboard — multicall balances across all protocols |
|
|
55
|
+
| `defi yield` | Cross-chain lending APY comparison (default: USDC) |
|
|
56
|
+
| `defi swap` | DEX aggregator swap (KyberSwap, OpenOcean, LiquidSwap) |
|
|
57
|
+
| `defi lp discover` | Scan 134 emission pools (gauge/farming/lb_hooks) |
|
|
58
|
+
| `defi lp add` | Add liquidity to a pool |
|
|
59
|
+
| `defi lp farm` | Add liquidity and auto-stake for emissions |
|
|
60
|
+
| `defi lp claim` | Claim fee and emission rewards |
|
|
61
|
+
| `defi lp remove` | Auto-unstake and remove liquidity |
|
|
62
|
+
| `defi lp autopilot` | Whitelist-based auto-allocation across pools |
|
|
63
|
+
| `defi lending` | Supply, withdraw, rates, position |
|
|
64
|
+
| `defi portfolio` | Aggregate positions across all protocols |
|
|
65
|
+
| `defi price` | Oracle and DEX prices |
|
|
66
|
+
| `defi token` | Approve, allowance, transfer, balance |
|
|
67
|
+
| `defi wallet` | Address management |
|
|
68
|
+
| `defi bridge` | Cross-chain transfer (LI.FI, deBridge, CCTP) |
|
|
69
|
+
| `defi status` | Protocol overview |
|
|
70
|
+
| `defi schema` | JSON schema for agent introspection |
|
|
71
|
+
| `defi setup` | Interactive wallet/RPC config wizard |
|
|
76
72
|
|
|
77
73
|
## Supported Protocols
|
|
78
74
|
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
|
104
|
-
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
| Both | Morpho Blue | Lending |
|
|
110
|
-
| Both | Felix Morpho | CDP + Lending |
|
|
111
|
-
|
|
112
|
-
### Other Protocols
|
|
113
|
-
|
|
114
|
-
| Category | Chain | Protocol |
|
|
115
|
-
|----------|-------|----------|
|
|
116
|
-
| **Liquid Staking** | HyperEVM | stHYPE (Generic LST) |
|
|
117
|
-
| — | HyperEVM | Kinetiq (Mantle LST) |
|
|
118
|
-
| **Vaults** | HyperEVM | Hyperbeat (ERC4626) |
|
|
119
|
-
| — | HyperEVM | Hypersurface (ERC4626) |
|
|
120
|
-
| — | HyperEVM | Looping (ERC4626) |
|
|
121
|
-
| — | Mantle | Upshift (ERC4626) |
|
|
122
|
-
| — | Both | Felix Vaults (ERC4626) |
|
|
123
|
-
| **CDP** | Both | Felix (MorphoBlue) |
|
|
124
|
-
| **Yield Aggregator** | HyperEVM | Lazy Summer |
|
|
125
|
-
| **NFT** | HyperEVM | Seaport |
|
|
75
|
+
### HyperEVM (17 protocols)
|
|
76
|
+
|
|
77
|
+
| Protocol | Category | Interface |
|
|
78
|
+
|----------|----------|-----------|
|
|
79
|
+
| KittenSwap | DEX | Algebra V3 (CL) |
|
|
80
|
+
| NEST V1 | DEX | Algebra V3 (CL) |
|
|
81
|
+
| Ramses HL | DEX | Solidly V2 (ve(3,3)) |
|
|
82
|
+
| Ramses CL | DEX | Uniswap V3 (CL) |
|
|
83
|
+
| Project X | DEX | Uniswap V2 |
|
|
84
|
+
| Hybra | DEX | Solidly V2 |
|
|
85
|
+
| HyperLend | Lending | Aave V3 |
|
|
86
|
+
| HypurrFi | Lending | Aave V3 |
|
|
87
|
+
| Felix Morpho | Lending | Morpho Blue |
|
|
88
|
+
| Felix Vaults | Vault | ERC-4626 |
|
|
89
|
+
| Felix CDP | CDP | Liquity V2 |
|
|
90
|
+
| Hyperbeat | Vault | ERC-4626 |
|
|
91
|
+
| Looping | Vault | ERC-4626 |
|
|
92
|
+
| Upshift | Vault | ERC-4626 |
|
|
93
|
+
| Lazy Summer | Yield Aggregator | ERC-4626 |
|
|
94
|
+
| Hypersurface | Options | — |
|
|
95
|
+
| Seaport | NFT | — |
|
|
96
|
+
|
|
97
|
+
### Mantle (4 protocols)
|
|
98
|
+
|
|
99
|
+
| Protocol | Category | Interface |
|
|
100
|
+
|----------|----------|-----------|
|
|
101
|
+
| Aave V3 | Lending | Aave V3 |
|
|
102
|
+
| Lendle | Lending | Aave V3 Fork |
|
|
103
|
+
| Uniswap V3 | DEX | Uniswap V3 (CL) |
|
|
104
|
+
| Merchant Moe | DEX | Uniswap V2 + Liquidity Book |
|
|
126
105
|
|
|
127
106
|
## Core Commands
|
|
128
107
|
|
|
129
|
-
###
|
|
108
|
+
### Dashboard
|
|
130
109
|
|
|
131
110
|
```bash
|
|
132
|
-
#
|
|
133
|
-
defi --json
|
|
134
|
-
|
|
135
|
-
# Cross-protocol portfolio view
|
|
136
|
-
defi --json portfolio
|
|
137
|
-
|
|
138
|
-
# Open positions across all protocols
|
|
139
|
-
defi --json positions
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### DEX Operations
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# Get swap quote (no execution)
|
|
146
|
-
defi --json dex quote --protocol hyperswap --token-in HYPE --token-out USDC --amount 1000000000000000000
|
|
147
|
-
|
|
148
|
-
# Execute swap
|
|
149
|
-
defi --json dex swap --protocol hyperswap --token-in HYPE --token-out USDC --amount 1000000000000000000 --broadcast
|
|
111
|
+
# Multicall balance dashboard
|
|
112
|
+
defi --json
|
|
150
113
|
|
|
151
|
-
#
|
|
152
|
-
defi --json
|
|
153
|
-
|
|
154
|
-
# Remove liquidity
|
|
155
|
-
defi --json dex lp-remove --protocol hyperswap --lp-token <ADDRESS> --amount <AMOUNT> --broadcast
|
|
114
|
+
# Protocol overview for current chain
|
|
115
|
+
defi --json status
|
|
156
116
|
|
|
157
|
-
#
|
|
158
|
-
defi --json
|
|
117
|
+
# Mantle protocols
|
|
118
|
+
defi --json --chain mantle status
|
|
159
119
|
```
|
|
160
120
|
|
|
161
|
-
### Lending
|
|
121
|
+
### Lending
|
|
162
122
|
|
|
163
123
|
```bash
|
|
164
|
-
#
|
|
165
|
-
defi --json
|
|
124
|
+
# Cross-chain lending APY comparison (default: USDC)
|
|
125
|
+
defi --json yield
|
|
126
|
+
defi --json --chain mantle yield --asset USDT
|
|
166
127
|
|
|
167
|
-
# Check user position
|
|
128
|
+
# Check user position
|
|
168
129
|
defi --json lending position --protocol hyperlend
|
|
169
130
|
|
|
170
|
-
# Supply collateral
|
|
171
|
-
defi --json lending supply --protocol hyperlend --
|
|
172
|
-
|
|
173
|
-
# Borrow assets
|
|
174
|
-
defi --json lending borrow --protocol hyperlend --token HYPE --amount 1000000000000000000 --broadcast
|
|
175
|
-
|
|
176
|
-
# Repay debt
|
|
177
|
-
defi --json lending repay --protocol hyperlend --token HYPE --amount 500000000000000000 --broadcast
|
|
131
|
+
# Supply collateral (auto-approve included)
|
|
132
|
+
defi --json lending supply --protocol hyperlend --asset USDC --amount 1000000000 --broadcast
|
|
178
133
|
|
|
179
134
|
# Withdraw collateral
|
|
180
|
-
defi --json lending withdraw --protocol hyperlend --
|
|
135
|
+
defi --json lending withdraw --protocol hyperlend --asset USDC --amount 500000000 --broadcast
|
|
181
136
|
```
|
|
182
137
|
|
|
183
|
-
###
|
|
138
|
+
### DEX Aggregator Swap
|
|
139
|
+
|
|
140
|
+
Uses KyberSwap, OpenOcean, and LiquidSwap to find the best route automatically.
|
|
184
141
|
|
|
185
142
|
```bash
|
|
186
|
-
#
|
|
187
|
-
defi --json
|
|
143
|
+
# Dry-run (default — no transaction)
|
|
144
|
+
defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000
|
|
188
145
|
|
|
189
|
-
#
|
|
190
|
-
defi --json
|
|
146
|
+
# Execute swap
|
|
147
|
+
defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000 --broadcast
|
|
191
148
|
|
|
192
|
-
#
|
|
193
|
-
defi --json
|
|
149
|
+
# With slippage (basis points)
|
|
150
|
+
defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000 --slippage 100 --broadcast
|
|
194
151
|
```
|
|
195
152
|
|
|
196
|
-
###
|
|
153
|
+
### LP Operations
|
|
197
154
|
|
|
198
|
-
|
|
199
|
-
# Deposit into gauge
|
|
200
|
-
defi --json gauge deposit --protocol kinetiq --amount 1000000000000000000 --broadcast
|
|
155
|
+
#### Discover Pools
|
|
201
156
|
|
|
202
|
-
|
|
203
|
-
|
|
157
|
+
```bash
|
|
158
|
+
# List all 134 emission pools across HyperEVM
|
|
159
|
+
defi --json lp discover
|
|
204
160
|
|
|
205
|
-
#
|
|
206
|
-
defi --json
|
|
161
|
+
# Filter by protocol
|
|
162
|
+
defi --json lp discover --protocol kittenswap
|
|
207
163
|
|
|
208
|
-
#
|
|
209
|
-
defi --json
|
|
164
|
+
# Show only pools with APR above threshold
|
|
165
|
+
defi --json lp discover --min-apr 10
|
|
210
166
|
```
|
|
211
167
|
|
|
212
|
-
|
|
168
|
+
#### Add Liquidity
|
|
213
169
|
|
|
214
170
|
```bash
|
|
215
|
-
|
|
216
|
-
|
|
171
|
+
defi --json lp add --protocol kittenswap --pool-address 0x... --amount-a 1000000000000000000 --amount-b 5000000000 --broadcast
|
|
172
|
+
```
|
|
217
173
|
|
|
218
|
-
|
|
219
|
-
defi --json vault withdraw --protocol hyperbeat --shares 1000000000000000000 --broadcast
|
|
174
|
+
#### Farm (Add + Auto-stake)
|
|
220
175
|
|
|
221
|
-
|
|
222
|
-
|
|
176
|
+
```bash
|
|
177
|
+
# Add liquidity and stake into gauge/farming in one step
|
|
178
|
+
defi --json lp farm --protocol kittenswap --pool-address 0x... --amount-a 1000000000000000000 --amount-b 5000000000 --broadcast
|
|
223
179
|
```
|
|
224
180
|
|
|
225
|
-
|
|
181
|
+
#### Claim Rewards
|
|
226
182
|
|
|
227
183
|
```bash
|
|
228
|
-
#
|
|
229
|
-
defi --json
|
|
184
|
+
# Claim fee and emission rewards from a pool
|
|
185
|
+
defi --json lp claim --protocol kittenswap --pool-address 0x... --broadcast
|
|
186
|
+
```
|
|
230
187
|
|
|
231
|
-
|
|
232
|
-
defi --json bridge --token USDC --amount 1000000000 --to-chain mantle --provider debridge --broadcast
|
|
188
|
+
#### Remove Liquidity
|
|
233
189
|
|
|
234
|
-
|
|
235
|
-
|
|
190
|
+
```bash
|
|
191
|
+
# Auto-unstake (if staked) and remove liquidity
|
|
192
|
+
defi --json lp remove --protocol kittenswap --pool-address 0x... --broadcast
|
|
236
193
|
```
|
|
237
194
|
|
|
238
|
-
|
|
195
|
+
#### LP Autopilot
|
|
239
196
|
|
|
240
|
-
|
|
241
|
-
# Get yield comparison across protocols
|
|
242
|
-
defi --json yield compare
|
|
197
|
+
Reads `~/.defi/pools.toml` for whitelisted pools and allocates budget automatically.
|
|
243
198
|
|
|
244
|
-
|
|
245
|
-
|
|
199
|
+
```bash
|
|
200
|
+
# Dry-run autopilot allocation
|
|
201
|
+
defi --json lp autopilot --budget 1000000000 # 1000 USDC
|
|
246
202
|
|
|
247
|
-
# Execute
|
|
248
|
-
defi --json
|
|
203
|
+
# Execute
|
|
204
|
+
defi --json lp autopilot --budget 1000000000 --broadcast
|
|
205
|
+
```
|
|
249
206
|
|
|
250
|
-
|
|
251
|
-
defi --json farm deposit --protocol lazy-summer --amount 1000000000000000000 --broadcast
|
|
207
|
+
**pools.toml example:**
|
|
252
208
|
|
|
253
|
-
|
|
254
|
-
|
|
209
|
+
```toml
|
|
210
|
+
[[pools]]
|
|
211
|
+
protocol = "kittenswap"
|
|
212
|
+
pool_address = "0xYourPoolAddress"
|
|
213
|
+
weight = 50 # 50% of budget
|
|
255
214
|
|
|
256
|
-
|
|
257
|
-
|
|
215
|
+
[[pools]]
|
|
216
|
+
protocol = "nest-v1"
|
|
217
|
+
pool_address = "0xAnotherPool"
|
|
218
|
+
weight = 50
|
|
258
219
|
```
|
|
259
220
|
|
|
260
|
-
|
|
221
|
+
Default location: `~/.defi/pools.toml`
|
|
222
|
+
|
|
223
|
+
### Bridge
|
|
261
224
|
|
|
262
225
|
```bash
|
|
263
|
-
#
|
|
264
|
-
defi --json
|
|
226
|
+
# Bridge via LI.FI (default)
|
|
227
|
+
defi --json bridge --token USDC --amount 100000000 --to-chain mantle
|
|
265
228
|
|
|
266
|
-
#
|
|
267
|
-
defi --json
|
|
229
|
+
# Bridge via deBridge DLN
|
|
230
|
+
defi --json bridge --token USDC --amount 100000000 --to-chain arbitrum --provider debridge --broadcast
|
|
268
231
|
|
|
269
|
-
#
|
|
270
|
-
defi --json
|
|
232
|
+
# Native USDC via Circle CCTP V2
|
|
233
|
+
defi --json bridge --token USDC --amount 100000000 --to-chain arbitrum --provider cctp --broadcast
|
|
271
234
|
```
|
|
272
235
|
|
|
273
|
-
###
|
|
236
|
+
### Portfolio
|
|
274
237
|
|
|
275
238
|
```bash
|
|
276
|
-
#
|
|
277
|
-
defi --json
|
|
278
|
-
|
|
279
|
-
# Approve token spending
|
|
280
|
-
defi --json token approve --token USDC --spender 0x... --amount 1000000000 --broadcast
|
|
239
|
+
# Aggregate positions across all protocols
|
|
240
|
+
defi --json portfolio
|
|
241
|
+
```
|
|
281
242
|
|
|
282
|
-
|
|
283
|
-
defi --json wallet balance --address 0x...
|
|
243
|
+
### Token & Wallet
|
|
284
244
|
|
|
285
|
-
|
|
286
|
-
|
|
245
|
+
```bash
|
|
246
|
+
# Token operations
|
|
247
|
+
defi --json token balance --token USDC
|
|
248
|
+
defi --json token allowance --token USDC --spender 0x...
|
|
249
|
+
defi --json token approve --token USDC --spender 0x... --amount max --broadcast
|
|
250
|
+
defi --json token transfer --token USDC --to 0x... --amount 1000000 --broadcast
|
|
251
|
+
|
|
252
|
+
# Wallet management
|
|
253
|
+
defi --json wallet address
|
|
254
|
+
defi --json wallet balance
|
|
287
255
|
```
|
|
288
256
|
|
|
289
257
|
### Price & Market Data
|
|
290
258
|
|
|
291
259
|
```bash
|
|
292
|
-
#
|
|
293
|
-
defi --json price --asset
|
|
260
|
+
# Oracle + DEX prices
|
|
261
|
+
defi --json price --asset WHYPE
|
|
294
262
|
|
|
295
|
-
#
|
|
296
|
-
defi --json price --asset
|
|
263
|
+
# DEX prices only
|
|
264
|
+
defi --json price --asset WHYPE --source dex
|
|
297
265
|
|
|
298
|
-
#
|
|
299
|
-
defi --json price --asset
|
|
266
|
+
# Oracle prices only
|
|
267
|
+
defi --json price --asset USDC --source oracle
|
|
300
268
|
```
|
|
301
269
|
|
|
302
270
|
## Agent-First Design
|
|
@@ -315,15 +283,17 @@ defi --json schema
|
|
|
315
283
|
defi --json --fields balance,positions status
|
|
316
284
|
|
|
317
285
|
# Stream large lists as NDJSON (one JSON per line)
|
|
318
|
-
defi --json --ndjson
|
|
286
|
+
defi --json --ndjson lp discover
|
|
319
287
|
|
|
320
288
|
# Pre-validate before executing
|
|
321
|
-
defi --json
|
|
289
|
+
defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000
|
|
322
290
|
|
|
323
291
|
# Safe by default: --dry-run is on, use --broadcast to execute
|
|
324
|
-
defi --json
|
|
292
|
+
defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000 --broadcast
|
|
325
293
|
```
|
|
326
294
|
|
|
295
|
+
Responses include `needs_approval` simulation status. Auto-approve flow: check allowance → exact approve → execute tx.
|
|
296
|
+
|
|
327
297
|
All responses are auto-sanitized (control chars stripped, prompt injection patterns blocked).
|
|
328
298
|
Errors include `retryable` flag — only retry when `true`.
|
|
329
299
|
|
|
@@ -347,9 +317,35 @@ HYPEREVM_RPC_URL # Override HyperEVM RPC endpoint
|
|
|
347
317
|
MANTLE_RPC_URL # Override Mantle RPC endpoint
|
|
348
318
|
```
|
|
349
319
|
|
|
350
|
-
## MCP Server
|
|
320
|
+
## MCP Server
|
|
321
|
+
|
|
322
|
+
14 MCP tools for Claude Desktop, Cursor, and other MCP clients.
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"mcpServers": {
|
|
327
|
+
"defi-cli": {
|
|
328
|
+
"command": "npx",
|
|
329
|
+
"args": ["-y", "@hypurrquant/defi-cli", "mcp"]
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Available tools:** `defi_status`, `defi_lending_rates`, `defi_lending_supply`, `defi_lending_withdraw`, `defi_dex_quote`, `defi_dex_swap`, `defi_dex_lp_add`, `defi_dex_lp_remove`, `defi_bridge`, `defi_vault_info`, `defi_staking_info`, `defi_price`, `defi_scan`, `defi_portfolio`
|
|
336
|
+
|
|
337
|
+
See `mcp-config.example.json` for full configuration.
|
|
338
|
+
|
|
339
|
+
## Claude Code Skill
|
|
340
|
+
|
|
341
|
+
Install the skill for AI-assisted DeFi operations:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
# Install from npm package
|
|
345
|
+
npx -y @hypurrquant/defi-cli skill install
|
|
346
|
+
```
|
|
351
347
|
|
|
352
|
-
|
|
348
|
+
Or copy `skills/defi-cli/` into your Claude Code skills directory.
|
|
353
349
|
|
|
354
350
|
## License
|
|
355
351
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Pool whitelist — autopilot only operates within these pools
|
|
2
|
+
# Copy this file to ~/.defi/pools.toml and customize for your strategy.
|
|
3
|
+
# Run: defi lp autopilot --budget 300 --dry-run
|
|
4
|
+
|
|
5
|
+
[[whitelist]]
|
|
6
|
+
chain = "mantle"
|
|
7
|
+
protocol = "merchantmoe-mantle"
|
|
8
|
+
pool = "WMNT/USDT0" # pool name or address
|
|
9
|
+
type = "lb" # lb, gauge, farming, lending
|
|
10
|
+
max_allocation_pct = 40 # max % of budget for this pool
|
|
11
|
+
|
|
12
|
+
[[whitelist]]
|
|
13
|
+
chain = "mantle"
|
|
14
|
+
protocol = "lendle-mantle"
|
|
15
|
+
asset = "USDC"
|
|
16
|
+
type = "lending"
|
|
17
|
+
max_allocation_pct = 40
|
|
18
|
+
|
|
19
|
+
[[whitelist]]
|
|
20
|
+
chain = "hyperevm"
|
|
21
|
+
protocol = "kittenswap"
|
|
22
|
+
pool = "WHYPE/USDC"
|
|
23
|
+
type = "farming"
|
|
24
|
+
max_allocation_pct = 30
|
|
25
|
+
|
|
26
|
+
[[whitelist]]
|
|
27
|
+
chain = "hyperevm"
|
|
28
|
+
protocol = "hyperlend"
|
|
29
|
+
asset = "USDC"
|
|
30
|
+
type = "lending"
|
|
31
|
+
max_allocation_pct = 30
|