Uniswap Trader MCP
Features
- **Price Quotes**: Get real-time price quotes for token swaps with multi-hop route optimization.
- **Swap Execution**: Execute swaps on Uniswap V3 with configurable slippage tolerance and deadlines.
- **Swap Suggestions**: Generate trading suggestions based on liquidity, fees, and optimal paths.
- **Multi-Chain Support**: Compatible with Ethereum, Optimism, Polygon, Arbitrum, Celo, BNB Chain, Avalanche, and Base.
Prerequisites
- **Node.js**: Version 14.x or higher.
- **npm**: For package management.
- **Wallet**: A funded wallet with a private key for executing swaps.
- **RPC Endpoints**: Access to blockchain RPC URLs (e.g., Infura, Alchemy) for supported chains.
Installation
- **Clone the Repository**: ```bash git clone https://github.com/kukapay/uniswap-trader-mcp.git cd uniswap-trader-mcp ```
- **Install Dependencies**: ```bash npm install ```
Configuration
Usage
Supported Chains
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
[object Object] | [object Object] | [object Object] |
Tools and Prompts
1. `getPrice`
- `chainId`: Number (default: 1)
- `tokenIn`: String (e.g., `"NATIVE"` or token address)
- `tokenOut`: String (e.g., `"NATIVE"` or token address)
- `amountIn`: String (optional, required for `"exactIn"`)
- `amountOut`: String (optional, required for `"exactOut"`)
- `tradeType`: `"exactIn"` or `"exactOut"` (default: `"exactIn"`)
2. `executeSwap`
- `chainId`: Number (default: 1)
- `tokenIn`: String
- `tokenOut`: String
- `amountIn`: String (optional, required for `"exactIn"`)
- `amountOut`: String (optional, required for `"exactOut"`)
- `tradeType`: `"exactIn"` or `"exactOut"` (default: `"exactIn"`)
- `slippageTolerance`: Number (default: 0.5, in percentage)
- `deadline`: Number (default: 20, in minutes)