Loading...

An MCP server enabling AI agents to fetch price quotes and execute token swaps on Uniswap across multiple blockchains, supporting various chains.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
An MCP server enabling AI agents to fetch price quotes and execute token swaps on Uniswap across multiple blockchains, supporting various chains.
This MCP server allows for automated token swaps, which carries inherent financial risk. It's relatively safe for read-only operations like fetching price quotes. However, executing swaps requires careful configuration and monitoring to mitigate potential losses due to slippage, front-running, or misconfiguration. Securely managing the wallet private key is paramount.
Performance depends on blockchain congestion and RPC endpoint latency. Multi-hop routes may increase execution time. Consider using faster RPC providers for time-sensitive trades.
Cost includes gas fees for executing swaps and potential fees from RPC providers. Multi-hop routes increase gas costs. Optimize slippage tolerance to balance cost and execution probability.
npx -y @smithery/cli install @kukapay/uniswap-trader-mcp --client claude{
"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"
}
}
}
}getPriceFetches a price quote for a Uniswap swap, providing estimated input and output amounts.
Read-only operation; no state changes.
executeSwapExecutes a token swap on Uniswap with specified parameters like slippage tolerance and deadline.
Executes financial transactions, potentially leading to loss of funds.
Environment Variable
This MCP server allows for automated token swaps, which carries inherent financial risk. It's relatively safe for read-only operations like fetching price quotes. However, executing swaps requires careful configuration and monitoring to mitigate potential losses due to slippage, front-running, or misconfiguration. Securely managing the wallet private key is paramount.
Autonomy requires careful consideration due to the financial risks associated with automated token swaps. Implement robust monitoring and error handling to prevent unintended consequences.
Production Tip
Implement robust monitoring of swap execution, including slippage, gas costs, and error rates. Set up alerts for unexpected behavior.
Ethereum, Optimism, Polygon, Arbitrum, Celo, BNB Chain, Avalanche, and Base.
Use a hardware wallet or a secure key management system. Never commit your private key to version control or share it with anyone.
Slippage tolerance is the maximum percentage you're willing to accept in price movement during a swap. A lower tolerance reduces the chance of a failed transaction but may increase the cost.
The transaction will revert, and you will only lose the gas fees. Implement retry logic to handle temporary network issues.
Set the RPC URLs in the `chainConfigs.js` file for each supported chain.
The current configuration supports a single wallet defined by the `WALLET_PRIVATE_KEY` environment variable. You would need to modify the code to support multiple wallets.
Monitor transaction hashes, gas usage, and slippage. Consider integrating with a blockchain explorer or analytics platform.