The Deframe MCP Server exposes 25 tools and 9 prompts. Tools are callable by the AI agent during a session. Prompts are pre-built conversation starters you can invoke by name from your AI host to begin a guided workflow.Documentation Index
Fetch the complete documentation index at: https://docs.deframe.io/llms.txt
Use this file to discover all available pages before exploring further.
Shared Tools
Available regardless of integration path.recommend_integration_path
recommend_integration_path
| Field | Type | Description |
|---|---|---|
frontendFramework | string | e.g. next, react, remix, gatsby |
walletProvider | string | e.g. privy, dynamic, wagmi, ethers |
backendLanguage | string | e.g. typescript, javascript, python, go |
features | string[] | Features needed: swap, yield, wallet-positions |
get_health
get_health
validate_api_key
validate_api_key
| Field | Type | Description |
|---|---|---|
apiKey | string | The API key to validate |
list_tokens
list_tokens
| Field | Type | Description |
|---|---|---|
chainId | number (optional) | Filter tokens by EVM chain ID |
get_error_explanation
get_error_explanation
| Field | Type | Description |
|---|---|---|
errorCode | string | Error code string (e.g. QUOTE_EXPIRED, INSUFFICIENT_BALANCE) |
API Direct — Swap
get_swap_quote
get_swap_quote
| Field | Type | Description |
|---|---|---|
fromChain | number | Source chain ID |
toChain | number | Destination chain ID |
fromToken | string | Token symbol or address |
toToken | string | Token symbol or address |
fromAmount | string | Amount in smallest unit (e.g. wei) |
fromAddress | string | Sender wallet address |
transactionRequest, expected output amount, fees, and expiry timestamp.execute_swap_bytecode
execute_swap_bytecode
| Field | Type | Description |
|---|---|---|
quoteId | string | Quote ID returned by get_swap_quote |
fromAddress | string | Sender wallet address |
to, data, value, chainId) to sign and broadcast.get_swap_status
get_swap_status
| Field | Type | Description |
|---|---|---|
txHash | string | Transaction hash from the source chain |
fromChain | number (optional) | Source chain ID — speeds up lookup |
toChain | number (optional) | Destination chain ID |
status (PENDING, DONE, FAILED) and substatus (COMPLETED, PARTIAL, REFUNDED).Poll every 10–30 seconds while status is PENDING.API Direct — Yield
list_strategies
list_strategies
| Field | Type | Description |
|---|---|---|
network | string (optional) | Filter by network name (e.g. polygon, arbitrum) |
asset | string (optional) | Filter by asset symbol (e.g. USDC) |
get_strategy
get_strategy
| Field | Type | Description |
|---|---|---|
strategyId | string | Strategy identifier (e.g. Aave-USDC-polygon) |
get_strategy_quote
get_strategy_quote
| Field | Type | Description |
|---|---|---|
strategyId | string | Strategy identifier |
amount | string | Amount in asset’s smallest unit |
action | string | lend or withdraw |
wallet | string | Wallet address |
get_deposit_bytecode
get_deposit_bytecode
| Field | Type | Description |
|---|---|---|
strategyId | string | Strategy identifier |
amount | string | Deposit amount in asset’s smallest unit |
wallet | string | Wallet address |
action | string | Typically lend |
get_withdraw_bytecode
get_withdraw_bytecode
| Field | Type | Description |
|---|---|---|
strategyId | string | Strategy identifier |
amount | string | Withdrawal amount in asset’s smallest unit |
wallet | string | Wallet address |
action | string | Typically withdraw |
get_wallet_positions
get_wallet_positions
| Field | Type | Description |
|---|---|---|
wallet | string | Wallet address (checksummed or lowercase) |
get_wallet_history
get_wallet_history
| Field | Type | Description |
|---|---|---|
wallet | string | Wallet address |
strategyId | string | Strategy identifier |
get_yield_by_identifier
get_yield_by_identifier
| Field | Type | Description |
|---|---|---|
identifier | string | Asset name (e.g. USDC) or category (e.g. stablecoin) |
API Direct — Code Generation
get_code_example
get_code_example
| Field | Type | Description |
|---|---|---|
feature | string | swap, yield, or wallet-positions |
language | string | typescript, javascript, python, go, or curl |
SDK Widgets
scaffold_project
scaffold_project
| Field | Type | Description |
|---|---|---|
framework | string | next, react, remix, or gatsby |
features | string[] | swap, yield, or both |
walletProvider | string | Wallet connection library in use |
validate_provider_config
validate_provider_config
DeframeProvider configuration object before using it in production.Inputs:| Field | Type | Description |
|---|---|---|
config | object | The provider config object to validate |
check_sdk_compatibility
check_sdk_compatibility
deframe-sdk, React, and your wallet provider before installing or upgrading.Inputs:| Field | Type | Description |
|---|---|---|
sdkVersion | string | Installed version of deframe-sdk |
reactVersion | string | Installed version of React |
walletProvider | string | Wallet library name and version |
setup_env
setup_env
.env or .env.local file.Inputs:| Field | Type | Description |
|---|---|---|
apiKey | string | Your Deframe API key |
file | string (optional) | Target file path. Default: .env.local |
Skills
Higher-order workflows that chain multiple atomic tools into a single orchestrated call. Every workflow skill supportsdryRun: true (preview without generating bytecode) and partial-success returns (preserves already-generated bytecode when a later step fails). Validation failures carry skill-specific error codes like MISSING_DEPOSIT_TARGET, ZERO_POSITION_BALANCE, and SOURCE_POSITION_NOT_FOUND, consumable via get_error_explanation.
dryRun and partial-success, and the full skill-level error code reference, see the Skills Guide. This reference page keeps the accordions short.deframe://skills/<name> accessible via ReadMcpResource.
swap_and_deposit
swap_and_deposit
get_swap_quote → execute_swap_bytecode → get_strategy_quote → get_deposit_bytecode internally.Inputs:| Field | Type | Description |
|---|---|---|
fromChain | string | Source chain name (e.g. ethereum, polygon, base) |
toChain | string | Destination chain name where the yield strategy lives |
fromToken | string | Source token contract address |
toToken | string | Destination token — gets deposited into the strategy |
amountIn | string | Amount in smallest unit of fromToken |
wallet | string | Wallet that signs both txs and receives the swap output |
depositStrategyId | string (one of) | Exact strategy ID. Takes precedence over depositIdentifier |
depositIdentifier | string (one of) | Asset symbol/category (e.g. usdc, eth) — resolved via get_yield_by_identifier |
dryRun | boolean (optional) | When true, skip bytecode generation and return only quotes. Default false |
swap.bytecode, deposit.bytecode, executionOrder, warnings, and nextSteps. On partial failure, returns structuredContent.status === "partial" with the swap bytecode preserved.find_best_yield_for_asset
find_best_yield_for_asset
get_yield_by_identifier → list_strategies → get_strategy_quote → get_deposit_bytecode.Inputs:| Field | Type | Description |
|---|---|---|
asset | string | Symbol, name, or category accepted by get_yield_by_identifier (e.g. usdc, eth) |
wallet | string | Wallet that will deposit |
amount | string | Amount in smallest unit of the asset |
network | string (optional) | Network filter for alternatives search (e.g. polygon) |
dryRun | boolean (optional) | When true, return best + alternatives + quote without bytecode. Default false |
best strategy, up to 3 alternatives, deposit quote, deposit bytecode, plus warnings and next-step guidance.rebalance_position
rebalance_position
| Field | Type | Description |
|---|---|---|
wallet | string | Wallet that holds the source position |
fromStrategyId | string | Current strategy to exit |
toStrategyId | string (optional) | Destination. If omitted, auto-resolved to the best-APY strategy for the same asset |
amount | string (optional) | Rebalance amount in smallest unit. Defaults to the full current position balance |
dryRun | boolean (optional) | When true, return APY delta + amount without bytecode. Default false |
from and to strategy details, apyDelta, withdraw.bytecode, deposit.bytecode, executionOrder, and warnings. On partial failure, withdraw bytecode is preserved.diagnose_integration
diagnose_integration
| Field | Type | Description |
|---|---|---|
wallet | string (optional) | If provided, also probes get_wallet_positions to verify that endpoint |
overall (pass or fail), per-check breakdown with status, timing, and resolution hints. A failed api_key check cascades — every subsequent check will fail until the key is fixed. The wallet_positions check shows skipped when no wallet is passed and does not count against overall status.Prompts
Prompts are pre-built conversation starters. Invoke them by name from your AI host to begin a guided workflow.choose_integration_path
choose_integration_path
feature, frontendFramework, walletProvider, backendLanguageUse this at the start of a new integration to get a tailored recommendation before writing any code.troubleshoot
troubleshoot
errorCode, txState, descriptionUse this when a transaction is failing or an API call returns an unexpected error.api_quickstart
api_quickstart
feature, languageUse this to get from zero to working code as fast as possible.api_integration_wizard
api_integration_wizard
sdk_quickstart
sdk_quickstart
sdk_integration_wizard
sdk_integration_wizard
sdk_migration_guide
sdk_migration_guide
deframe-sdk versions, including all breaking changes and required code updates.Inputs: fromVersion, toVersionUse this before upgrading the SDK in a production project.portfolio_briefing
portfolio_briefing
wallet (required), includeHistoryDays (optional)The prompt instructs the agent to call get_wallet_positions, get_wallet_history, and get_yield_by_identifier, identify underperformers (~0.5pp APY threshold), and suggest actions using rebalance_position or find_best_yield_for_asset where relevant.integration_review
integration_review
workspacePath (optional), feature (optional: swap, yield, webhook, all)Checklist includes: quote TTL (5 min), rawQuote forwarding to execute_swap_bytecode, transactionData vs transactions field name, EIP-1193 value hex encoding, action=lend (not deposit), wallet param (not fromAddress), and webhook idempotency.