# SwapWizard [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/DeFiRe-business/swapwizard-mcp  
**GitHub Stars:** 7  
**npm Downloads (last month):** 854  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/swapwizard

## Description
DeFi execution layer for AI agents — swap, zap in/out of LP, route across AMMs on 5 EVM chains.

## Tools
Capabilities this server exposes over MCP:

- **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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "swapwizard": {
    "command": "npx",
    "args": ["-y","@swapwizard/mcp-server"],
    "env": {
      "SWAPWIZARD_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `SWAPWIZARD_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What SwapWizard does

SwapWizard exposes DeFi execution and liquidity data through MCP. Agents can inspect supported chains and DEX sources, check API availability, search for liquidity pools, review wallet LP positions, obtain swap quotes, and prepare transactions for entering or leaving LP positions.

The service covers five EVM networks: Ethereum, Arbitrum, Base, Polygon, and BNB Chain. Its routing layer can select among the DEXes available on each chain, including both classic pools and concentrated-liquidity protocols. The live chain and DEX registry is available through the discovery tools rather than being hard-coded into an agent workflow.

## How it works

A typical swap flow starts with chain discovery, followed by `get_swap_quote`. The quote includes a router address, calldata, and transaction value. An agent presents those values to the user or wallet for signing. ERC-20 inputs require an approval transaction before the swap; native-token inputs do not require that approval step.

Liquidity workflows use pool search and position inspection before preparing an operation. `search_liquidity_pools` can filter by chain, tokens, and pool type, or query GeckoTerminal trending pools using a timeframe such as 5m, 1h, 6h, or 24h. Results include pool identifiers, symbols, fee tiers, protocols, APY, TVL, and 24-hour volume.

For concentrated-liquidity positions, the agent can request a custom `tickLower` and `tickUpper` when zapping in. The returned transaction can combine token conversion, token splitting, minting, and range setup. A rebalancing flow can inspect positions, obtain a clean quote that removes the caller's own in-range liquidity from the pool state, exit the old position, and enter a new one.

## Setup and configuration

An API key is obtained through the SwapWizard integrator portal by connecting a wallet and signing a message. The local MCP package can be launched with `npx`:

```json
{
  "mcpServers": {
    "swapwizard": {
      "command": "npx",
      "args": ["-y", "@swapwizard/mcp-server"],
      "env": {
        "SWAPWIZARD_API_KEY": "your-api-key"
      }
    }
  }
}
```

This configuration is documented for Claude Desktop and Cursor. Claude Code can register the same package with `SWAPWIZARD_API_KEY`. A remote deployment is also available at `https://mcp.swapwizard.xyz/mcp` using streamable HTTP and the `X-API-Key` header.

## Tools and capabilities

- `get_supported_chains` reports chain IDs, gas tokens, DEX availability, and position configuration.
- `get_supported_dexes` lists the AMM sources used for routing on each chain.
- `check_api_health` checks API availability.
- `search_liquidity_pools` finds pools and can return trending results.
- `list_user_lp_positions` reports value, fees, APR, range status, impermanent loss, and concentrated-liquidity details such as ticks.
- `get_swap_quote` finds a route across supported DEXes.
- `get_clean_quote` quotes while excluding the caller's own LP position from pool state.
- `zap_into_lp_position` prepares a single-transaction LP entry from any token.
- `zap_out_of_lp_position` prepares a single-transaction exit into any token and can infer the NFT manager from `sender`.

All quote and zap tools accept an optional on-chain registered affiliate wallet address through `affiliateCode`.

## Limitations and notes

SwapWizard does not custody private keys. Its transaction-producing tools return data for the user's wallet to approve and sign. The available protocols and position features vary by chain, so agents should query the supported-chain and supported-DEX tools before constructing a workflow. LP operations and swaps remain subject to the underlying network, pool, approval, and transaction conditions.

_Full upstream README: https://allmcps.com/mcp/swapwizard/readme_

