MCP Directory

How to add Uniswap Trader MCP to Cursor

Automate token swaps on Uniswap DEX across multiple blockchains for AI agents. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 37 · stdio · apikey

Cursor config for Uniswap Trader MCP

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

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Uniswap Trader MCP config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Uniswap Trader MCP's tools to confirm it's connected.

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

What Uniswap Trader MCP can do in Cursor

getPrice

Fetches 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.

executeSwap

Executes 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.

Security

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Uniswap Trader MCP config there under the "mcpServers" key and restart the client.

Is Uniswap Trader MCP safe to use with Cursor?

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.

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.

View repo Full Uniswap Trader MCP page