Back to Catalog

uniswap-trader-mcp

kukapay/uniswap-trader-mcp
🔗 Latest commit:b743a9d
🕒 Updated:Sep 9, 2025, 01:06 PM
JavaScript
Finance

An MCP server for AI agents to automate token swaps on Uniswap DEX across multiple blockchains.

MCP Trust Score
Based on our comprehensive evaluation criteria
🤖 Evaluated by gemini-2.5-flashFix
Trust Score45/100
GitHub Metrics
Repository statistics and activity
⭐ GitHub Stars:26
👥 Contributors:2
📋 Total Issues:2
📦 Has Releases:No
🔧 Has CI/CD Pipeline:No
Configuration
Configuration example extracted from README.md for Claude Desktop and other clients.
🤖 Evaluated by gemini-2.5-flashFix
{
  "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"
    }
  }
}
MCP Protocol Support
Implemented MCP protocol features
🤖 Evaluated by gemini-2.5-flashFix
Tools:
Prompts:
Resources:
Sampling:
Roots:
Logging:
STDIO Transport:
HTTP Transport:
OAuth2 Auth:
Dependencies
7 dependencies
Libraries and frameworks used by this MCP server
🤖 Evaluated by gemini-2.5-flashFix
Add Quality Badge
Show your MCP trust score in your README
Trust Score Badge
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/kukapay/uniswap-trader-mcp)](https://archestra.ai/mcp-catalog/kukapay__uniswap-trader-mcp)
README.md

Uniswap Trader MCP

smithery badge

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

Installing via Smithery

To install Uniswap Trader MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @kukapay/uniswap-trader-mcp --client claude

Manual Installation

  1. Clone the Repository:

    git clone https://github.com/kukapay/uniswap-trader-mcp.git
    cd uniswap-trader-mcp
    
  2. Install Dependencies:

    npm install
    

Configuration

{
  "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"
      }
    }
  }
}

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 IDNameNotes
1EthereumMainnet, widely used for Uniswap trades
10OptimismLayer 2, requires Optimism RPC
137PolygonFast and low-cost, uses MATIC as native
42161ArbitrumLayer 2, Arbitrum One network
42220CeloMobile-first blockchain, uses CELO
56BNB ChainBinance Smart Chain, uses BNB
43114AvalancheHigh-throughput, uses AVAX
8453BaseCoinbase’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:

Get me a price quote for swapping 1 ETH to DAI on Ethereum.

Output:

{
  "chainId": 1,
  "tradeType": "exactIn",
  "price": "3000.50",
  "inputAmount": "1.000000",
  "outputAmount": "3000.50",
  "minimumReceived": "2985.50",
  "maximumInput": "1.005000",
  "route": [
    {
      "tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "tokenOut": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
      "fee": 3000
    }
  ],
  "estimatedGas": "150000"
}

2. executeSwap

Executes a swap on Uniswap.

Schema:

  • chainId: Number (default: 1)
  • tokenIn: String
  • tokenOut: String
  • amountIn: 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:

Swap 1 ETH for DAI on Ethereum with a 0.5% slippage tolerance and a 20-minute deadline.

Output:

{
  "chainId": 1,
  "txHash": "0x1234...abcd",
  "tradeType": "exactIn",
  "amountIn": "1.000000",
  "outputAmount": "2990.75",
  "minimumReceived": "2985.50",
  "maximumInput": "1.005000",
  "fromToken": "NATIVE",
  "toToken": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
  "route": [
    {
      "tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "tokenOut": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
      "fee": 3000
    }
  ],
  "gasUsed": "145000"
}

License

MIT License. See LICENSE for details.

uniswap-trader-mcp MCP Server | Documentation & Integration | Archestra