mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PK | No | Private key for dev-only signing via the dev.send tool. Not for production. Leave unset unless you are testing locally. | |
| PORT | No | HTTP listen port. Only used when TRANSPORT=http. | 3000 |
| TRANSPORT | No | Transport mode: stdio (default) or http. | stdio |
| RPC_URL_BASE | No | RPC URL for Base (8453). Falls back to public RPC if not set. | |
| RATE_LIMIT_RPM | No | Max requests per minute per session. Only used when TRANSPORT=http. | 60 |
| ALLOWED_ORIGINS | No | Comma-separated allowed origins for CORS and DNS rebinding. Only used when TRANSPORT=http. Defaults to https://mcp.arcadia.finance when unset. | |
| RPC_URL_OPTIMISM | No | RPC URL for Optimism (10). Falls back to public RPC if not set. | |
| RPC_URL_UNICHAIN | No | RPC URL for Unichain (130). Falls back to public RPC if not set. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_account_infoA | Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status. Health factor = 1 - (used_margin / liquidation_value): 1 = no debt (safest), >0 = healthy, 0 = liquidation threshold, <0 = past liquidation. Higher is safer. The |
| read_account_historyA | Get an Arcadia account's historical net value over time. Returns a time series of snapshots, oldest first, each |
| read_account_pnlA | Get PnL (cost basis) and yield earned for an Arcadia account. Returns lifetime totals: cost basis vs current value (negative cost_basis = net profit withdrawn), net transfers per token, total yield earned in USD and per token. cost_basis, current_value, cost_diff are in USD (human-readable). Per-token fields (net_transfers, summed_yields_earned) are in raw token units. |
| read_pool_listA | List all Arcadia lending pools: TVL, utilization, available liquidity. Key fields: interest_rate = current borrow cost, lending_apy = lender yield. All rates are decimal fractions (1.0 = 100%, 0.06 = 6%). For APY history on a specific pool, use read_pool_info. |
| read_pool_infoA | Get detailed info for a single lending pool including APY history over time. Useful for analyzing rate trends and comparing pools. Use read_pool_list to discover pool addresses. |
| read_asset_listA | List supported collateral assets on Arcadia. Returns compact list (address, symbol, decimals, type). Use search to filter by symbol substring. For USD prices, use read_asset_prices. |
| read_asset_pricesA | Get USD prices for one or more asset addresses on one chain. Pass a single address or comma-separated addresses. Returns a price map keyed by address. Unknown or unpriced addresses return 0, not an error. Prices are scoped to chain_id (default 8453, Base), so pass the chain the addresses live on. Read-only. To find asset addresses, use read_asset_list. |
| read_strategy_listA | Get Arcadia LP strategies. Use featured_only=true for curated top strategies (recommended first call); their apy is measured over the last 24 hours at the featured range width, and is 0.0 when that measurement fails. Otherwise returns a paginated list where strategy_apy_7d is the 7-day average APY at each strategy's default range. Increase limit or use offset for pagination. All APY values are decimal fractions (1.0 = 100%, 0.05 = 5%). For APY per range width over the last 24 hours, use read_strategy_info. |
| read_strategy_infoA | Get full detail for a specific concentrated-liquidity LP strategy by ID: includes APY per range width over the last 24 hours, each range anchored on the current price (narrower range = higher APY but more rebalancing cost/risk), the 7-day average APY at the default range in the yield field, pool info, and configuration. For basic (constant-product) pools, use strategy_apy_7d from read_strategy_list. Use read_strategy_list to discover strategy IDs. All APY values are decimal fractions (1.0 = 100%, 0.05 = 5%). |
| read_strategy_recommendationA | Get a rebalancing recommendation for an Arcadia account: suggests asset changes to optimize yield. current_apy and proposed_apy are measured over the last 24 hours where possible (the account's positions at their own ranges, the proposal at its ranges), not the 7-day average of read_strategy_list, so recommended strategies may differ from the list ranking. APY values are decimal fractions (0.05 = 5%). weekly_earning_difference is in USD. |
| read_point_leaderboardA | Get the Arcadia points leaderboard (paginated). For a specific wallet's points balance, use read_wallet_points. |
| read_guidesA | Get Arcadia workflow guides and reference documentation. Call this before multi-step workflows (opening LP positions, enabling automation, closing positions) or when you need contract addresses, asset manager addresses, or strategy parameters. Topics: overview (addresses + tool catalog), automation (intent-based automation setup), strategies (step-by-step templates), selection (how to evaluate and parameterize strategies). |
| read_wallet_balancesA | Get native ETH and ERC20 token balances for a wallet address. Reads directly from chain via RPC multicall. Use before write_account_add_liquidity or write_account_deposit to verify the wallet has sufficient tokens. Returns both raw balance (smallest unit/wei) and formatted (human-readable) per token. |
| read_wallet_allowancesA | Check ERC20 token allowances for a spender address. Use before write_wallet_approve to avoid redundant approvals: skip approving if the current allowance is already sufficient. |
| read_wallet_accountsA | List all Arcadia accounts owned by a wallet address. Returns a summary of each account (address, name). Call read_account_info with a specific account_address for full details like health factor, collateral, and debt. |
| read_wallet_pointsA | Get the Arcadia points balance for one wallet address. Returns points and wallet_address. A wallet with no points returns points 0 and wallet_address 'unknown', not an error. Read-only, no authentication. For the ranked list of wallets, use read_point_leaderboard. |
| read_asset_manager_intentsA | List the automation intents Arcadia supports, with the parameters each one accepts. Pass account_address to also get per-account availability: which intents can be enabled right now and, for any that cannot, the compatibility rule blocking it. Pass position_id as well to scope availability to one LP position. Without account_address this returns the catalog only. |
| read_asset_manager_currentA | Read which asset managers are currently enabled on an account, with their decoded on-chain configuration. Returns the active managers (address, protocol, initiator, decoded strategy metadata, slippage and value-loss caps, fee recipient), the intents they map to, and Merkl claim state including whether reward tokens still need registering. Managers from superseded deployments are listed separately under |
| read_account_aero_upgradeA | Which Arcadia accounts have something to upgrade to Aero (MetadexCL V1): Slipstream V1 to V3 positions (Aerodrome on Base, Velodrome on Optimism, staked or not) and old AERO. Pass wallet_address for every account of a wallet, or account_address for one. Per account: status (ready | choices_required | waiting | not_open | nothing_to_upgrade), positions (every Slipstream position on it), movable (ready or needing a pool choice), waiting, blocked, old_aero (raw, 18 decimals). Accounts without a Slipstream position or old AERO are left out, including accounts whose positions already moved but whose automations still run on the old Slipstream managers: when read_asset_manager_current shows Slipstream managers on an account that only holds metadexcl_v1 positions, call write_account_aero_upgrade for it to get managers_to_reconnect. failed_accounts lists the accounts whose check failed, with the error: an empty accounts list means nothing to do only when failed_accounts is empty too. Otherwise tell the user those accounts could not be checked and retry later. opens_at is when the AERO token upgrade opens on Base. No calldata, prices or simulation: this is the cheap check. For the plan and the transaction call write_account_aero_upgrade. Chains: Base (8453), Optimism (10); Robinhood (4663) has no Slipstream positions and answers an empty list. |
| write_account_createA | Build an unsigned transaction to create a new Arcadia account via the Factory contract. account_version: 3 with creditor → V3 margin account (can borrow/leverage). account_version: 0 or 4 → V4 spot account (no borrowing, creditor is ignored, any ERC20 allowed). Returns the predicted account address (deterministic via CREATE2). |
| write_account_depositA | Build an unsigned transaction to deposit assets into an Arcadia account as collateral. Supports ERC20 tokens and ERC721 NFTs (LP positions). NOT needed before write_account_add_liquidity: that tool deposits from wallet atomically. Ensure the account is approved first (call read_wallet_allowances to check, then write_wallet_approve if needed). Account version is auto-detected on-chain (override with account_version if needed). |
| write_account_withdrawA | Build an unsigned transaction to withdraw assets from an Arcadia account to the owner's wallet. Only the account owner can withdraw. Will revert if the account has debt and withdrawal would make it undercollateralized. Does not support max_uint256: pass exact amounts from read_account_info. Account version is auto-detected on-chain (override with account_version if needed). |
| write_account_borrowA | Build an unsigned transaction to borrow from an Arcadia lending pool against account collateral. NOT needed for leveraged LP: write_account_add_liquidity handles borrowing internally when leverage > 0. Only works with margin accounts (created with a creditor/lending pool). Spot accounts (no creditor) cannot borrow: the tool will validate this and reject. Before borrowing, verify the account has positive free margin via read_account_info: collateral_value must exceed used_margin. |
| write_account_repayA | Repay debt to an Arcadia lending pool using tokens from the wallet (requires ERC20 allowance). To repay using account collateral instead (no wallet tokens needed), use write_account_deleverage. Check allowance first (read_wallet_allowances), then approve the pool if needed (write_wallet_approve). Check outstanding debt with read_account_info. |
| write_account_add_liquidityA | Multi-step flash-action: atomically combines [deposit from wallet] + [use account collateral] + [swap to optimal ratio] + [mint LP] + [borrow if leveraged] in ONE transaction. Do NOT call write_account_deposit separately. Capital sources: wallet tokens (deposits array), existing account collateral (use_account_assets=true), or both. Check allowances first (read_wallet_allowances), then approve if needed (write_wallet_approve). Supports depositing multiple tokens and minting multiple LP positions in one tx. Works with both margin accounts (can leverage) and spot accounts (no leverage). For workflows, call read_guides('strategies'). The returned calldata is time-sensitive: sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up), passing only the accept_price_checks the user already confirmed. Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation. expected_value_change is in raw units of the account's numeraire token (6 decimals for USDC, 18 for WETH). Negative = cost to open, positive = value gained. Compare before.total_account_value and after.total_account_value for the full picture. If a pool's price is off market or one of its tokens has no price, the tool returns the price warnings, an accept_price_checks list and NO transaction. Show the warnings to the user and call again with that accept_price_checks list only after the user explicitly confirms they accept them. If a later call returns new warnings, even on a rebuild, show them and get a new confirmation before passing their list. The acknowledgement never bypasses a backend refusal. |
| write_account_remove_liquidityA | Flash-action: PARTIALLY decreases liquidity from an LP position. The position remains open with reduced liquidity; underlying tokens stay in the account. For FULL position exit (burn LP + swap + repay + withdraw), use write_account_close instead: it batches everything into one atomic transaction. The returned calldata is time-sensitive — sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up). Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation. |
| write_account_swapA | Flash-action: swaps assets within an Arcadia account in one atomic transaction. The backend finds the optimal swap route. NOTE: If you are closing a position (swap + repay + withdraw), prefer write_account_close which batches everything atomically. Only use this tool for standalone swaps within an active position. The returned calldata is time-sensitive: sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up). Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation: if tenderly_sim_status is 'false', do NOT broadcast the transaction. |
| write_account_deleverageA | Multi-step flash-action: sells account collateral to the debt token and repays in one atomic transaction: no wallet tokens needed. To repay from wallet tokens instead, use write_account_repay. NOTE: If you are closing a position (remove LP + swap + repay + withdraw), prefer write_account_close which batches everything atomically. Only use this tool for standalone repayment while keeping the position active. The returned calldata is time-sensitive: sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up). Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation: if tenderly_sim_status is 'false', do NOT broadcast the transaction. |
| write_account_stakeA | Flash-action: stake, unstake, or claim rewards for an LP position in one atomic transaction. Use the |
| write_account_closeA | Atomic flash-action that closes an Arcadia account position in ONE transaction. Combines up to 3 steps atomically: [burn LP position] + [swap all tokens to a single target asset] + [repay debt]. Tokens remain in the account after closing: use write_account_withdraw to send them to your wallet. ALWAYS try this tool first when closing/exiting a position. Only fall back to individual tools (write_account_remove_liquidity, write_account_swap, write_account_deleverage, write_account_withdraw) if this tool fails. Supports two modes:
The returned calldata is time-sensitive — sign and broadcast within 30 seconds. If the transaction reverts due to price movement, rebuild and sign again immediately (retry at least once before giving up). Response includes tenderly_sim_url and tenderly_sim_status for pre-broadcast validation. |
| write_account_aero_upgradeA | Upgrade one Arcadia account to Aero (MetadexCL V1) in one flashAction: every Slipstream V1/V2/V3 position (dex_protocol slipstream*, staked or not, see read_account_info) moves to the Aero CL pool with the same pair and variant at the same range and tick spacing (when Aero has no pool at that tick spacing, the user picks another one), and every unit of old AERO (loose, in rewards, in an old-AERO pair) becomes the new AERO. Returns the plan and, when anything can go now, the unsigned transaction. Only the account owner can sign it. The backend decides what moves: report items[].status and items[].reason as given, never decide eligibility yourself. status ready: sign transaction. choices_required: some position has status choose with options[] (every Aero pool on its pair, with apy, tvl_usd, is_new, tick_spacing, range_widened, default and disabled_reason); ask the user to pick one whose disabled_reason is null, then call again with it in choices so one transaction moves everything. The transaction returned with choices_required moves only the ready items: sign it alone only when the user wants to leave the choose positions where they are. waiting: each item's reason says why (pool_not_on_aero, staking_not_open, target_price_mismatch, account_unhealthy, ...); a waiting item with an option whose disabled_reason is null can still move with that pick, so ask the user; do not retry in a loop. not_open: the AERO upgrade contract does not accept deposits at the moment. A 422 saying a pool is not selectable: drop that pick, call again without it and ask the user again. Pass accounts (up to 10) instead of account_address for one plan per account; the accounts share one AERO upgrade budget. multisends groups the accounts that got a transaction, in order: a Safe signs one MultiSend per group (each below max_gas_per_tx). After it confirms, reconnect managers_to_reconnect with write_account_automations and verify with read_account_info (next_steps). Spot and margin accounts can hold Aero positions, staked or not. Chains: 8453 (Base, default), 10 (Optimism) and 4663 (Robinhood, which has nothing to upgrade). Calldata is time-sensitive: sign promptly, rebuild on a price revert. After a transaction confirms, pass its block as min_block on the next call so the plan is not built on older state. When the transaction's simulation reverts the tool returns the plan with an error and no transaction; tenderly_sim_status unavailable means Tenderly did not answer: call once more before signing. A plan without a transaction can still show tenderly_sim_status failure: the account's health or a lending pool limit refused the move, and the items wait on account_unhealthy or exposure_limit; report those reasons and do not rebuild. |
| write_wallet_approveA | Build an unsigned approval transaction. For ERC20 tokens: generates approve(spender, amount). For ERC721/ERC1155 NFTs (e.g. LP positions): generates setApprovalForAll(operator, true). Required before write_account_deposit or write_account_add_liquidity (when depositing from wallet). Tip: call read_wallet_allowances first to check if approval already exists: skip this if the current allowance is sufficient. |
| write_wallet_upgrade_veloA | Upgrade VELO held in a wallet on Optimism to the new AERO on Base: ordered unsigned wallet transactions from owner_address, an approve when the allowance is short, then depositLiquid on the Velodrome migration with the Hyperlane fee as value. 0.044 new AERO per VELO arrives at the same address on Base once the message lands. VELO inside an Arcadia account must be withdrawn to the wallet first (write_account_withdraw). VELO stays usable, so this is optional. Optimism (chain_id 10) only. 'upgrade unavailable' names the contract's reason: not_open (with the opening time), paused, budget_exhausted, recipient_not_deployed (a contract wallet with no code on Base). |
| write_pool_depositA | 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 (see write_wallet_approve). To check current lender yield, call read_pool_list or read_pool_info. |
| write_pool_redeemA | 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 asset is sent. |
| write_account_automationsA | Configure an account's automations from a list of intents and return the unsigned setAssetManagers transaction. The backend resolves which asset managers each intent needs, validates that the combination is compatible, encodes the metadata and builds the calldata, so you describe the desired outcome rather than the contracts. With mode 'save' (the default) the intents array is the complete desired state: the backend diffs it against what is currently enabled, so any automation you leave out is DISABLED by the returned transaction. Pass a single intent with enabled: false to turn everything off. Mode 'preview' validates and resolves the intents WITHOUT reading chain state and returns no transaction, because its calldata carries no disable entries and would only partially apply the state. Use it to check a combination is legal or to show a plan; use 'save' to get something signable. To toggle one automation without restating the rest, use write_account_automations_delta. Intents:
Pass position_id (from assets[] in read_account_info) and the backend fills in protocol, is_staked, token0, token1 and reward_tokens for you; anything you pass explicitly wins. claim_merkl needs no position context. Rules the backend enforces (a violation is returned as an error, never written on-chain):
Returns { valid, errors, warnings, human_summary, plan, diff, transaction }. When a compatibility rule fires the call returns an error and no transaction: read errors[].reason, adjust the intents and retry. There is deliberately no transaction when the account already matches the request (no_changes_needed), when the Tenderly simulation predicts a revert (an error), or in preview mode (preview_only). Call read_asset_manager_intents first to see which intents this account can enable. |
| write_account_automations_deltaA | Apply an explicit change to an account's automations and return the unsigned setAssetManagers transaction. Unlike write_account_automations this is a delta, not a full desired state: automations you do not mention are left untouched. Use it to switch one automation on or off without restating the others. The enable array takes intents to switch on (same shapes as write_account_automations). To turn an automation OFF, call read_asset_manager_current, take the address of the manager serving it, and pass that address in the disable array: an intent with enabled: false in Intents:
Pass position_id (from assets[] in read_account_info) and the backend fills in protocol, is_staked, token0, token1 and reward_tokens for you; anything you pass explicitly wins. claim_merkl needs no position context. Rules the backend enforces (a violation is returned as an error, never written on-chain):
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyze-account | Analyze an Arcadia account: health factor, positions, PnL, automation status, and recommendations. |
| find-yield-strategy | Evaluate LP strategies on Arcadia: compare fee APY vs borrow cost, select pool, range width, and leverage. |
| setup-automation | Configure automations (compounding, claiming, rebalancing, Merkl) for an Arcadia account. |
| migrate-to-aero | Upgrade an Arcadia account to Aero CL (MetadexCL V1): move its Slipstream positions (Aerodrome / Velodrome CL, V1 to V3) and old AERO in one transaction, then reconnect automations. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guide-overview | Tool catalog, token/contract/lending pool addresses, asset manager addresses, account versions |
| guide-automation | Intent-based automation setup: compound fees, claim rewards, add to LP, rebalance, claim Merkl |
| guide-strategies | Step-by-step strategy templates: delta neutral leveraged LP, protocol owned liquidity, closing sequences, moving Slipstream positions to Aero |
| guide-selection | Strategy evaluation framework: pool selection, range width, leverage sizing, automation combos, exit signals |
TDQS
Scored across 37 tools
Most tools target distinct resources/actions, and descriptions explicitly route overlapping workflows such as add_liquidity vs deposit, close vs individual close steps, and automations save vs delta. However, several primitive tools intentionally overlap with higher-level batch tools, and write_account_stake bundles stake/unstake/claim, leaving some misselection risk.
All tools use snake_case with a consistent read_/write_ prefix followed by domain and action. Longer names like read_account_aero_upgrade and write_account_automations_delta still follow the same predictable pattern.
37 tools is well above the 3-15 sweet spot and the 25+ heavy threshold. Although the DeFi domain is broad, the surface is large enough to burden tool selection and could be consolidated.
Coverage spans pools, accounts, assets, strategies, points, wallet operations, automations, and Aero/VELO upgrades, with read and write paths for most workflows. Minor gaps like account ownership/name management or standalone account close/transfer are not exposed, but core lifecycle operations are covered.