@arcadia-finance/mcp-server 0.5.2 → 0.6.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 +47 -42
- package/dist/clients/api.js +52 -5
- package/dist/clients/chain.js +1 -1
- package/dist/config/addresses.js +16 -3
- package/dist/index.js +36 -134
- package/dist/prompts/workflows.js +54 -18
- package/dist/resources/guides.js +1 -1
- package/dist/tools/aero.js +157 -0
- package/dist/tools/dev/send.js +4 -4
- package/dist/tools/index.js +6 -0
- package/dist/tools/output-schemas.js +103 -29
- package/dist/tools/read/account.js +13 -13
- package/dist/tools/read/aero-upgrade.js +53 -0
- package/dist/tools/read/asset-managers.js +9 -9
- package/dist/tools/read/assets.js +7 -7
- package/dist/tools/read/guides.js +4 -4
- package/dist/tools/read/points.js +4 -4
- package/dist/tools/read/pools.js +8 -8
- package/dist/tools/read/strategy.js +12 -12
- package/dist/tools/read/wallet.js +15 -15
- package/dist/tools/write/account/add-liquidity.js +9 -9
- package/dist/tools/write/account/aero-upgrade.js +124 -0
- package/dist/tools/write/account/borrow.js +5 -5
- package/dist/tools/write/account/close.js +8 -8
- package/dist/tools/write/account/create.js +3 -3
- package/dist/tools/write/account/deleverage.js +4 -4
- package/dist/tools/write/account/deposit.js +4 -4
- package/dist/tools/write/account/format-response.js +1 -1
- package/dist/tools/write/account/remove-liquidity.js +6 -6
- package/dist/tools/write/account/repay.js +4 -4
- package/dist/tools/write/account/stake.js +5 -5
- package/dist/tools/write/account/swap.js +4 -4
- package/dist/tools/write/account/withdraw.js +5 -5
- package/dist/tools/write/asset-managers/automations.js +14 -14
- package/dist/tools/write/asset-managers/intents.js +10 -7
- package/dist/tools/write/pool/deposit.js +5 -5
- package/dist/tools/write/pool/redeem.js +4 -4
- package/dist/tools/write/wallet/approve.js +4 -4
- package/dist/tools/write/wallet/upgrade-velo.js +76 -0
- package/dist/utils/analytics.js +68 -0
- package/dist/utils/http-config.js +4 -4
- package/llms-full.txt +83 -46
- package/llms.txt +47 -44
- package/package.json +8 -4
- package/server.json +4 -4
- package/skills/clamm-liquidity/SKILL.md +100 -82
- package/skills/clamm-liquidity/automation.md +14 -14
- package/skills/clamm-liquidity/selection.md +13 -13
- package/skills/clamm-liquidity/strategies.md +135 -53
- package/skills/openclaw/SKILL.md +3 -3
- package/skills/openclaw/arcadia.sh +24 -45
- package/skills/openclaw/contracts.md +11 -10
- package/dist/utils/tool-naming.js +0 -91
package/llms-full.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Arcadia Finance MCP Server
|
|
2
2
|
|
|
3
|
-
> MCP server for Arcadia Finance, a DeFi protocol for concentrated liquidity (Uniswap v3/v4, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Supported chains: Base (8453), Unichain (130), Optimism (10), Robinhood (4663).
|
|
3
|
+
> MCP server for Arcadia Finance, a DeFi protocol for concentrated liquidity (Uniswap v3/v4, Aero CL, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Supported chains: Base (8453), Unichain (130), Optimism (10), Robinhood (4663).
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 38 tools:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -24,9 +24,9 @@ npx -y @arcadia-finance/mcp-server
|
|
|
24
24
|
|
|
25
25
|
Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
26
26
|
|
|
27
|
-
## Read Tools (
|
|
27
|
+
## Read Tools (19)
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### read_account_info
|
|
30
30
|
|
|
31
31
|
Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status.
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ Parameters:
|
|
|
34
34
|
- `account_address` (string, required): Arcadia account address
|
|
35
35
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### read_account_history
|
|
38
38
|
|
|
39
39
|
Get historical collateral and debt values for an Arcadia account over time.
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ Parameters:
|
|
|
43
43
|
- `days` (number, default: 14): Number of days of history
|
|
44
44
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
45
45
|
|
|
46
|
-
###
|
|
46
|
+
### read_account_pnl
|
|
47
47
|
|
|
48
48
|
Get PnL (cost basis) and yield earned for an Arcadia account.
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ Parameters:
|
|
|
51
51
|
- `account_address` (string, required): Arcadia account address
|
|
52
52
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### read_wallet_balances
|
|
55
55
|
|
|
56
56
|
Get native ETH and ERC20 token balances for a wallet address.
|
|
57
57
|
|
|
@@ -60,7 +60,7 @@ Parameters:
|
|
|
60
60
|
- `token_addresses` (string[], required): ERC20 token contract addresses to check
|
|
61
61
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
62
62
|
|
|
63
|
-
###
|
|
63
|
+
### read_wallet_allowances
|
|
64
64
|
|
|
65
65
|
Check ERC20 token allowances for a spender address.
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ Parameters:
|
|
|
70
70
|
- `token_addresses` (string[], required): ERC20 token contract addresses to check
|
|
71
71
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### read_wallet_accounts
|
|
74
74
|
|
|
75
75
|
List all Arcadia accounts owned by a wallet address.
|
|
76
76
|
|
|
@@ -78,14 +78,14 @@ Parameters:
|
|
|
78
78
|
- `wallet_address` (string, required): Wallet address to list accounts for
|
|
79
79
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
80
80
|
|
|
81
|
-
###
|
|
81
|
+
### read_wallet_points
|
|
82
82
|
|
|
83
83
|
Get Arcadia points balance for a specific wallet address.
|
|
84
84
|
|
|
85
85
|
Parameters:
|
|
86
86
|
- `wallet_address` (string, required): Wallet address to get points for
|
|
87
87
|
|
|
88
|
-
###
|
|
88
|
+
### read_asset_list
|
|
89
89
|
|
|
90
90
|
List supported collateral assets on Arcadia.
|
|
91
91
|
|
|
@@ -93,7 +93,7 @@ Parameters:
|
|
|
93
93
|
- `search` (string, optional): Filter assets by symbol (case-insensitive substring match)
|
|
94
94
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
95
95
|
|
|
96
|
-
###
|
|
96
|
+
### read_asset_prices
|
|
97
97
|
|
|
98
98
|
Get USD prices for one or more asset addresses.
|
|
99
99
|
|
|
@@ -101,14 +101,14 @@ Parameters:
|
|
|
101
101
|
- `asset_addresses` (string, required): Single address or comma-separated addresses
|
|
102
102
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
103
103
|
|
|
104
|
-
###
|
|
104
|
+
### read_pool_list
|
|
105
105
|
|
|
106
106
|
List all Arcadia lending pools: TVL, utilization, available liquidity.
|
|
107
107
|
|
|
108
108
|
Parameters:
|
|
109
109
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
110
110
|
|
|
111
|
-
###
|
|
111
|
+
### read_pool_info
|
|
112
112
|
|
|
113
113
|
Get detailed info for a single lending pool including APY history over time.
|
|
114
114
|
|
|
@@ -117,7 +117,7 @@ Parameters:
|
|
|
117
117
|
- `days` (number, default: 14): Number of days of APY history
|
|
118
118
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
119
119
|
|
|
120
|
-
###
|
|
120
|
+
### read_point_leaderboard
|
|
121
121
|
|
|
122
122
|
Get the Arcadia points leaderboard (paginated).
|
|
123
123
|
|
|
@@ -125,7 +125,7 @@ Parameters:
|
|
|
125
125
|
- `limit` (number, default: 25): Max entries to return
|
|
126
126
|
- `offset` (number, default: 0): Skip first N entries for pagination
|
|
127
127
|
|
|
128
|
-
###
|
|
128
|
+
### read_strategy_list
|
|
129
129
|
|
|
130
130
|
Get Arcadia LP strategies with 7d avg APY for each strategy's default range.
|
|
131
131
|
|
|
@@ -135,7 +135,7 @@ Parameters:
|
|
|
135
135
|
- `offset` (number, default: 0): Skip first N strategies for pagination
|
|
136
136
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
137
137
|
|
|
138
|
-
###
|
|
138
|
+
### read_strategy_info
|
|
139
139
|
|
|
140
140
|
Get full detail for a specific LP strategy by ID.
|
|
141
141
|
|
|
@@ -143,7 +143,7 @@ Parameters:
|
|
|
143
143
|
- `strategy_id` (number, required): Strategy ID
|
|
144
144
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
145
145
|
|
|
146
|
-
###
|
|
146
|
+
### read_strategy_recommendation
|
|
147
147
|
|
|
148
148
|
Get a rebalancing recommendation for an Arcadia account.
|
|
149
149
|
|
|
@@ -151,7 +151,7 @@ Parameters:
|
|
|
151
151
|
- `account_address` (string, required): Arcadia account address
|
|
152
152
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
153
153
|
|
|
154
|
-
###
|
|
154
|
+
### read_asset_manager_intents
|
|
155
155
|
|
|
156
156
|
List the automation intents Arcadia supports with the parameters each accepts. Pass `account_address` to also get live per-account availability, including the compatibility rule blocking anything unavailable.
|
|
157
157
|
|
|
@@ -160,7 +160,7 @@ Parameters:
|
|
|
160
160
|
- `position_id` (number, optional): Scope availability to one LP position. Requires account_address
|
|
161
161
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
162
162
|
|
|
163
|
-
###
|
|
163
|
+
### read_asset_manager_current
|
|
164
164
|
|
|
165
165
|
Read which asset managers are enabled on an account, with their decoded on-chain configuration, the intents they map to, Merkl claim state, and any superseded managers that should be cleared.
|
|
166
166
|
|
|
@@ -168,18 +168,27 @@ Parameters:
|
|
|
168
168
|
- `account_address` (string, required): Arcadia account address
|
|
169
169
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
170
170
|
|
|
171
|
-
###
|
|
171
|
+
### read_guides
|
|
172
172
|
|
|
173
173
|
Get Arcadia workflow guides and reference documentation.
|
|
174
174
|
|
|
175
175
|
Parameters:
|
|
176
176
|
- `topic` (enum, optional): overview | automation | strategies | selection
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
### read_account_aero_upgrade
|
|
179
|
+
|
|
180
|
+
Which Arcadia accounts have something to upgrade to Aero (MetadexCL V1): Slipstream V1 to V3 positions (staked or not) and old AERO. Per account: `status` (ready | choices_required | waiting | not_open | nothing_to_upgrade), `positions`, `movable`, `waiting`, `blocked`, `old_aero`. Accounts without a Slipstream position or old AERO are left out. `failed_accounts` lists the accounts whose check failed, with the error: an empty `accounts` list means nothing to do only when `failed_accounts` is empty too. Otherwise those accounts could not be checked, so say so and retry later. No calldata or simulation; call write_account_aero_upgrade for the plan and the transaction.
|
|
181
|
+
|
|
182
|
+
Parameters:
|
|
183
|
+
- `wallet_address` (string): every account of a wallet; pass this or `account_address`
|
|
184
|
+
- `account_address` (string): one account
|
|
185
|
+
- `chain_id` (number, default: 8453): 8453 (Base) or 10 (Optimism); Robinhood (4663) answers an empty list
|
|
186
|
+
|
|
187
|
+
## Write Tools (18)
|
|
179
188
|
|
|
180
189
|
All write tools return unsigned transactions as `{ to, data, value, chainId }`.
|
|
181
190
|
|
|
182
|
-
###
|
|
191
|
+
### write_wallet_approve
|
|
183
192
|
|
|
184
193
|
Build an unsigned approval transaction for ERC20 tokens or ERC721/ERC1155 NFTs.
|
|
185
194
|
|
|
@@ -190,17 +199,26 @@ Parameters:
|
|
|
190
199
|
- `amount` (string, default: "max_uint256"): ERC20 only: amount in raw units
|
|
191
200
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
192
201
|
|
|
193
|
-
###
|
|
202
|
+
### write_wallet_upgrade_velo
|
|
203
|
+
|
|
204
|
+
Upgrade VELO held in a wallet on Optimism to the new AERO on Base: ordered wallet transactions (`transactions[]`) from `owner_address`, an approve when the allowance is short, then depositLiquid on the Velodrome migration with the Hyperlane fee as value. 0.044 new AERO per VELO arrives at the same address on Base. VELO inside an account must be withdrawn first (write_account_withdraw); VELO stays usable, so this is optional. Errors name the contract's reason: `not_open` (with the opening time), `paused`, `budget_exhausted`, `recipient_not_deployed`.
|
|
205
|
+
|
|
206
|
+
Parameters:
|
|
207
|
+
- `owner_address` (string, required): wallet holding the VELO; receives the AERO on Base
|
|
208
|
+
- `amount` (string, optional): raw units (18 decimals); omit for the full balance
|
|
209
|
+
- `chain_id` (number, default: 10): Optimism only
|
|
210
|
+
|
|
211
|
+
### write_pool_deposit
|
|
194
212
|
|
|
195
|
-
Build an unsigned deposit transaction into an Arcadia lending tranche (ERC-4626). Lenders deposit the pool's underlying asset (USDC / WETH / cbBTC) and receive tranche shares that accrue interest from borrowers. Requires prior ERC-20 approval to the tranche via `
|
|
213
|
+
Build an unsigned deposit transaction into an Arcadia lending tranche (ERC-4626). Lenders deposit the pool's underlying asset (USDC / WETH / cbBTC) and receive tranche shares that accrue interest from borrowers. Requires prior ERC-20 approval to the tranche via `write_wallet_approve`.
|
|
196
214
|
|
|
197
215
|
Parameters:
|
|
198
|
-
- `tranche_address` (string, required): Tranche contract address (get from `
|
|
216
|
+
- `tranche_address` (string, required): Tranche contract address (get from `read_pool_list`, each pool's `tranches[0].address`)
|
|
199
217
|
- `assets` (string, required): Amount of underlying asset to deposit in raw units
|
|
200
218
|
- `receiver` (string, required): Address that receives the minted tranche shares
|
|
201
219
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
202
220
|
|
|
203
|
-
###
|
|
221
|
+
### write_pool_redeem
|
|
204
222
|
|
|
205
223
|
Build an unsigned redeem transaction to withdraw from an Arcadia lending tranche (ERC-4626). Burns tranche shares and returns the corresponding amount of underlying asset, including accrued interest. The owner must be the shares holder; receiver is where the underlying is sent.
|
|
206
224
|
|
|
@@ -211,7 +229,7 @@ Parameters:
|
|
|
211
229
|
- `owner` (string, required): Address that owns the tranche shares being burned
|
|
212
230
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
213
231
|
|
|
214
|
-
###
|
|
232
|
+
### write_account_create
|
|
215
233
|
|
|
216
234
|
Build an unsigned transaction to create a new Arcadia account via the Factory contract.
|
|
217
235
|
|
|
@@ -222,7 +240,7 @@ Parameters:
|
|
|
222
240
|
- `creditor` (string, optional): Lending pool address for V3 margin account
|
|
223
241
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
224
242
|
|
|
225
|
-
###
|
|
243
|
+
### write_account_deposit
|
|
226
244
|
|
|
227
245
|
Build an unsigned transaction to deposit assets into an Arcadia account as collateral.
|
|
228
246
|
|
|
@@ -235,7 +253,7 @@ Parameters:
|
|
|
235
253
|
- `account_version` (number, optional): Override account version (auto-detected if omitted)
|
|
236
254
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
237
255
|
|
|
238
|
-
###
|
|
256
|
+
### write_account_withdraw
|
|
239
257
|
|
|
240
258
|
Build an unsigned transaction to withdraw assets from an Arcadia account.
|
|
241
259
|
|
|
@@ -248,7 +266,7 @@ Parameters:
|
|
|
248
266
|
- `account_version` (number, optional): Override account version (auto-detected if omitted)
|
|
249
267
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
250
268
|
|
|
251
|
-
###
|
|
269
|
+
### write_account_borrow
|
|
252
270
|
|
|
253
271
|
Build an unsigned transaction to borrow from an Arcadia lending pool.
|
|
254
272
|
|
|
@@ -259,7 +277,7 @@ Parameters:
|
|
|
259
277
|
- `to` (string, required): Address to receive borrowed tokens
|
|
260
278
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
261
279
|
|
|
262
|
-
###
|
|
280
|
+
### write_account_repay
|
|
263
281
|
|
|
264
282
|
Repay debt to an Arcadia lending pool using tokens from the wallet.
|
|
265
283
|
|
|
@@ -269,7 +287,7 @@ Parameters:
|
|
|
269
287
|
- `amount` (string, required): Amount in raw units, or "max_uint256" to repay all
|
|
270
288
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
271
289
|
|
|
272
|
-
###
|
|
290
|
+
### write_account_add_liquidity
|
|
273
291
|
|
|
274
292
|
Flash-action: atomically deposits from wallet + uses account collateral + swaps to optimal ratio + mints LP + borrows if leveraged, in one transaction.
|
|
275
293
|
|
|
@@ -277,7 +295,7 @@ Parameters:
|
|
|
277
295
|
- `account_address` (string, required): Arcadia account address
|
|
278
296
|
- `wallet_address` (string, required): Wallet address of the account owner
|
|
279
297
|
- `positions` (object[], required): LP positions to mint. Each object:
|
|
280
|
-
- `strategy_id` (number, required): From
|
|
298
|
+
- `strategy_id` (number, required): From read_strategy_list
|
|
281
299
|
- `tick_lower` (number, optional): Lower tick. Omit for full range.
|
|
282
300
|
- `tick_upper` (number, optional): Upper tick. Omit for full range.
|
|
283
301
|
- `deposits` (object[], optional): Wallet tokens to deposit. Each object:
|
|
@@ -289,7 +307,7 @@ Parameters:
|
|
|
289
307
|
- `slippage` (number, default: 100): Basis points, 100 = 1%
|
|
290
308
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
291
309
|
|
|
292
|
-
###
|
|
310
|
+
### write_account_remove_liquidity
|
|
293
311
|
|
|
294
312
|
Flash-action: partially decreases liquidity from an LP position.
|
|
295
313
|
|
|
@@ -300,7 +318,7 @@ Parameters:
|
|
|
300
318
|
- `adjustment` (string, required): Liquidity amount to remove (raw uint128)
|
|
301
319
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
302
320
|
|
|
303
|
-
###
|
|
321
|
+
### write_account_swap
|
|
304
322
|
|
|
305
323
|
Flash-action: swaps assets within an Arcadia account atomically.
|
|
306
324
|
|
|
@@ -312,7 +330,7 @@ Parameters:
|
|
|
312
330
|
- `slippage` (number, default: 100): Basis points, 100 = 1%
|
|
313
331
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
314
332
|
|
|
315
|
-
###
|
|
333
|
+
### write_account_deleverage
|
|
316
334
|
|
|
317
335
|
Flash-action: sells account collateral to the debt token and repays atomically.
|
|
318
336
|
|
|
@@ -325,7 +343,7 @@ Parameters:
|
|
|
325
343
|
- `slippage` (number, default: 100): Basis points, 100 = 1%
|
|
326
344
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
327
345
|
|
|
328
|
-
###
|
|
346
|
+
### write_account_stake
|
|
329
347
|
|
|
330
348
|
Flash-action: stake, unstake, or claim rewards for an LP position.
|
|
331
349
|
|
|
@@ -336,7 +354,26 @@ Parameters:
|
|
|
336
354
|
- `asset_id` (number, required): NFT token ID
|
|
337
355
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
338
356
|
|
|
339
|
-
###
|
|
357
|
+
### write_account_aero_upgrade
|
|
358
|
+
|
|
359
|
+
Upgrade one Arcadia account to Aero (MetadexCL V1) in one flashAction: every Slipstream V1/V2/V3 position (staked or not) moves to the Aero CL pool with the same pair and variant at the same range and tick spacing (when Aero has no pool at that tick spacing, the user picks another one), and every unit of old AERO (loose, in rewards, in an old-AERO pair) becomes the new AERO. Returns the plan (`items[]` with `status` and `reason`, `managers_to_reconnect`, `old_managers_still_needed`, `tenderly_sim_status`) and, when anything can go now, the unsigned `transaction` with its `gas`. The backend decides what moves; report statuses and reasons as given.
|
|
360
|
+
|
|
361
|
+
- `status` ready: sign the transaction. `choices_required`: a position has status `choose` with `options[]` (every Aero pool on its pair with `apy`, `tvl_usd`, `is_new`, `tick_spacing`, `range_widened`, `default`, `disabled_reason`); ask the user to pick one whose `disabled_reason` is null and call again with `choices`, so one transaction moves everything. A `transaction` returned with `choices_required` moves only the ready items: sign it alone only when the user wants to leave the choose positions where they are. `waiting`: see each item's `reason` (for example `pool_not_on_aero`, `target_price_mismatch`, `account_unhealthy`, `exposure_limit`); a waiting item with an option whose `disabled_reason` is null can still move with that pick. `not_open`: the AERO upgrade contract does not accept deposits at the moment.
|
|
362
|
+
- When the transaction's simulation fails, the tool returns an error and no transaction. A plan without a transaction can still show `tenderly_sim_status` failure: the account's health or a lending pool limit refused the move and the items wait on `account_unhealthy` or `exposure_limit`. Report those reasons and do not rebuild.
|
|
363
|
+
- Pass `accounts` (up to 10) instead of `account_address` for one plan per account (`results[]`). `multisends` groups the accounts that got a transaction, in order: a Safe signs one MultiSend per group, each below `max_gas_per_tx`.
|
|
364
|
+
- After it confirms, reconnect `managers_to_reconnect` with write_account_automations (or write_account_automations_delta when `old_managers_still_needed`) and verify with read_account_info.
|
|
365
|
+
|
|
366
|
+
Spot and margin accounts can hold Aero positions, staked or not, on Base, Optimism and Robinhood.
|
|
367
|
+
|
|
368
|
+
Parameters:
|
|
369
|
+
- `account_address` (string): the account to upgrade; pass this or `accounts`
|
|
370
|
+
- `accounts` (string[], 1 to 10): one plan and transaction per account
|
|
371
|
+
- `choices` (object[], optional): `{position_manager, position_id, pool}` per position with status choose, or waiting with a selectable option
|
|
372
|
+
- `slippage` (number, optional, 1 to 1000): price band in bps; default 150, or 500 when the owner is a contract
|
|
373
|
+
- `min_block` (number, optional): block of the transaction you just confirmed, so the plan reads state at or after it
|
|
374
|
+
- `chain_id` (number, default: 8453): 8453 (Base), 10 (Optimism) or 4663 (Robinhood, nothing to upgrade)
|
|
375
|
+
|
|
376
|
+
### write_account_close
|
|
340
377
|
|
|
341
378
|
Atomic flash-action that closes an Arcadia account position in one transaction.
|
|
342
379
|
|
|
@@ -355,7 +392,7 @@ Parameters:
|
|
|
355
392
|
- `slippage` (number, default: 100): Basis points, 100 = 1%
|
|
356
393
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
357
394
|
|
|
358
|
-
###
|
|
395
|
+
### write_account_automations
|
|
359
396
|
|
|
360
397
|
Configure an account's automations from a list of intents and return the unsigned setAssetManagers transaction. The backend resolves which asset managers each intent needs, validates the combination, encodes the metadata and builds the calldata, so you describe the desired outcome rather than the contracts.
|
|
361
398
|
|
|
@@ -373,26 +410,26 @@ Parameters:
|
|
|
373
410
|
- `intents` (object[], required): Complete desired automation state, at least one intent
|
|
374
411
|
- `mode` (enum, default: "save"): save diffs against on-chain state and returns a signable transaction that also disables anything omitted; preview resolves and validates only, returning a plan and no transaction
|
|
375
412
|
- `position_id` (number, optional): LP position id. Supply it and the backend fetches protocol, staked flag, tokens and reward tokens
|
|
376
|
-
- `protocol` (enum, optional): Only needed without position_id. Accepts slipstream_v1 | slipstream_v2 | slipstream_v3 | uniswap_v3 | uniswap_v4, or the dex_protocol spellings (slipstream, staked_slipstream_v3, uniV3, ...) which imply is_staked
|
|
413
|
+
- `protocol` (enum, optional): Only needed without position_id. Accepts slipstream_v1 | slipstream_v2 | slipstream_v3 | uniswap_v3 | uniswap_v4 | metadexcl_v1, or the dex_protocol spellings (slipstream, staked_slipstream_v3, metadexcl_v1, staked_metadexcl_v1, uniV3, ...) which imply is_staked
|
|
377
414
|
- `is_staked` (boolean, optional): Whether the LP position is staked
|
|
378
415
|
- `token0` / `token1` (string, optional): Pool token addresses
|
|
379
416
|
- `reward_tokens` (string[], optional): Staking reward token addresses
|
|
380
417
|
- `owner` (string, optional): Account owner EOA, used to resolve wallet payout targets
|
|
381
418
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
|
|
382
419
|
|
|
383
|
-
###
|
|
420
|
+
### write_account_automations_delta
|
|
384
421
|
|
|
385
422
|
Apply an explicit change to an account's automations and return the unsigned setAssetManagers transaction. A delta, not a full desired state: automations not mentioned are left untouched. Superseded managers still set on the account are force-disabled regardless.
|
|
386
423
|
|
|
387
424
|
Parameters:
|
|
388
425
|
- `account_address` (string, required): Arcadia account address
|
|
389
|
-
- `enable` (object[], default: []): Intents to switch on, same shapes as
|
|
390
|
-
- `disable` (string[], default: []): Asset-manager addresses to switch off, as returned by
|
|
391
|
-
- position context params and `chain_id`: same as
|
|
426
|
+
- `enable` (object[], default: []): Intents to switch on, same shapes as write_account_automations
|
|
427
|
+
- `disable` (string[], default: []): Asset-manager addresses to switch off, as returned by read_asset_manager_current
|
|
428
|
+
- position context params and `chain_id`: same as write_account_automations
|
|
392
429
|
|
|
393
430
|
## Dev Tools (1)
|
|
394
431
|
|
|
395
|
-
###
|
|
432
|
+
### dev_send
|
|
396
433
|
|
|
397
434
|
Sign and broadcast an unsigned transaction using a local private key (PK env var). Dev only.
|
|
398
435
|
|
package/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Arcadia Finance MCP Server
|
|
2
2
|
|
|
3
|
-
> MCP server for Arcadia Finance, a DeFi protocol for concentrated liquidity (Uniswap v3/v4, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Supported chains: Base (8453), Unichain (130), Optimism (10), Robinhood (4663).
|
|
3
|
+
> MCP server for Arcadia Finance, a DeFi protocol for concentrated liquidity (Uniswap v3/v4, Aero CL, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Supported chains: Base (8453), Unichain (130), Optimism (10), Robinhood (4663).
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 38 tools:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -24,51 +24,54 @@ npx -y @arcadia-finance/mcp-server
|
|
|
24
24
|
|
|
25
25
|
Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
26
26
|
|
|
27
|
-
## Tools (
|
|
28
|
-
|
|
29
|
-
### Read (
|
|
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
|
-
-
|
|
27
|
+
## Tools (38 total)
|
|
28
|
+
|
|
29
|
+
### Read (19)
|
|
30
|
+
|
|
31
|
+
- read_account_info: account overview with health factor, collateral, debt, positions, liquidation price, automation status
|
|
32
|
+
- read_account_history: historical account value over time
|
|
33
|
+
- read_account_pnl: PnL and yield data for an account
|
|
34
|
+
- read_wallet_accounts: list all Arcadia accounts owned by a wallet
|
|
35
|
+
- read_wallet_balances: ERC20 and native ETH balances for a wallet
|
|
36
|
+
- read_wallet_allowances: check ERC20 token allowances for a spender
|
|
37
|
+
- read_wallet_points: Arcadia points balance for a wallet
|
|
38
|
+
- read_asset_list: supported collateral assets with addresses, types, decimals
|
|
39
|
+
- read_asset_prices: USD prices for asset addresses
|
|
40
|
+
- read_pool_list: all lending pools with TVL, APY, utilization, liquidity
|
|
41
|
+
- read_pool_info: single pool detail with APY history
|
|
42
|
+
- read_point_leaderboard: paginated points leaderboard
|
|
43
|
+
- read_strategy_list: LP strategies with APY, underlyings, pool info
|
|
44
|
+
- read_strategy_info: full detail for a specific LP strategy
|
|
45
|
+
- read_strategy_recommendation: rebalancing recommendation for an account
|
|
46
|
+
- read_guides: reference guides for automation, strategies, addresses
|
|
47
|
+
- read_asset_manager_intents: automation intents and their params; pass account_address for live per-account availability
|
|
48
|
+
- read_asset_manager_current: automations enabled on an account, with decoded per-manager config, mapped intents, Merkl state, and superseded managers
|
|
49
|
+
- read_account_aero_upgrade: what a wallet's accounts (or one account) have to upgrade to Aero, per account status and counts, no calldata
|
|
50
|
+
|
|
51
|
+
### Write (18)
|
|
52
|
+
|
|
53
|
+
- write_wallet_approve: approve ERC20/ERC721 for spending
|
|
54
|
+
- write_wallet_upgrade_velo: upgrade wallet VELO on Optimism to the new AERO on Base
|
|
55
|
+
- write_pool_deposit: deposit the pool's underlying asset into an ERC-4626 tranche to earn lender yield
|
|
56
|
+
- write_pool_redeem: burn tranche shares and redeem the underlying asset (lender exit)
|
|
57
|
+
- write_account_create: create a new Arcadia account
|
|
58
|
+
- write_account_deposit: deposit assets into an account
|
|
59
|
+
- write_account_withdraw: withdraw assets from an account
|
|
60
|
+
- write_account_borrow: borrow from a lending pool
|
|
61
|
+
- write_account_repay: repay debt from wallet tokens
|
|
62
|
+
- write_account_add_liquidity: flash-action that deposits, swaps, mints LP, and optionally leverages atomically
|
|
63
|
+
- write_account_remove_liquidity: partially decrease LP position liquidity
|
|
64
|
+
- write_account_swap: swap assets within an account
|
|
65
|
+
- write_account_deleverage: repay debt by selling collateral
|
|
66
|
+
- write_account_close: atomic close that burns LP, swaps, and repays in one tx
|
|
67
|
+
- write_account_stake: stake, unstake, or claim LP rewards
|
|
68
|
+
- write_account_aero_upgrade: upgrade an account to Aero in one flashAction: Slipstream positions move to Aero CL, old AERO becomes the new AERO; returns the plan and the transaction for the items that are ready
|
|
69
|
+
- write_account_automations: configure automations from an intents array (complete desired state), returns the unsigned setAssetManagers tx
|
|
70
|
+
- write_account_automations_delta: switch individual automations on or off, leaving the rest untouched
|
|
68
71
|
|
|
69
72
|
### Dev (1)
|
|
70
73
|
|
|
71
|
-
-
|
|
74
|
+
- dev_send: sign and broadcast using local private key (dev only)
|
|
72
75
|
|
|
73
76
|
## Links
|
|
74
77
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcadia-finance/mcp-server",
|
|
3
3
|
"mcpName": "io.github.arcadia-finance/mcp-server",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"description": "MCP server for Arcadia Finance. Deploy concentrated liquidity on Uniswap, Aerodrome
|
|
4
|
+
"version": "0.6.0",
|
|
5
|
+
"description": "MCP server for Arcadia Finance. Deploy concentrated liquidity on Uniswap/Aero, Aerodrome and Velodrome with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Base, Optimism, Unichain and Robinhood.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "AGPL-3.0",
|
|
8
8
|
"packageManager": "yarn@4.13.0",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"clamm",
|
|
23
23
|
"liquidity",
|
|
24
24
|
"uniswap",
|
|
25
|
+
"aero",
|
|
25
26
|
"aerodrome",
|
|
26
27
|
"slipstream",
|
|
27
28
|
"base",
|
|
@@ -66,14 +67,17 @@
|
|
|
66
67
|
"access": "public"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
|
-
"@modelcontextprotocol/
|
|
70
|
+
"@modelcontextprotocol/node": "^2.1.1",
|
|
71
|
+
"@modelcontextprotocol/server": "^2.3.1",
|
|
70
72
|
"express": "^5.2.1",
|
|
71
73
|
"express-rate-limit": "^8.3.1",
|
|
74
|
+
"posthog-node": "5.56.3",
|
|
72
75
|
"viem": "^2.0.0",
|
|
73
|
-
"zod": "^
|
|
76
|
+
"zod": "^4.2.0"
|
|
74
77
|
},
|
|
75
78
|
"devDependencies": {
|
|
76
79
|
"@eslint/js": "^9.0.0",
|
|
80
|
+
"@modelcontextprotocol/client": "^2.3.1",
|
|
77
81
|
"@types/express": "^5.0.6",
|
|
78
82
|
"@types/node": "^22.0.0",
|
|
79
83
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
package/server.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.arcadia-finance/mcp-server",
|
|
4
4
|
"title": "Arcadia Finance",
|
|
5
|
-
"description": "Concentrated liquidity on Uniswap/
|
|
6
|
-
"version": "0.
|
|
5
|
+
"description": "Concentrated liquidity on Uniswap/Aero (rebalance, compound, leverage) or single-sided lending.",
|
|
6
|
+
"version": "0.6.0",
|
|
7
7
|
"websiteUrl": "https://arcadia.finance",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/arcadia-finance/mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@arcadia-finance/mcp-server",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.6.0",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"name": "RATE_LIMIT_RPM",
|
|
71
|
-
"description": "Max requests per minute per
|
|
71
|
+
"description": "Max requests per minute per client IP (default 600). Only used when TRANSPORT=http.",
|
|
72
72
|
"isRequired": false,
|
|
73
73
|
"isSecret": false
|
|
74
74
|
}
|