home / mcp / uniswap tr adr mcp server

Uniswap Tr adr MCP Server

Provides multi-chain Uniswap quotes and swap actions for AI agents with real-time routing and slippage control.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "catwhisperingninja-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"
      }
    }
  }
}

You are deploying a modular MCP server that lets AI agents fetch real-time Uniswap price quotes and execute token swaps across multiple chains. It provides practical trade planning, route optimization, slippage control, and multi-chain support, enabling automated trading workflows with your funded wallet.

How to use

You interact with the Uniswap Trader MCP server through an MCP client by asking it to fetch price quotes or to perform swaps. Common workflows include asking for a price quote for a desired token pair and amount, then proceeding to execute a swap when the quote meets your criteria. You can specify the chain, input token, output token, and trade type. The server returns the estimated route, input/output amounts, fees, and gas estimates. When you are ready to swap, request the executeSwap action with the chain, tokens, amount, and your preferred slippage tolerance and deadline.

How to install

# Prerequisites
node --version
npm --version
# Ensure Node.js 14+ and npm are installed

# Optional: install via Smithery for automatic client integration
npx -y @smithery/cli install @kukapay/uniswap-trader-mcp --client claude

# Manual installation
git clone https://github.com/kukapay/uniswap-trader-mcp.git
cd uniswap-trader-mcp
npm install

# Configuration can be added in a separate mcpServers config block (see next section)
```

```bash
# Example configuration block you would place in your MCP config file
{
  "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"
      }
    }
  }
}

Additional configuration and notes

Prerequisites include a funded wallet with a private key and access to blockchain RPC URLs for the supported chains. The server runs the Uniswap Trader MCP logic via Node.js and expects environment variables for RPC access and wallet signing. You will typically configure a local or remote MCP command that starts the server process, usually in a server/index.js path, with the required environment values.

Supported chains include Ethereum mainnet, Optimism, Polygon, Arbitrum, Celo, BNB Chain, Avalanche, and Base. For each chain you plan to use, ensure you have valid RPC URLs, the WETH contract address, and the SwapRouter address configured in your chain setup.

Security tip: protect your wallet private key and any RPC keys. Use environment variables or a secure secrets manager to avoid exposing credentials in logs or code.

Examples of common workflows

1) Get a price quote for a swap across a specific chain, then decide whether to execute a swap based on price, route, and slippage.

2) Execute a swap with a defined slippage tolerance and a deadline to prevent unfavorable market moves, while receiving route details and gas estimates in the response.

3) Generate swap suggestions by evaluating liquidity, fees, and path optimization to identify favorable routes before committing to a trade.

License

MIT License. See LICENSE for details.

Available tools

getPrice

Fetches a real-time price quote for a Uniswap swap, with multi-hop route information and gas estimates.

executeSwap

Executes a Uniswap swap on the specified chain, applying slippage tolerance and a deadline, and returns the swap transaction details.