@arcadia-finance/mcp-server 0.3.3 → 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 (41) hide show
  1. package/README.md +3 -2
  2. package/dist/config/addresses.js +55 -3
  3. package/dist/config/chains.js +10 -2
  4. package/dist/index.js +1 -1
  5. package/dist/tools/dev/send.js +4 -2
  6. package/dist/tools/read/account.js +5 -4
  7. package/dist/tools/read/asset-managers.js +9 -2
  8. package/dist/tools/read/assets.js +3 -2
  9. package/dist/tools/read/pools.js +3 -2
  10. package/dist/tools/read/strategy.js +27 -5
  11. package/dist/tools/read/wallet.js +4 -3
  12. package/dist/tools/write/account/add-liquidity.js +2 -1
  13. package/dist/tools/write/account/borrow.js +2 -1
  14. package/dist/tools/write/account/close.js +2 -1
  15. package/dist/tools/write/account/create.js +2 -1
  16. package/dist/tools/write/account/deleverage.js +2 -1
  17. package/dist/tools/write/account/deposit.js +2 -1
  18. package/dist/tools/write/account/format-response.js +17 -5
  19. package/dist/tools/write/account/remove-liquidity.js +2 -1
  20. package/dist/tools/write/account/repay.js +2 -1
  21. package/dist/tools/write/account/stake.js +2 -1
  22. package/dist/tools/write/account/swap.js +2 -1
  23. package/dist/tools/write/account/withdraw.js +2 -1
  24. package/dist/tools/write/asset-managers/compounder.js +6 -4
  25. package/dist/tools/write/asset-managers/merkl-operator.js +2 -1
  26. package/dist/tools/write/asset-managers/rebalancer.js +2 -1
  27. package/dist/tools/write/asset-managers/set-asset-managers.js +2 -1
  28. package/dist/tools/write/asset-managers/shared.js +4 -0
  29. package/dist/tools/write/asset-managers/yield-claimer.js +6 -4
  30. package/dist/tools/write/wallet/approve.js +2 -1
  31. package/dist/utils/validation.js +2 -2
  32. package/llms-full.txt +35 -35
  33. package/llms.txt +2 -2
  34. package/package.json +5 -2
  35. package/server.json +9 -3
  36. package/skills/clamm-liquidity/SKILL.md +31 -4
  37. package/skills/openclaw/SKILL.md +39 -19
  38. package/skills/openclaw/arcadia.sh +101 -0
  39. package/skills/openclaw/contracts.md +20 -2
  40. package/skills/openclaw/wallet-signing.md +2 -22
  41. 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 { poolAbi } from "../../../abis/index.js";
4
5
  import { appendDataSuffix } from "../../../utils/attribution.js";
5
6
  import { validateAddress } from "../../../utils/validation.js";
@@ -23,7 +24,7 @@ export function registerRepayTool(server, _chains) {
23
24
  amount: z
24
25
  .string()
25
26
  .describe("Amount in raw units, or 'max_uint256' to repay all debt in full"),
26
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
27
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
27
28
  },
28
29
  }, async (params) => {
29
30
  try {
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
2
3
  import { formatBatchedResponse } from "./format-response.js";
3
4
  import { validateAddress } from "../../../utils/validation.js";
4
5
  import { BatchedTransactionOutput } from "../../output-schemas.js";
@@ -18,7 +19,7 @@ export function registerStakeTool(server, api) {
18
19
  action: z.enum(["stake", "unstake", "claim"]).describe("Action to perform"),
19
20
  asset_address: z.string().describe("Position manager contract address"),
20
21
  asset_id: z.number().describe("NFT token ID of the LP position"),
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 ({ account_address, action, asset_address, asset_id, chain_id }) => {
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 { formatBatchedResponse } from "./format-response.js";
3
4
  import { validateAddress } from "../../../utils/validation.js";
4
5
  import { BatchedTransactionOutput } from "../../output-schemas.js";
@@ -19,7 +20,7 @@ export function registerSwapTool(server, api) {
19
20
  asset_to: z.string().describe("Token address to swap to"),
20
21
  amount_in: z.string().describe("Raw units"),
21
22
  slippage: z.number().optional().default(100).describe("Basis points, 100 = 1%"),
22
- chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
23
+ chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
23
24
  },
24
25
  }, async ({ account_address, asset_from, asset_to, amount_in, slippage, chain_id }) => {
25
26
  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, 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,10 +1,10 @@
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 leverage, automated rebalancing, and yield optimization. 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
 
7
- Arcadia lets users open leveraged LP positions, borrow against collateral, and automate position management (rebalancing, compounding, yield claiming). This MCP server exposes the full protocol as 38 tools:
7
+ Arcadia lets users deploy and manage concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage. 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
@@ -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,10 +1,10 @@
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 leverage, automated rebalancing, and yield optimization. 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
 
7
- Arcadia lets users open leveraged LP positions, borrow against collateral, and automate position management (rebalancing, compounding, yield claiming). This MCP server exposes the full protocol as 38 tools:
7
+ Arcadia lets users deploy and manage concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage. 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
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.3",
5
- "description": "MCP server for Arcadia Finance. Manage concentrated liquidity positions with leverage, automated rebalancing, and yield optimization on 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",
@@ -30,6 +30,9 @@
30
30
  "leverage",
31
31
  "yield-farming",
32
32
  "rebalancing",
33
+ "compounding",
34
+ "lp-management",
35
+ "automation",
33
36
  "onchain"
34
37
  ],
35
38
  "files": [
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 Uniswap and Aerodrome liquidity positions with automated rebalancing and leverage.",
6
- "version": "0.3.3",
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.3",
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).",