Machine-readable resources:
- llms.txt — Structured overview for LLM consumption
- OpenAPI Spec — Full API specification
When to Use What
| Use Case | Recommended | Why |
|---|---|---|
| Execute DeFi operations from a backend | API | Direct HTTP calls, full control |
| Build a frontend with yield and swap UI | SDK Widgets | Handles wallets, signing, execution |
| AI agent in an MCP-compatible host | MCP Server | Zero-config tool discovery, typed inputs and outputs |
| Scaffold a new project inside your AI IDE | MCP Server | Generates all files for Next.js, React, Remix, Gatsby |
| Decode errors inline while developing | MCP Server | get_error_explanation returns causes, retryability, and fixes |
| Integrate without additional dependencies | API | Simple HTTP, no runtime required |
Capabilities
The server ships with 21 tools and 7 prompts across four categories.Swap
Get quotes, generate signed bytecode, and track status for same-chain and cross-chain swaps
Yield
List strategies, get quotes, deposit and withdraw, check open positions and transaction history
SDK Widgets
Scaffold frontend projects, validate provider configs, check SDK compatibility, and write env files
Diagnostics
Health checks, API key validation, token listing, and error code explanations
Minimal Tool Set
These five tools cover the most common agent workflows.1. Recommend Integration Path
Analyzes your stack and recommends API Direct or SDK Widgets. Tool:recommend_integration_path
Key inputs: frontendFramework, walletProvider, backendLanguage, features
Returns: recommended path with rationale.
2. Get a Swap Quote
Request a ready-to-execute quote for a token swap. Tool:get_swap_quote
Key inputs: fromChain, toChain, fromToken, toToken, fromAmount, fromAddress
Returns: quote object with transactionRequest and expiry timestamp.
3. Get Deposit Bytecode
Generate transactions for depositing into a yield strategy. Tool:get_deposit_bytecode
Key inputs: strategyId, amount, wallet, action
Returns: ordered array of transactions to sign and broadcast.
The array may contain multiple transactions (e.g. token approval + deposit). Execute them in order.
4. Check Wallet Positions
Get all open yield positions for a wallet address. Tool:get_wallet_positions
Key inputs: wallet
Returns: positions with current value, principal, profit, and APY per strategy, plus a total balance summary.
5. Explain an Error
Decode a Deframe error code with causes, retry guidance, and resolution steps. Tool:get_error_explanation
Key inputs: errorCode
Returns: human-readable description, causes, whether it is retryable, and fix suggestions.
Pre-built Prompts
The server ships with 7 conversation starters for common integration scenarios. Invoke them by name from your AI host.| Prompt | What It Does |
|---|---|
choose_integration_path | Wizard that picks API Direct vs SDK Widgets for your stack |
troubleshoot | Diagnoses errors given a code, tx state, and description |
api_quickstart | Step-by-step guide for a given feature and language |
api_integration_wizard | Full flow: quote → bytecode → signing → status tracking |
sdk_quickstart | Fast path: scaffold → env setup → validate config |
sdk_integration_wizard | Complete SDK setup: compatibility → scaffold → validate |
sdk_migration_guide | Breaking changes and migration steps between SDK versions |
Decision Rules
API Direct vs SDK Widgets
- API Direct — your backend generates transactions and your frontend signs them with any wallet library (ethers.js, viem, wagmi)
- SDK Widgets — you want pre-built React components that handle the full swap or yield UX with built-in wallet connection
recommend_integration_path if you are unsure which path fits your stack.
Handling Swap Status
Observability
In HTTP mode, the server includes a built-in dashboard at/dashboard showing tool call counts, latency, error rates, and session quality. Events are logged to NDJSON files and can be forwarded to a central collector for aggregation across multiple instances.
Next Steps
Setup Guide
Install and configure the MCP server in your AI host
Tools Reference
Complete reference for all 21 tools and 7 prompts
Quickstart
Make your first API call in 5 minutes
API Reference
Full REST API documentation with all endpoints