An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains. - 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 Supp
Add this skill
npx mdskills install kukapay/uniswap-trader-mcpWell-documented multi-chain Uniswap integration with clear tool schemas and examples
1# Uniswap Trader MCP2[](https://smithery.ai/server/@kukapay/uniswap-trader-mcp)34An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.56## Features7- **Price Quotes**: Get real-time price quotes for token swaps with multi-hop route optimization.8- **Swap Execution**: Execute swaps on Uniswap V3 with configurable slippage tolerance and deadlines.9- **Swap Suggestions**: Generate trading suggestions based on liquidity, fees, and optimal paths.10- **Multi-Chain Support**: Compatible with Ethereum, Optimism, Polygon, Arbitrum, Celo, BNB Chain, Avalanche, and Base.1112## Prerequisites13- **Node.js**: Version 14.x or higher.14- **npm**: For package management.15- **Wallet**: A funded wallet with a private key for executing swaps.16- **RPC Endpoints**: Access to blockchain RPC URLs (e.g., Infura, Alchemy) for supported chains.1718## Installation1920### Installing via Smithery2122To install Uniswap Trader MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@kukapay/uniswap-trader-mcp):2324```bash25npx -y @smithery/cli install @kukapay/uniswap-trader-mcp --client claude26```2728### Manual Installation291. **Clone the Repository**:30 ```bash31 git clone https://github.com/kukapay/uniswap-trader-mcp.git32 cd uniswap-trader-mcp33 ```34352. **Install Dependencies**:36 ```bash37 npm install38 ```3940## Configuration4142```json43{44 "mcpServers": {45 "Uniswap-Trader-MCP": {46 "command": "node",47 "args": ["path/to/uniswap-trader-mcp/server/index.js"],48 "env": {49 "INFURA_KEY": "your infura key",50 "WALLET_PRIVATE_KEY": "your private key"51 }52 }53 }54}55```56## Usage5758### Supported Chains59The following blockchains are supported. Ensure each chain is configured in `chainConfigs.js` with a valid RPC URL, WETH address, and SwapRouter address.6061| Chain ID | Name | Notes |62|----------|--------------|--------------------------------------------|63| 1 | Ethereum | Mainnet, widely used for Uniswap trades |64| 10 | Optimism | Layer 2, requires Optimism RPC |65| 137 | Polygon | Fast and low-cost, uses MATIC as native |66| 42161 | Arbitrum | Layer 2, Arbitrum One network |67| 42220 | Celo | Mobile-first blockchain, uses CELO |68| 56 | BNB Chain | Binance Smart Chain, uses BNB |69| 43114 | Avalanche | High-throughput, uses AVAX |70| 8453 | Base | Coinbase’s Layer 2, built on Optimism |717273### Tools and Prompts7475#### 1. `getPrice`76Fetches a price quote for a Uniswap swap.7778**Schema**:79- `chainId`: Number (default: 1)80- `tokenIn`: String (e.g., `"NATIVE"` or token address)81- `tokenOut`: String (e.g., `"NATIVE"` or token address)82- `amountIn`: String (optional, required for `"exactIn"`)83- `amountOut`: String (optional, required for `"exactOut"`)84- `tradeType`: `"exactIn"` or `"exactOut"` (default: `"exactIn"`)8586Example prompt:8788```89Get me a price quote for swapping 1 ETH to DAI on Ethereum.90```9192Output:9394```95{96 "chainId": 1,97 "tradeType": "exactIn",98 "price": "3000.50",99 "inputAmount": "1.000000",100 "outputAmount": "3000.50",101 "minimumReceived": "2985.50",102 "maximumInput": "1.005000",103 "route": [104 {105 "tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",106 "tokenOut": "0x6B175474E89094C44Da98b954EedeAC495271d0F",107 "fee": 3000108 }109 ],110 "estimatedGas": "150000"111}112```113114#### 2. `executeSwap`115Executes a swap on Uniswap.116117**Schema**:118- `chainId`: Number (default: 1)119- `tokenIn`: String120- `tokenOut`: String121- `amountIn`: String (optional, required for `"exactIn"`)122- `amountOut`: String (optional, required for `"exactOut"`)123- `tradeType`: `"exactIn"` or `"exactOut"` (default: `"exactIn"`)124- `slippageTolerance`: Number (default: 0.5, in percentage)125- `deadline`: Number (default: 20, in minutes)126127Example prompt:128129```130Swap 1 ETH for DAI on Ethereum with a 0.5% slippage tolerance and a 20-minute deadline.131```132133Output:134135```136{137 "chainId": 1,138 "txHash": "0x1234...abcd",139 "tradeType": "exactIn",140 "amountIn": "1.000000",141 "outputAmount": "2990.75",142 "minimumReceived": "2985.50",143 "maximumInput": "1.005000",144 "fromToken": "NATIVE",145 "toToken": "0x6B175474E89094C44Da98b954EedeAC495271d0F",146 "route": [147 {148 "tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",149 "tokenOut": "0x6B175474E89094C44Da98b954EedeAC495271d0F",150 "fee": 3000151 }152 ],153 "gasUsed": "145000"154}155```156157## License158MIT License. See [LICENSE](LICENSE) for details.159
Full transparency — inspect the skill content before installing.