@arcadia-finance/mcp-server 0.3.4 → 0.3.5

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.
Files changed (38) hide show
  1. package/README.md +2 -1
  2. package/dist/config/addresses.js +55 -3
  3. package/dist/config/chains.js +10 -2
  4. package/dist/tools/dev/send.js +4 -2
  5. package/dist/tools/read/account.js +5 -4
  6. package/dist/tools/read/asset-managers.js +9 -2
  7. package/dist/tools/read/assets.js +3 -2
  8. package/dist/tools/read/pools.js +3 -2
  9. package/dist/tools/read/strategy.js +27 -5
  10. package/dist/tools/read/wallet.js +4 -3
  11. package/dist/tools/write/account/add-liquidity.js +2 -1
  12. package/dist/tools/write/account/borrow.js +2 -1
  13. package/dist/tools/write/account/close.js +2 -1
  14. package/dist/tools/write/account/create.js +2 -1
  15. package/dist/tools/write/account/deleverage.js +2 -1
  16. package/dist/tools/write/account/deposit.js +2 -1
  17. package/dist/tools/write/account/remove-liquidity.js +2 -1
  18. package/dist/tools/write/account/repay.js +2 -1
  19. package/dist/tools/write/account/stake.js +2 -1
  20. package/dist/tools/write/account/swap.js +2 -1
  21. package/dist/tools/write/account/withdraw.js +2 -1
  22. package/dist/tools/write/asset-managers/compounder.js +6 -4
  23. package/dist/tools/write/asset-managers/merkl-operator.js +2 -1
  24. package/dist/tools/write/asset-managers/rebalancer.js +2 -1
  25. package/dist/tools/write/asset-managers/set-asset-managers.js +2 -1
  26. package/dist/tools/write/asset-managers/shared.js +4 -0
  27. package/dist/tools/write/asset-managers/yield-claimer.js +6 -4
  28. package/dist/tools/write/wallet/approve.js +2 -1
  29. package/dist/utils/validation.js +2 -2
  30. package/llms-full.txt +34 -34
  31. package/llms.txt +1 -1
  32. package/package.json +2 -2
  33. package/server.json +9 -3
  34. package/skills/clamm-liquidity/SKILL.md +30 -3
  35. package/skills/openclaw/SKILL.md +30 -22
  36. package/skills/openclaw/arcadia.sh +101 -0
  37. package/skills/openclaw/contracts.md +20 -2
  38. package/skills/openclaw/arcadia.mjs +0 -49
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { encodeFunctionData } from "viem";
3
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
3
4
  import { accountAbi, getAccountAbi } from "../../../abis/index.js";
4
5
  import { getPublicClient } from "../../../clients/chain.js";
5
6
  import { appendDataSuffix } from "../../../utils/attribution.js";
@@ -32,7 +33,7 @@ export function registerWithdrawTool(server, chains) {
32
33
  .number()
33
34
  .optional()
34
35
  .describe("Override account version (3 or 4). Auto-detected on-chain if omitted."),
35
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
36
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
36
37
  },
37
38
  }, async (params) => {
38
39
  try {
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
2
3
  import { getAmProtocolAddress, getStandaloneAmAddress } from "../../../config/addresses.js";
3
4
  import { validateAddress, validateChainId } from "../../../utils/validation.js";
4
5
  import { COMPOUNDER_INITIATOR, COWSWAPPER_INITIATOR, encodeCompounderCallbackData, encodeCompounderCoupledCallbackData, encodeCowSwapTokenMetadata, disabledIntent, } from "./encoding.js";
@@ -18,7 +19,7 @@ export function registerCompounderTools(server, _chains) {
18
19
  inputSchema: {
19
20
  dex_protocol: DEX_PROTOCOL_SCHEMA,
20
21
  enabled: z.boolean().default(true).describe("True to enable, false to disable"),
21
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
22
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
22
23
  },
23
24
  }, async (params) => {
24
25
  try {
@@ -67,7 +68,7 @@ export function registerCompounderTools(server, _chains) {
67
68
  .string()
68
69
  .describe("Token address to buy — should be a major token in the pair (USDC, WETH, cbBTC)"),
69
70
  enabled: z.boolean().default(true).describe("True to enable, false to disable"),
70
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
71
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
71
72
  },
72
73
  }, async (params) => {
73
74
  try {
@@ -77,8 +78,9 @@ export function registerCompounderTools(server, _chains) {
77
78
  try {
78
79
  cowSwapperAddress = getStandaloneAmAddress(validChainId, "cowSwapper");
79
80
  }
80
- catch {
81
- throw new Error(`compounder_staked is not available on chain ${validChainId} because it requires cow_swapper, which is Base-only (8453).`);
81
+ catch (err) {
82
+ const reason = err instanceof Error ? err.message : String(err);
83
+ throw new Error(`compounder_staked requires cow_swapper. ${reason}`);
82
84
  }
83
85
  const compounderAddress = getAmProtocolAddress(validChainId, "compounders", amKey);
84
86
  if (!params.enabled) {
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
2
3
  import { getStandaloneAmAddress } from "../../../config/addresses.js";
3
4
  import { validateAddress, validateChainId } from "../../../utils/validation.js";
4
5
  import { MERKL_INITIATOR, encodeMerklOperatorCallbackData, disabledIntent } from "./encoding.js";
@@ -18,7 +19,7 @@ export function registerMerklOperatorTool(server, _chains) {
18
19
  inputSchema: {
19
20
  reward_recipient: z.string().describe("Address to receive Merkl rewards"),
20
21
  enabled: z.boolean().default(true).describe("True to enable, false to disable"),
21
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
22
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
22
23
  },
23
24
  }, async (params) => {
24
25
  try {
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
2
3
  import { MINIMAL_STRATEGY_HOOK, getAmProtocolAddress } from "../../../config/addresses.js";
3
4
  import { validateAddress, validateChainId } from "../../../utils/validation.js";
4
5
  import { REBALANCER_INITIATOR, encodeRebalancerMetadata, encodeRebalancerCallbackData, disabledIntent, DEFAULT_REBALANCER_PARAMS, } from "./encoding.js";
@@ -53,7 +54,7 @@ export function registerRebalancerTool(server, _chains) {
53
54
  .string()
54
55
  .optional()
55
56
  .describe("Strategy hook address. Defaults to minimal hook. Only override for custom hooks."),
56
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
57
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
57
58
  },
58
59
  }, async (params) => {
59
60
  try {
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { encodeFunctionData } from "viem";
3
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
3
4
  import { accountAbi } from "../../../abis/index.js";
4
5
  import { SimpleTransactionOutput } from "../../output-schemas.js";
5
6
  import { appendDataSuffix } from "../../../utils/attribution.js";
@@ -22,7 +23,7 @@ export function registerSetAssetManagersTool(server, _chains) {
22
23
  datas: z
23
24
  .array(z.string())
24
25
  .describe("Encoded callback data from intent tools (hex strings)"),
25
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
26
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
26
27
  },
27
28
  }, async (params) => {
28
29
  try {
@@ -2,8 +2,10 @@ import { z } from "zod";
2
2
  const PROTOCOL_TO_AM_KEY = {
3
3
  slipstream: "slipstreamV1",
4
4
  slipstream_v2: "slipstreamV2",
5
+ slipstream_v3: "slipstreamV3",
5
6
  staked_slipstream: "slipstreamV1",
6
7
  staked_slipstream_v2: "slipstreamV2",
8
+ staked_slipstream_v3: "slipstreamV3",
7
9
  uniV3: "uniV3",
8
10
  uniV4: "uniV4",
9
11
  };
@@ -14,8 +16,10 @@ export const DEX_PROTOCOL_SCHEMA = z
14
16
  .enum([
15
17
  "slipstream",
16
18
  "slipstream_v2",
19
+ "slipstream_v3",
17
20
  "staked_slipstream",
18
21
  "staked_slipstream_v2",
22
+ "staked_slipstream_v3",
19
23
  "uniV3",
20
24
  "uniV4",
21
25
  ])
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
2
3
  import { getAmProtocolAddress, getStandaloneAmAddress } from "../../../config/addresses.js";
3
4
  import { validateAddress, validateChainId } from "../../../utils/validation.js";
4
5
  import { CLAIMER_INITIATOR, COWSWAPPER_INITIATOR, encodeYieldClaimerCallbackData, encodeYieldClaimerCoupledCallbackData, encodeCowSwapTokenMetadata, disabledIntent, } from "./encoding.js";
@@ -21,7 +22,7 @@ export function registerYieldClaimerTools(server, _chains) {
21
22
  .string()
22
23
  .describe("Address to receive claimed fees (wallet address or any destination)"),
23
24
  enabled: z.boolean().default(true).describe("True to enable, false to disable"),
24
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
25
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
25
26
  },
26
27
  }, async (params) => {
27
28
  try {
@@ -70,7 +71,7 @@ export function registerYieldClaimerTools(server, _chains) {
70
71
  buy_token: z.string().describe("Token address to receive after swap"),
71
72
  fee_recipient: z.string().describe("Address to receive claimed fees"),
72
73
  enabled: z.boolean().default(true).describe("True to enable, false to disable"),
73
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
74
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
74
75
  },
75
76
  }, async (params) => {
76
77
  try {
@@ -80,8 +81,9 @@ export function registerYieldClaimerTools(server, _chains) {
80
81
  try {
81
82
  cowSwapperAddress = getStandaloneAmAddress(validChainId, "cowSwapper");
82
83
  }
83
- catch {
84
- throw new Error(`yield_claimer_cowswap is not available on chain ${validChainId} because it requires cow_swapper, which is Base-only (8453).`);
84
+ catch (err) {
85
+ const reason = err instanceof Error ? err.message : String(err);
86
+ throw new Error(`yield_claimer_cowswap requires cow_swapper. ${reason}`);
85
87
  }
86
88
  const yieldClaimerAddress = getAmProtocolAddress(validChainId, "yieldClaimers", amKey);
87
89
  if (!params.enabled) {
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { encodeFunctionData } from "viem";
3
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
3
4
  import { erc20Abi, nftmanagerAbi } from "../../../abis/index.js";
4
5
  import { appendDataSuffix } from "../../../utils/attribution.js";
5
6
  import { validateAddress } from "../../../utils/validation.js";
@@ -29,7 +30,7 @@ export function registerApproveTool(server, _chains) {
29
30
  .string()
30
31
  .default("max_uint256")
31
32
  .describe("ERC20 only: amount in raw units, or 'max_uint256' for unlimited. Ignored for NFTs."),
32
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
33
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
33
34
  },
34
35
  }, async (params) => {
35
36
  try {
@@ -1,4 +1,4 @@
1
- import { SUPPORTED_CHAIN_IDS } from "../config/chains.js";
1
+ import { SUPPORTED_CHAIN_IDS, SUPPORTED_CHAINS_ERROR } from "../config/chains.js";
2
2
  export function isValidAddress(address) {
3
3
  return /^0x[0-9a-fA-F]{40}$/.test(address);
4
4
  }
@@ -10,7 +10,7 @@ export function validateAddress(address, label = "address") {
10
10
  }
11
11
  export function validateChainId(chainId) {
12
12
  if (!SUPPORTED_CHAIN_IDS.includes(chainId)) {
13
- throw new Error(`Unsupported chain_id: ${chainId}. Supported chains: Base (8453) and Unichain (130).`);
13
+ throw new Error(`Unsupported chain_id: ${chainId}. ${SUPPORTED_CHAINS_ERROR}.`);
14
14
  }
15
15
  return chainId;
16
16
  }
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Arcadia Finance MCP Server
2
2
 
3
- > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130).
3
+ > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
4
4
 
5
5
  ## Overview
6
6
 
@@ -31,7 +31,7 @@ Get full overview of an Arcadia account: health factor, collateral value, debt,
31
31
 
32
32
  Parameters:
33
33
  - `account_address` (string, required): Arcadia account address
34
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
34
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
35
35
 
36
36
  ### read.account.history
37
37
 
@@ -40,7 +40,7 @@ Get historical collateral and debt values for an Arcadia account over time.
40
40
  Parameters:
41
41
  - `account_address` (string, required): Arcadia account address
42
42
  - `days` (number, default: 14): Number of days of history
43
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
43
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
44
44
 
45
45
  ### read.account.pnl
46
46
 
@@ -48,7 +48,7 @@ Get PnL (cost basis) and yield earned for an Arcadia account.
48
48
 
49
49
  Parameters:
50
50
  - `account_address` (string, required): Arcadia account address
51
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
51
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
52
52
 
53
53
  ### read.wallet.balances
54
54
 
@@ -57,7 +57,7 @@ Get native ETH and ERC20 token balances for a wallet address.
57
57
  Parameters:
58
58
  - `wallet_address` (string, required): Wallet address to check balances for
59
59
  - `token_addresses` (string[], required): ERC20 token contract addresses to check
60
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
60
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
61
61
 
62
62
  ### read.wallet.allowances
63
63
 
@@ -67,7 +67,7 @@ Parameters:
67
67
  - `owner_address` (string, required): Token owner address (the wallet granting approval)
68
68
  - `spender_address` (string, required): Spender address to check allowance for
69
69
  - `token_addresses` (string[], required): ERC20 token contract addresses to check
70
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
70
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
71
71
 
72
72
  ### read.wallet.accounts
73
73
 
@@ -75,7 +75,7 @@ List all Arcadia accounts owned by a wallet address.
75
75
 
76
76
  Parameters:
77
77
  - `wallet_address` (string, required): Wallet address to list accounts for
78
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
78
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
79
79
 
80
80
  ### read.wallet.points
81
81
 
@@ -90,7 +90,7 @@ List supported collateral assets on Arcadia.
90
90
 
91
91
  Parameters:
92
92
  - `search` (string, optional): Filter assets by symbol (case-insensitive substring match)
93
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
93
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
94
94
 
95
95
  ### read.asset.prices
96
96
 
@@ -98,14 +98,14 @@ Get USD prices for one or more asset addresses.
98
98
 
99
99
  Parameters:
100
100
  - `asset_addresses` (string, required): Single address or comma-separated addresses
101
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
101
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
102
102
 
103
103
  ### read.pool.list
104
104
 
105
105
  List all Arcadia lending pools: TVL, utilization, available liquidity.
106
106
 
107
107
  Parameters:
108
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
108
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
109
109
 
110
110
  ### read.pool.info
111
111
 
@@ -114,7 +114,7 @@ Get detailed info for a single lending pool including APY history over time.
114
114
  Parameters:
115
115
  - `pool_address` (string, required): Pool address
116
116
  - `days` (number, default: 14): Number of days of APY history
117
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
117
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
118
118
 
119
119
  ### read.point_leaderboard
120
120
 
@@ -132,7 +132,7 @@ Parameters:
132
132
  - `featured_only` (boolean, default: false): Return only featured/curated strategies
133
133
  - `limit` (number, default: 25): Max strategies to return
134
134
  - `offset` (number, default: 0): Skip first N strategies for pagination
135
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
135
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
136
136
 
137
137
  ### read.strategy.info
138
138
 
@@ -140,7 +140,7 @@ Get full detail for a specific LP strategy by ID.
140
140
 
141
141
  Parameters:
142
142
  - `strategy_id` (number, required): Strategy ID
143
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
143
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
144
144
 
145
145
  ### read.strategy.recommendation
146
146
 
@@ -148,7 +148,7 @@ Get a rebalancing recommendation for an Arcadia account.
148
148
 
149
149
  Parameters:
150
150
  - `account_address` (string, required): Arcadia account address
151
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
151
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
152
152
 
153
153
  ### read.asset_manager.intents
154
154
 
@@ -177,7 +177,7 @@ Parameters:
177
177
  - `spender_address` (string, required): Address being approved
178
178
  - `asset_type` (enum, default: "erc20"): erc20 | erc721 | erc1155
179
179
  - `amount` (string, default: "max_uint256"): ERC20 only: amount in raw units
180
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
180
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
181
181
 
182
182
  ### write.account.create
183
183
 
@@ -188,7 +188,7 @@ Parameters:
188
188
  - `wallet_address` (string, required): Wallet address that will send the transaction
189
189
  - `account_version` (number, default: 0): 0 = latest (V4 spot), 3 = margin (can borrow)
190
190
  - `creditor` (string, optional): Lending pool address for V3 margin account
191
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
191
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
192
192
 
193
193
  ### write.account.deposit
194
194
 
@@ -201,7 +201,7 @@ Parameters:
201
201
  - `asset_ids` (number[], optional): Token IDs: 0 for ERC20, NFT token ID for ERC721
202
202
  - `asset_types` (number[], optional): V4 only. 1=ERC20, 2=ERC721, 3=ERC1155
203
203
  - `account_version` (number, optional): Override account version (auto-detected if omitted)
204
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
204
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
205
205
 
206
206
  ### write.account.withdraw
207
207
 
@@ -214,7 +214,7 @@ Parameters:
214
214
  - `asset_ids` (number[], optional): Token IDs: 0 for ERC20, NFT token ID for ERC721
215
215
  - `asset_types` (number[], optional): V4 only. 1=ERC20, 2=ERC721, 3=ERC1155
216
216
  - `account_version` (number, optional): Override account version (auto-detected if omitted)
217
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
217
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
218
218
 
219
219
  ### write.account.borrow
220
220
 
@@ -225,7 +225,7 @@ Parameters:
225
225
  - `account_address` (string, required): Arcadia account address used as collateral
226
226
  - `amount` (string, required): Amount in raw units
227
227
  - `to` (string, required): Address to receive borrowed tokens
228
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
228
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
229
229
 
230
230
  ### write.account.repay
231
231
 
@@ -235,7 +235,7 @@ Parameters:
235
235
  - `pool_address` (string, required): Lending pool address
236
236
  - `account_address` (string, required): Arcadia account address with debt
237
237
  - `amount` (string, required): Amount in raw units, or "max_uint256" to repay all
238
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
238
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
239
239
 
240
240
  ### write.account.add_liquidity
241
241
 
@@ -255,7 +255,7 @@ Parameters:
255
255
  - `use_account_assets` (boolean, default: false): Use all existing account collateral
256
256
  - `leverage` (number, default: 0): 0 = no borrow, 2 = 2x leverage
257
257
  - `slippage` (number, default: 100): Basis points, 100 = 1%
258
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
258
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
259
259
 
260
260
  ### write.account.remove_liquidity
261
261
 
@@ -266,7 +266,7 @@ Parameters:
266
266
  - `asset_address` (string, required): Position manager contract
267
267
  - `asset_id` (number, required): NFT token ID
268
268
  - `adjustment` (string, required): Liquidity amount to remove (raw uint128)
269
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
269
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
270
270
 
271
271
  ### write.account.swap
272
272
 
@@ -278,7 +278,7 @@ Parameters:
278
278
  - `asset_to` (string, required): Token address to swap to
279
279
  - `amount_in` (string, required): Raw units
280
280
  - `slippage` (number, default: 100): Basis points, 100 = 1%
281
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
281
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
282
282
 
283
283
  ### write.account.deleverage
284
284
 
@@ -291,7 +291,7 @@ Parameters:
291
291
  - `numeraire` (string, required): Debt token address
292
292
  - `creditor` (string, required): Lending pool address
293
293
  - `slippage` (number, default: 100): Basis points, 100 = 1%
294
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
294
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
295
295
 
296
296
  ### write.account.stake
297
297
 
@@ -302,7 +302,7 @@ Parameters:
302
302
  - `action` (enum, required): stake | unstake | claim
303
303
  - `asset_address` (string, required): Position manager contract address
304
304
  - `asset_id` (number, required): NFT token ID
305
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
305
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
306
306
 
307
307
  ### write.account.close
308
308
 
@@ -321,7 +321,7 @@ Parameters:
321
321
  - `distribution` (number, optional): Fraction of proceeds (0-1)
322
322
  - `close_lp_only` (boolean, default: false): true = only burn LP, false = full close
323
323
  - `slippage` (number, default: 100): Basis points, 100 = 1%
324
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
324
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
325
325
 
326
326
  ### write.account.set_asset_managers
327
327
 
@@ -332,7 +332,7 @@ Parameters:
332
332
  - `asset_managers` (string[], required): Asset manager addresses from intent tools
333
333
  - `statuses` (boolean[], required): Enable/disable flags from intent tools
334
334
  - `datas` (string[], required): Encoded callback data from intent tools (hex)
335
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
335
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
336
336
 
337
337
  ### write.asset_manager.rebalancer
338
338
 
@@ -348,7 +348,7 @@ Parameters:
348
348
  - `min_rebalance_time` (number, default: 3600): Min seconds between rebalances
349
349
  - `max_rebalance_time` (number, default: 1e12): Max seconds before forced rebalance
350
350
  - `strategy_hook` (string, optional): Custom strategy hook address
351
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
351
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
352
352
 
353
353
  ### write.asset_manager.compounder
354
354
 
@@ -357,7 +357,7 @@ Encode args for the standalone compounder automation.
357
357
  Parameters:
358
358
  - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
359
359
  - `enabled` (boolean, default: true): Enable or disable
360
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
360
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
361
361
 
362
362
  ### write.asset_manager.compounder_staked
363
363
 
@@ -368,7 +368,7 @@ Parameters:
368
368
  - `sell_tokens` (string[], required): Token addresses to sell via CowSwap
369
369
  - `buy_token` (string, required): Token address to buy (USDC, WETH, cbBTC)
370
370
  - `enabled` (boolean, default: true): Enable or disable
371
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
371
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
372
372
 
373
373
  ### write.asset_manager.yield_claimer
374
374
 
@@ -378,7 +378,7 @@ Parameters:
378
378
  - `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
379
379
  - `fee_recipient` (string, required): Address to receive claimed fees
380
380
  - `enabled` (boolean, default: true): Enable or disable
381
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
381
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
382
382
 
383
383
  ### write.asset_manager.yield_claimer_cowswap
384
384
 
@@ -390,7 +390,7 @@ Parameters:
390
390
  - `buy_token` (string, required): Token address to receive after swap
391
391
  - `fee_recipient` (string, required): Address to receive claimed fees
392
392
  - `enabled` (boolean, default: true): Enable or disable
393
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
393
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
394
394
 
395
395
  ### write.asset_manager.cow_swapper
396
396
 
@@ -407,7 +407,7 @@ Encode args for the Merkl operator automation.
407
407
  Parameters:
408
408
  - `reward_recipient` (string, required): Address to receive Merkl rewards
409
409
  - `enabled` (boolean, default: true): Enable or disable
410
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
410
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
411
411
 
412
412
  ## Dev Tools (1)
413
413
 
@@ -419,7 +419,7 @@ Parameters:
419
419
  - `to` (string, required): Target contract address
420
420
  - `data` (string, required): Encoded calldata (hex)
421
421
  - `value` (string, default: "0"): Value in wei
422
- - `chain_id` (number, default: 8453): Chain ID: 8453 (Base) or 130 (Unichain)
422
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
423
423
 
424
424
  ## Links
425
425
 
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Arcadia Finance MCP Server
2
2
 
3
- > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130).
3
+ > MCP server for Arcadia Finance, a DeFi protocol for managing concentrated liquidity positions (Uniswap v3/v4, Aerodrome/Slipstream, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
4
4
 
5
5
  ## Overview
6
6
 
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.3.4",
5
- "description": "MCP server for Arcadia Finance. Manage concentrated liquidity positions on Uniswap and Aerodrome with automated rebalancing, compounding, yield optimization, and leverage. Base and Unichain.",
4
+ "version": "0.3.5",
5
+ "description": "MCP server for Arcadia Finance. Manage concentrated liquidity positions on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and leverage. Base, Unichain, and Optimism.",
6
6
  "type": "module",
7
7
  "license": "AGPL-3.0",
8
8
  "packageManager": "yarn@4.13.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": "Manage concentrated liquidity positions on Uniswap and Aerodrome with automated rebalancing, compounding, yield optimization, and leverage.",
6
- "version": "0.3.4",
5
+ "description": "Manage concentrated liquidity on Uniswap and Aerodrome with rebalancing, compounding, and leverage.",
6
+ "version": "0.3.5",
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.3.4",
16
+ "version": "0.3.5",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -30,6 +30,12 @@
30
30
  "isRequired": false,
31
31
  "isSecret": true
32
32
  },
33
+ {
34
+ "name": "RPC_URL_OPTIMISM",
35
+ "description": "RPC URL for Optimism (10). Falls back to public RPC if not set.",
36
+ "isRequired": false,
37
+ "isSecret": true
38
+ },
33
39
  {
34
40
  "name": "PK",
35
41
  "description": "Private key for dev-only signing (not for production).",
@@ -20,7 +20,7 @@ Arcadia is a platform for managing concentrated liquidity positions with automat
20
20
  Write tools (`write.*`) return unsigned transaction calldata. This server does NOT sign or broadcast. After receiving a transaction object, you must:
21
21
 
22
22
  1. **Sign** the transaction with the account owner's private key or wallet
23
- 2. **Broadcast** it to the appropriate chain (Base 8453 or Unichain 130)
23
+ 2. **Broadcast** it to the appropriate chain (Base 8453, Unichain 130, or Optimism 10)
24
24
  3. **Wait** for the transaction receipt to confirm success
25
25
 
26
26
  How you sign depends on your setup:
@@ -140,21 +140,48 @@ Addresses are auto-resolved by `write.asset_manager.*` intent tools based on `de
140
140
  | -------------- | ------------- | -------------------------------------------- |
141
141
  | Rebalancer | Slipstream V1 | `0x5802454749cc0c4A6F28D5001B4cD84432e2b79F` |
142
142
  | Rebalancer | Slipstream V2 | `0x953Ff365d0b562ceC658dc46B394E9282338d9Ea` |
143
+ | Rebalancer | Slipstream V3 | `0x37c6258aEe125d520B6f03fc2cb490955050D557` |
143
144
  | Rebalancer | Uniswap V3 | `0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd` |
144
145
  | Rebalancer | Uniswap V4 | `0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0` |
145
146
  | Compounder | Slipstream V1 | `0x467837f44A71e3eAB90AEcfC995c84DC6B3cfCF7` |
146
147
  | Compounder | Slipstream V2 | `0x35e59448C7145482E56212510cC689612AB4F61f` |
148
+ | Compounder | Slipstream V3 | `0xd42A3Ac56456bD5422835B36C35Cacb6448ddCd9` |
147
149
  | Compounder | Uniswap V3 | `0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3` |
148
150
  | Compounder | Uniswap V4 | `0xAA95c9c402b195D8690eCaea2341a76e3266B189` |
149
151
  | Yield Claimer | Slipstream V1 | `0x5a8278D37b7a787574b6Aa7E18d8C02D994f18Ba` |
150
152
  | Yield Claimer | Slipstream V2 | `0xc8bF4B2c740FF665864E9494832520f18822871C` |
153
+ | Yield Claimer | Slipstream V3 | `0x8c1Fbf38118fD5A704b6E7babcB7AF1a9A291980` |
151
154
  | Yield Claimer | Uniswap V3 | `0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16` |
152
155
  | Yield Claimer | Uniswap V4 | `0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4` |
153
156
  | Merkl Operator | All | `0x969F0251360b9Cf11c68f6Ce9587924c1B8b42C6` |
154
- | CoW Swapper | All | `0xc928013A219EC9F18dE7B2dee6A50Ba626811854` |
157
+ | CoW Swapper | Base only | `0xc928013A219EC9F18dE7B2dee6A50Ba626811854` |
155
158
  | Gas Relayer | All | `0xD938C8d04cF91094fecAF0A2018EAac483a40137` |
156
159
 
157
- **Slipstream V1 vs V2:** The pool determines the version — some pools are V1, some are V2. `read.account.info` now returns a `dex_protocol` field on LP positions (derived from the position manager address), so you can read the protocol directly from the account overview. Pass this value as `dex_protocol` to `write.asset_manager.*` intent tools to auto-resolve the correct AM address.
160
+ Slipstream V3 addresses above are Base-only. Unichain and Optimism have Slipstream V1 only (no V2/V3 position manager deployed).
161
+
162
+ **Slipstream V1 vs V2 vs V3:** The pool determines the version — each pool is bound to a specific Slipstream version. `read.account.info` returns a `dex_protocol` field on LP positions (derived from the position manager address), so you can read the protocol directly from the account overview. Pass this value (`slipstream`, `slipstream_v2`, `slipstream_v3`, or their `staked_*` variants) as `dex_protocol` to `write.asset_manager.*` intent tools to auto-resolve the correct AM address.
163
+
164
+ ## Token, Contract, and Lending Pool Addresses (Optimism 10)
165
+
166
+ On Optimism, only Slipstream V1 (Velodrome), Uniswap V3, and Uniswap V4 are supported. No cbBTC pool, no CoW Swap.
167
+
168
+ | Token | Address | Decimals |
169
+ | ------ | -------------------------------------------- | -------- |
170
+ | WETH | `0x4200000000000000000000000000000000000006` | 18 |
171
+ | USDC | `0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85` | 6 |
172
+ | OP | `0x4200000000000000000000000000000000000042` | 18 |
173
+ | VELO | `0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db` | 18 |
174
+ | WBTC | `0x68f180fcCe6836688e9084f035309E29Bf0A2095` | 8 |
175
+ | wstETH | `0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb` | 18 |
176
+
177
+ Lending pools (same CREATE2 addresses as Base):
178
+
179
+ | Asset | Pool Address |
180
+ | ----- | -------------------------------------------- |
181
+ | WETH | `0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2` |
182
+ | USDC | `0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1` |
183
+
184
+ Available automations on Optimism: rebalancer, compounder, yield_claimer, merkl_operator. `cow_swapper`, `compounder_staked`, and `yield_claimer_cowswap` are Base-only (CoW Swap is not deployed on Optimism).
158
185
 
159
186
  ## Account Versions
160
187