
MCP for agents connection to SwapWizard.xyz API
概览
Model Context Protocol (MCP) server for the SwapWizard DeFi API. Enables AI agents to get swap quotes, manage liquidity, and discover pools across 5 EVM chains. : every tool returns router, callData, and value — the agent presents the transaction, the user signs with their own wallet. SwapWizard never holds keys. Go to swapwizard.xyz/integrators, connect your wallet, and sign a message (no gas cost). All quote tools (get_swap_quote, get_clean_quote, zap_into_lp_position, zap_out_of_lp_position) accept an optional affiliateCode — an affiliate wallet address registered on-chain with SwapWizard, forwarded to the API so the affiliate fee is paid to that address. SwapWizard is not limited to classic V2-style LPs — 13 of the 22 integrated protocols are concentrated-liquidity (CL) AMMs, with full range management: - — zap_into_lp_position accepts tickLower / tickUpper to mint a CL position in any range (omit for the protocol default).
README
以下为原文 README 节选,完整内容请查看原文。
SwapWizard MCP Server
Model Context Protocol (MCP) server for the SwapWizard DeFi API. Enables AI agents to get swap quotes, manage liquidity, and discover pools across 5 EVM chains.
Non-custodial: every tool returns router, callData, and value — the agent presents the transaction, the user signs with their own wallet. SwapWizard never holds keys.
Quick Start
1. Get an API Key
Go to swapwizard.xyz/integrators, connect your wallet, and sign a message (no gas cost).
2. Connect via MCP
Remote (no install)
URL: https://mcp.swapwizard.xyz/mcp
Transport: streamable-http
Header: X-API-Key: your-api-key
Local — Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"swapwizard": {
"command": "npx",
"args": ["-y", "@swapwizard/mcp-server"],
"env": {
"SWAPWIZARD_API_KEY": "your-api-key"
}
}
}
}
Local — Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"swapwizard": {
"command": "npx",
"args": ["-y", "@swapwizard/mcp-server"],
"env": {
"SWAPWIZARD_API_KEY": "your-api-key"
}
}
}
}
Local — Claude Code
claude mcp add swapwizard -e SWAPWIZARD_API_KEY=your-api-key -- npx -y @swapwizard/mcp-server
Available Tools
| Tool | Description |
|---|---|
get_supported_chains |
List supported EVM chains with IDs, gas tokens, DEX list, and position config |
get_supported_dexes |
AMMs/DEX sources SwapWizard routes across per chain |
check_api_health |
API availability check |
search_liquidity_pools |
Discover pools by chain, tokens, type, or GeckoTerminal trending (trending: true + optional timeframe: 5m/1h/6h/24h, default 5m). Returns poolId, symbol, fee tier, protocol, APY, TVL, 24h volume |
list_user_lp_positions |
Full LP position details: value, fees, APR, in-range status, impermanent loss |
get_swap_quote |
Best swap route across all DEXes. Returns router + callData + value ready to sign |
get_clean_quote |
Swap quote excluding the caller’s own LP position from pool state (for rebalancing) |
zap_into_lp_position |
Single-tx entry into any LP position from any token |
zap_out_of_lp_position |
Single-tx exit from any LP position into any token. Pass sender to auto-detect nftManager |
安装
npx -y @swapwizard/mcp-server配置
{
"mcpServers": {
"swapwizard": {
"command": "npx",
"args": ["-y", "@swapwizard/mcp-server"],
"env": {
"SWAPWIZARD_API_KEY": "your-api-key"
}
}
}
}