Integrations
Enables token swaps on Uniswap DEX on the BNB Chain (Binance Smart Chain), supporting BNB as the native token.
Enables token swaps on Uniswap DEX on the Ethereum mainnet, with price quotes, swap execution, and trading suggestions.
Supports token swaps on Uniswap DEX on the Optimism Layer 2 network, with real-time price quotes and optimized routing.
Uniswap Trader MCP
An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.
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:Copy
- Install Dependencies:Copy
Configuration
Usage
Supported Chains
The following blockchains are supported. Ensure each chain is configured in chainConfigs.js
with a valid RPC URL, WETH address, and SwapRouter address.
Chain ID | Name | Notes |
---|---|---|
1 | Ethereum | Mainnet, widely used for Uniswap trades |
10 | Optimism | Layer 2, requires Optimism RPC |
137 | Polygon | Fast and low-cost, uses MATIC as native |
42161 | Arbitrum | Layer 2, Arbitrum One network |
42220 | Celo | Mobile-first blockchain, uses CELO |
56 | BNB Chain | Binance Smart Chain, uses BNB |
43114 | Avalanche | High-throughput, uses AVAX |
8453 | Base | Coinbase’s Layer 2, built on Optimism |
Tools and Prompts
1. getPrice
Fetches a price quote for a Uniswap swap.
Schema:
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"
)
Example prompt:
Output:
2. executeSwap
Executes a swap on Uniswap.
Schema:
chainId
: Number (default: 1)tokenIn
: StringtokenOut
: StringamountIn
: 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)
Example prompt:
Output:
License
MIT License. See LICENSE for details.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server implementation that enables access to DexScreener API data, providing real-time information on DEX pairs, token profiles, and market statistics across multiple blockchains.Last updated -76JavaScriptThe Unlicense
- -securityAlicense-qualityAn MCP server providing tools for AI agents to mint ERC-20 tokens across multiple blockchains.Last updated -69JavaScriptMIT License
- -securityAlicense-qualityAn MCP server for executing token swaps on the Solana blockchain using Jupiter's Ultra API, enabling users to fetch optimal swap orders and execute transactions with slippage control.Last updated -JavaScriptMIT License
Armor Crypto MCPofficial
AsecurityAlicenseAqualityAn MCP server providing unified access to blockchain operations, bridging, swapping, and crypto trading strategies for AI agents.Last updated -20193PythonGPL 3.0