@arcadia-finance/mcp-server 0.4.0 → 0.4.2

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 CHANGED
@@ -9,7 +9,7 @@
9
9
  [![MCP Badge](https://lobehub.com/badge/mcp/arcadia-finance-mcp-server)](https://lobehub.com/mcp/arcadia-finance-mcp-server)
10
10
  [![arcadia-finance-mcp-server MCP server](https://glama.ai/mcp/servers/arcadia-finance/arcadia-finance-mcp-server/badges/score.svg)](https://glama.ai/mcp/servers/arcadia-finance/arcadia-finance-mcp-server)
11
11
 
12
- MCP server for [Arcadia Finance](https://arcadia.finance), a platform to manage concentrated liquidity positions on Uniswap and Aerodrome with automated rebalancing, compounding, yield optimization, and leverage. Read protocol data and build unsigned transactions for LP management, borrowing, deposits, and more.
12
+ MCP server for [Arcadia Finance](https://arcadia.finance), a platform for concentrated liquidity on Uniswap and Aerodrome with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Read protocol data and build unsigned transactions for LP management, borrowing, deposits, and more.
13
13
 
14
14
  Designed for AI agents (Claude, Cursor, etc.) to interact with Arcadia onchain.
15
15
 
@@ -49,6 +49,8 @@ All write tools return unsigned transactions as `{ to, data, value, chainId }`.
49
49
  | Tool | Description |
50
50
  | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
51
51
  | `write.wallet.approve` | Approve an ERC20 token for spending. Required before depositing into an account. Call `read.wallet.allowances` first to check if already approved. |
52
+ | `write.pool.deposit` | Lend the pool's underlying asset into an ERC-4626 tranche to earn interest. Mints tranche shares to the receiver. |
53
+ | `write.pool.redeem` | Redeem tranche shares back into the underlying asset (lender exit). |
52
54
  | `write.account.create` | Create a new Arcadia account via Factory. |
53
55
  | `write.account.deposit` | Deposit ERC20 tokens into an account. |
54
56
  | `write.account.withdraw` | Withdraw assets from an account. |
@@ -97,12 +97,13 @@ export const AssetPricesOutput = z.object({
97
97
  });
98
98
  export const PoolListOutput = z.object({
99
99
  pools: z.array(z.record(z.unknown())),
100
+ context_notes: z.array(z.string()).optional(),
100
101
  });
101
102
  export const PoolDetailOutput = z.object({
102
103
  pool: z.record(z.unknown()),
103
104
  apy_history: z.array(z.record(z.unknown())),
104
105
  });
105
- export const PointsWalletOutput = z.record(z.unknown());
106
+ export const PointsWalletOutput = z.object({}).passthrough();
106
107
  export const PointsLeaderboardOutput = z.object({
107
108
  total: z.number(),
108
109
  offset: z.number(),
@@ -114,9 +115,10 @@ export const StrategyListOutput = z.object({
114
115
  offset: z.number(),
115
116
  limit: z.number(),
116
117
  strategies: z.array(z.record(z.unknown())),
118
+ context_notes: z.array(z.string()).optional(),
117
119
  });
118
- export const StrategyDetailOutput = z.record(z.unknown());
119
- export const StrategyRecommendationOutput = z.record(z.unknown());
120
+ export const StrategyDetailOutput = z.object({}).passthrough();
121
+ export const StrategyRecommendationOutput = z.object({}).passthrough();
120
122
  export const GuideOutput = z.object({
121
123
  topic: z.string(),
122
124
  content: z.string(),
@@ -21,7 +21,7 @@ export function registerPoolTools(server, api) {
21
21
  if (Array.isArray(result) && result.length === 0) {
22
22
  const empty = {
23
23
  pools: [],
24
- note: `No lending pools found on chain ${chain_id}.`,
24
+ context_notes: [`No lending pools found on chain ${chain_id}.`],
25
25
  };
26
26
  return {
27
27
  content: [{ type: "text", text: JSON.stringify(empty, null, 2) }],
@@ -49,7 +49,9 @@ export function registerStrategyTools(server, api) {
49
49
  strategies,
50
50
  };
51
51
  if (total === 0 && all.length > 0) {
52
- result.context_note = `Featured strategies are not curated for chain ${chain_id} yet. Backend returned ${all.length} Base strategies; filtered out. Use featured_only=false to list all strategies on this chain.`;
52
+ result.context_notes = [
53
+ `Featured strategies are not curated for chain ${chain_id} yet. Backend returned ${all.length} Base strategies; filtered out. Use featured_only=false to list all strategies on this chain.`,
54
+ ];
53
55
  }
54
56
  return {
55
57
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
@@ -161,8 +163,9 @@ export function registerStrategyTools(server, api) {
161
163
  rec.removed_assets.length === 0 &&
162
164
  Number(rec.current_apy ?? 0) === 0 &&
163
165
  Number(rec.proposed_apy ?? 0) === 0) {
164
- rec.context_note =
165
- "Account has no active positions — no rebalancing recommendations available.";
166
+ rec.context_notes = [
167
+ "Account has no active positions — no rebalancing recommendations available.",
168
+ ];
166
169
  }
167
170
  return {
168
171
  content: [{ type: "text", text: JSON.stringify(rec, null, 2) }],
package/llms-full.txt CHANGED
@@ -1,14 +1,15 @@
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, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
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).
4
4
 
5
5
  ## Overview
6
6
 
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:
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 40 tools:
8
8
 
9
9
  - **Account management**: health factor, collateral, debt, positions, PnL, history
10
10
  - **Wallet**: ERC20 balances, allowances, owned accounts, points
11
11
  - **Lending pools**: TVL, APY, utilization, available liquidity, rate history
12
+ - **Single-sided liquidity**: deposit a single asset into a lending pool (ERC-4626 tranche) to earn borrower interest
12
13
  - **LP strategies**: concentrated liquidity strategies with APY per range width, recommendations
13
14
  - **Transaction building**: unsigned calldata for deposits, borrows, swaps, LP minting/closing, staking
14
15
  - **Automation**: configure asset managers (rebalancer, compounder, yield claimer, CowSwap, Merkl)
@@ -164,7 +165,7 @@ Get Arcadia workflow guides and reference documentation.
164
165
  Parameters:
165
166
  - `topic` (enum, optional): overview | automation | strategies | selection
166
167
 
167
- ## Write Tools (20)
168
+ ## Write Tools (22)
168
169
 
169
170
  All write tools return unsigned transactions as `{ to, data, value, chainId }`.
170
171
 
@@ -179,6 +180,27 @@ Parameters:
179
180
  - `amount` (string, default: "max_uint256"): ERC20 only: amount in raw units
180
181
  - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
181
182
 
183
+ ### write.pool.deposit
184
+
185
+ 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`.
186
+
187
+ Parameters:
188
+ - `tranche_address` (string, required): Tranche contract address (get from `read.pool.list`, each pool's `tranches[0].address`)
189
+ - `assets` (string, required): Amount of underlying asset to deposit in raw units
190
+ - `receiver` (string, required): Address that receives the minted tranche shares
191
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
192
+
193
+ ### write.pool.redeem
194
+
195
+ 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.
196
+
197
+ Parameters:
198
+ - `tranche_address` (string, required): Tranche contract address
199
+ - `shares` (string, required): Amount of tranche shares to burn in raw units
200
+ - `receiver` (string, required): Address that receives the underlying asset
201
+ - `owner` (string, required): Address that owns the tranche shares being burned
202
+ - `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
203
+
182
204
  ### write.account.create
183
205
 
184
206
  Build an unsigned transaction to create a new Arcadia account via the Factory contract.
package/llms.txt CHANGED
@@ -1,14 +1,15 @@
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, Velodrome) with automated rebalancing, compounding, yield optimization, and leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
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).
4
4
 
5
5
  ## Overview
6
6
 
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:
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 40 tools:
8
8
 
9
9
  - **Account management**: health factor, collateral, debt, positions, PnL, history
10
10
  - **Wallet**: ERC20 balances, allowances, owned accounts, points
11
11
  - **Lending pools**: TVL, APY, utilization, available liquidity, rate history
12
+ - **Single-sided liquidity**: deposit a single asset into a lending pool (ERC-4626 tranche) to earn borrower interest
12
13
  - **LP strategies**: concentrated liquidity strategies with APY per range width, recommendations
13
14
  - **Transaction building**: unsigned calldata for deposits, borrows, swaps, LP minting/closing, staking
14
15
  - **Automation**: configure asset managers (rebalancer, compounder, yield claimer, CowSwap, Merkl)
@@ -23,7 +24,7 @@ npx -y @arcadia-finance/mcp-server
23
24
 
24
25
  Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
25
26
 
26
- ## Tools (38 total)
27
+ ## Tools (40 total)
27
28
 
28
29
  ### Read (17)
29
30
 
@@ -45,9 +46,11 @@ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
45
46
  - read.guides: reference guides for automation, strategies, addresses
46
47
  - read.asset_manager.intents: available automation intents with params and supported chains
47
48
 
48
- ### Write (20)
49
+ ### Write (22)
49
50
 
50
51
  - write.wallet.approve: approve ERC20/ERC721 for spending
52
+ - write.pool.deposit: deposit the pool's underlying asset into an ERC-4626 tranche to earn lender yield
53
+ - write.pool.redeem: burn tranche shares and redeem the underlying asset (lender exit)
51
54
  - write.account.create: create a new Arcadia account
52
55
  - write.account.deposit: deposit assets into an account
53
56
  - write.account.withdraw: withdraw assets from an account
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.4.0",
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.",
4
+ "version": "0.4.2",
5
+ "description": "MCP server for Arcadia Finance. Deploy concentrated liquidity on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Base, Unichain, and Optimism.",
6
6
  "type": "module",
7
7
  "license": "AGPL-3.0",
8
8
  "packageManager": "yarn@4.13.0",
@@ -56,7 +56,8 @@
56
56
  "lint:fix": "eslint src/ --fix",
57
57
  "format": "prettier --check .",
58
58
  "format:fix": "prettier --write .",
59
- "prepublishOnly": "yarn build"
59
+ "sync-version": "node tools/sync-version.mjs",
60
+ "prepublishOnly": "yarn sync-version && yarn build"
60
61
  },
61
62
  "engines": {
62
63
  "node": ">=22"
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 on Uniswap and Aerodrome with rebalancing, compounding, and leverage.",
6
- "version": "0.4.0",
5
+ "description": "Concentrated liquidity on Uniswap/Aerodrome (rebalance, compound, leverage) or single-sided lending.",
6
+ "version": "0.4.2",
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.4.0",
16
+ "version": "0.4.2",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: clamm-liquidity
3
- description: Agent guide for clAMM management on Arcadia Finance. Covers 37 MCP tools (+1 dev), automation setup (rebalancers, compounders, yield claimers, Merkl, CoW swapper), strategy selection framework, and strategy templates including delta neutral leveraged LP and protocol-owned liquidity.
3
+ description: Agent guide for clAMM management on Arcadia Finance. Covers 39 MCP tools (+1 dev), automation setup (rebalancers, compounders, yield claimers, Merkl, CoW swapper), single-sided liquidity via ERC-4626 tranches, strategy selection framework, and strategy templates including delta neutral leveraged LP and protocol-owned liquidity.
4
4
  user-invocable: true
5
5
  ---
6
6
 
@@ -45,7 +45,7 @@ Arcadia's flash-action tools can batch multiple DeFi operations into a single at
45
45
 
46
46
  **Batched write tools (`write.account.add_liquidity`, `write.account.close`, `write.account.deleverage`, `write.account.swap`, `write.account.remove_liquidity`, `write.account.stake`) return time-sensitive calldata** — sign and broadcast promptly; calldata may expire after 30–60 seconds depending on market conditions. If a transaction reverts due to price movement, rebuild and retry at least once before falling back to individual tools.
47
47
 
48
- ## MCP Tools (37 + 1 dev)
48
+ ## MCP Tools (39 + 1 dev)
49
49
 
50
50
  ### Read Tools
51
51
 
@@ -82,18 +82,20 @@ These tools batch multiple operations into ONE atomic transaction. Always prefer
82
82
 
83
83
  ### Individual Write Tools (use when batched tools fail or for standalone operations)
84
84
 
85
- | Tool | When to use |
86
- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
- | `write.wallet.approve` | Approve a token for spending. **Required before `write.account.deposit`** and before `write.account.add_liquidity` (when depositing from wallet). Call `read.wallet.allowances` first to check if already approved. |
88
- | `write.account.create` | Create a new Arcadia account (one-time setup). Use `account_version: 0` for the latest version (recommended). |
89
- | `write.account.deposit` | Deposit ERC20 tokens as collateral. NOT needed before `write.account.add_liquidity` — that tool handles deposits atomically. |
90
- | `write.account.withdraw` | Withdraw assets to account owner. Account version auto-detected on-chain. Params: `asset_addresses[]`, `asset_amounts[]` (exact amounts, no max_uint256), optional `asset_ids[]` (0 for ERC20). |
91
- | `write.account.borrow` | Borrow from a lending pool. NOT needed for leveraged LP — `write.account.add_liquidity` handles borrowing internally. |
92
- | `write.account.repay` | Repay debt from wallet (approve pool first). Use `amount: "max_uint256"` to repay in full. For repaying with account collateral, prefer `write.account.deleverage`. |
93
- | `write.account.swap` | Swap assets within account (backend handles routing). For closing positions, prefer `write.account.close`. |
94
- | `write.account.remove_liquidity` | PARTIAL liquidity decrease only (position stays open). For full LP removal/exit, use `write.account.close`. |
95
- | `write.account.stake` | Stake, unstake, or claim rewards for an LP position. Direction auto-detected from `asset_address`. |
96
- | `write.asset_manager.*` | Encode automation intents (rebalancer, compounder, compounder_staked, yield_claimer, yield_claimer_cowswap, cow_swapper, merkl_operator). Each returns `{ asset_managers, statuses, datas }` — merge arrays, pass to `write.account.set_asset_managers`. See automation.md and `read.asset_manager.intents` for full details. |
85
+ | Tool | When to use |
86
+ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
+ | `write.wallet.approve` | Approve a token for spending. **Required before `write.account.deposit`** and before `write.account.add_liquidity` (when depositing from wallet). Call `read.wallet.allowances` first to check if already approved. |
88
+ | `write.account.create` | Create a new Arcadia account (one-time setup). Use `account_version: 0` for the latest version (recommended). |
89
+ | `write.account.deposit` | Deposit ERC20 tokens as collateral. NOT needed before `write.account.add_liquidity` — that tool handles deposits atomically. |
90
+ | `write.account.withdraw` | Withdraw assets to account owner. Account version auto-detected on-chain. Params: `asset_addresses[]`, `asset_amounts[]` (exact amounts, no max_uint256), optional `asset_ids[]` (0 for ERC20). |
91
+ | `write.account.borrow` | Borrow from a lending pool. NOT needed for leveraged LP — `write.account.add_liquidity` handles borrowing internally. |
92
+ | `write.account.repay` | Repay debt from wallet (approve pool first). Use `amount: "max_uint256"` to repay in full. For repaying with account collateral, prefer `write.account.deleverage`. |
93
+ | `write.account.swap` | Swap assets within account (backend handles routing). For closing positions, prefer `write.account.close`. |
94
+ | `write.account.remove_liquidity` | PARTIAL liquidity decrease only (position stays open). For full LP removal/exit, use `write.account.close`. |
95
+ | `write.account.stake` | Stake, unstake, or claim rewards for an LP position. Direction auto-detected from `asset_address`. |
96
+ | `write.pool.deposit` | **Lend to earn yield.** Deposit the pool's underlying asset (USDC / WETH / cbBTC) into the ERC-4626 tranche, receive tranche shares that accrue interest from borrowers. Requires prior `write.wallet.approve` to the tranche. **Different from `write.account.deposit`**: that deposits collateral into your Arcadia account; this deposits as a lender. |
97
+ | `write.pool.redeem` | **Lender exit.** Burn tranche shares and redeem the underlying asset, including accrued interest. Pass the owner's share balance (or a partial amount) in `shares`. |
98
+ | `write.asset_manager.*` | Encode automation intents (rebalancer, compounder, compounder_staked, yield_claimer, yield_claimer_cowswap, cow_swapper, merkl_operator). Each returns `{ asset_managers, statuses, datas }` — merge arrays, pass to `write.account.set_asset_managers`. See automation.md and `read.asset_manager.intents` for full details. |
97
99
 
98
100
  ### Dev Tools (only available when `PK` env var is set)
99
101
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: arcadia-finance
3
- description: "DeFi liquidity management on Uniswap and Aerodrome, live on Base and Unichain. Deploy LP positions with automated rebalancing, compounding, yield optimization, and leverage via Arcadia Finance."
3
+ version: 1.1.1
4
+ description: "DeFi liquidity management on Uniswap and Aerodrome, live on Base, Unichain, and Optimism. Deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools."
4
5
  metadata:
5
6
  openclaw:
6
7
  homepage: https://arcadia.finance
@@ -12,7 +13,7 @@ metadata:
12
13
 
13
14
  > **Agent note:** `{baseDir}` refers to the directory containing this SKILL.md file. Resolve all `{baseDir}` paths relative to it.
14
15
 
15
- Arcadia helps users deploy and manage concentrated liquidity positions on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and optional leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
16
+ Arcadia helps users deploy concentrated liquidity positions on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and optional leverage, or provide single-sided liquidity to lending pools to earn borrower interest. Supported chains: Base (8453), Unichain (130), Optimism (10).
16
17
 
17
18
  ## CLI Usage
18
19
 
@@ -48,6 +49,20 @@ Requires: `curl`, `jq`. No other dependencies.
48
49
  {baseDir}/arcadia.sh read_asset_manager_intents '{}'
49
50
  ```
50
51
 
52
+ ## Single-Sided Liquidity (Lending)
53
+
54
+ Provide single-sided liquidity by depositing the pool's underlying asset into an Arcadia lending tranche (ERC-4626), earning interest from borrowers. Use `read_pool_list` to find `tranches[0].address` for each pool. Approve the tranche first (`write_wallet_approve`).
55
+
56
+ ```bash
57
+ # Lender deposit: lend 10 USDC into the USDC tranche, receive shares to your wallet
58
+ {baseDir}/arcadia.sh write_pool_deposit '{"tranche_address":"0x...","assets":"10000000","receiver":"0x...","chain_id":8453}'
59
+
60
+ # Lender exit: redeem shares back to the underlying asset
61
+ {baseDir}/arcadia.sh write_pool_redeem '{"tranche_address":"0x...","shares":"10000000","receiver":"0x...","owner":"0x...","chain_id":8453}'
62
+ ```
63
+
64
+ `write_pool_deposit` is for lenders earning yield. For depositing collateral into an Arcadia account, use `write_account_deposit` instead.
65
+
51
66
  ## Write Operations
52
67
 
53
68
  All write tools return unsigned transactions `{ to, data, value, chainId }`. Sign with your wallet before broadcasting. See `{baseDir}/wallet-signing.md` for wallet options.