
Uniswap Trader MCP
Automate token swaps on Uniswap DEX across multiple blockchains for AI agents.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @smithery/cli install @kukapay/uniswap-trader-mcp --client claudePaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"uniswap-trader-mcp": {
"command": "node",
"args": [
"path/to/uniswap-trader-mcp/server/index.js"
],
"env": {
"INFURA_KEY": "your infura key",
"WALLET_PRIVATE_KEY": "your private key"
}
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js version 14.x or higher
- npm for package management
- A funded wallet with a private key for executing swaps
- Access to blockchain RPC URLs (e.g., Infura, Alchemy) for supported chains
About Uniswap Trader MCP
An MCP server for AI agents to automate token swaps on the Uniswap DEX across multiple blockchains. It provides real-time price quotes with multi-hop route optimization and executes swaps on Uniswap V3 with configurable slippage tolerance and deadlines. Supported chains include Ethereum, Optimism, Polygon, Arbitrum, Celo, BNB Chain, Avalanche, and Base.
Tools & capabilities (2)
getPriceFetches a real-time price quote for a Uniswap swap. Accepts chainId, tokenIn, tokenOut, amountIn/amountOut, and tradeType (exactIn or exactOut), and returns the price, input/output amounts, minimum received, maximum input, the multi-hop route, and an estimated gas cost.
executeSwapExecutes a swap on Uniswap. Accepts chainId, tokenIn, tokenOut, amountIn/amountOut, tradeType, slippageTolerance (default 0.5%), and deadline (default 20 minutes), and returns the transaction hash along with the amounts, route, and gas used.
When to use it
- Let an AI agent get a live price quote for swapping one token to another on Uniswap
- Automate on-chain token swaps with configurable slippage and deadlines
- Trade across multiple chains (Ethereum, Polygon, Arbitrum, Base, and more) from a single agent
- Generate trading suggestions based on liquidity, fees, and optimal swap paths
Security notes
Requires a funded wallet private key (WALLET_PRIVATE_KEY) and an RPC API key (INFURA_KEY) to be set as environment variables. The executeSwap tool performs real on-chain transactions that move funds, so the configured wallet should hold only what you are willing to risk. Never commit or expose the private key.
Uniswap Trader MCP FAQ
Which blockchains are supported?
Ethereum (1), Optimism (10), Polygon (137), Arbitrum (42161), Celo (42220), BNB Chain (56), Avalanche (43114), and Base (8453). Each chain must be configured in chainConfigs.js with a valid RPC URL, WETH address, and SwapRouter address.
What credentials does the server need?
It needs an INFURA_KEY for RPC access and a WALLET_PRIVATE_KEY for a funded wallet, both set as environment variables in the MCP server configuration.
Does it actually move real funds?
Yes. The executeSwap tool submits real transactions on-chain using the configured wallet, so only fund the wallet with what you are willing to trade or risk.
Alternatives to Uniswap Trader MCP
Compare all alternatives →Official Stripe server for payments, customers, subscriptions, invoices, and billing via natural language.
Coinbase's AgentKit MCP extension for onchain actions: transfers, swaps, and contract calls.
Alpaca's official trading server for stocks, ETFs, options, and crypto in plain English.
Compare Uniswap Trader MCP with: