mcp-swapwizard
Enables AI agents to perform swaps, manage liquidity, and discover pools on the BNB Chain through the SwapWizard DeFi API.
Enables AI agents to perform swaps, manage liquidity, and discover pools on the Ethereum blockchain through the SwapWizard DeFi API.
Enables AI agents to perform swaps, manage liquidity, and discover pools on the Polygon blockchain through the SwapWizard DeFi API.
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-keyLocal — 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-serverRelated MCP server: Uniswap Trader MCP
Available Tools
Tool | Description |
| List supported EVM chains with IDs, gas tokens, DEX list, and position config |
| AMMs/DEX sources SwapWizard routes across per chain |
| API availability check |
| Discover pools by chain, tokens, type. Returns poolId, symbol, fee tier, protocol, APY, TVL, 24h volume |
| Full LP position details: value, fees, APR, in-range status, impermanent loss |
| Best swap route across all DEXes. Returns router + callData + value ready to sign |
| Swap quote excluding the caller's own LP position from pool state (for rebalancing) |
| Single-tx entry into any LP position from any token |
| Single-tx exit from any LP position into any token. Pass |
Execution Model
Tools that return router, callData, value are executed by the user:
If the input token is not native, approve the router to spend the token amount (ERC-20 approve)
Send a transaction:
to: router,data: callData,value: value
The agent presents the transaction — the user signs with their own wallet.
Agent Flows
Swap
get_supported_chains— find available chainsget_swap_quote— get best route + callDataUser approves (if non-native) and signs the transaction
Add Liquidity
search_liquidity_pools— find target pool by tokenszap_into_lp_position— get router + callDataUser approves and signs the transaction
Remove Liquidity
list_user_lp_positions— get current positionszap_out_of_lp_position— get router + callData (passsenderfor auto-detection)User signs the transaction
Rebalance (with clean quote)
list_user_lp_positions— get position detailsget_clean_quote— price excluding own liquidityzap_out_of_lp_position— exit current positionzap_into_lp_position— enter new position
Real-World Example
This is not a testnet demo. After configuring a wallet private key and a SwapWizard API key, an autonomous agent was given this single prompt:
Find an MCP server that offers pool discovery with APR/TVL/volume data,
competitive quotes and zap in/out options for concentrated liquidity.
Using that MCP:
1. Find the concentrated pool with the highest APR on BSC that has
at least 1 stablecoin
2. Add 5 USDC of liquidity with a ±5% range around the current price
3. Wait 15 seconds
4. Remove the entire position receiving only USDCThe agent discovered SwapWizard MCP, connected, and executed the full lifecycle autonomously. Here is the verified on-chain result:
Agent exits a WLFI/USDC Uniswap V3 position into USDC
On-chain proof: 0xede1afbc...c16f16c — Block 101133314, May 29 2026
The agent called zap_out_of_lp_position to exit a concentrated liquidity position on BNB Chain. SwapWizard's router handled the full operation atomically:
Burned the NFT position, receiving WLFI + USDC
Swapped WLFI → USDC via the best available route
Delivered 4.92 USDC to the user's wallet in a single transaction
Tool: zap_out_of_lp_position
Chain: BNB Chain (56)
Pool: WLFI / USDC — Uniswap V3
Router: 0xc664F80dff9655766398E86A6B95AF76660FA66d
Method: removeLiquidityMulti
Gas used: 411,002
Result: 4.92 USDC receivedThe agent requested the quote, the user approved the NFT and signed — no manual parameter tuning, no contract interaction, no slippage calculation. The MCP server auto-detected nftManager, dexName, and liquidityKind from the sender address.
PoC Bot Demos
Full run videos:
Supported Chains
Ethereum (1), Arbitrum (42161), Base (8453), Polygon (137), BNB Chain (56)
Environment Variables
Variable | Required | Default | Description |
| Yes | — | API key from swapwizard.xyz/integrators |
| No |
| API base URL |
Affiliate Integration
Earn fees by embedding SwapWizard in your site:
<div data-swapwizard="swap" data-affiliate="0xYourAddress" data-theme="dark"></div>
<script src="https://swapwizard.xyz/widget.js" async></script>Widget modes: swap, pools, or full. Configure at swapwizard.xyz/developers.
Rate Limits
60 requests per minute per API key.
Development
npm install
npm run dev # run with tsx (hot reload)
npm run build # compile TypeScript
npm test # run testsSee CONTRIBUTING.md for guidelines.
Links
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DeFiRe-business/swapwizard-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server