1. Conduid
  2. Blockchain
  3. Uniswap MCP Server Rust
MCP server · Blockchain

Uniswap MCP Server Rust

Interacting with the Uniswap API in Rust

Unclaimed last commit 6 months ago blockchain
34Low

Scored 6 months ago · breakdown

About Uniswap MCP Server Rust

Uniswap MCP Server Rust is an MCP server published by CJ42 in the Blockchain category: interacting with the Uniswap API in Rust.

The repository has 1 stars and 0 forks, with the last commit 6 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/CJ42/uniswap-mcp-server-rust

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Uniswap MCP Server Rust

Powered by Claude · Grounded in docs

I know everything about Uniswap MCP Server Rust. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

🦄 Uniswap MCP Server Rust 🦀

Cover image

An MCP (Model Context Protocol) server in Rust that exposes Uniswap Trade API quotes as a tool for AI clients. Built with the official Rust SDK RMCP (rmcp on crates.io).

Prerequisites

  • Rust toolchain (cargo, rustc)
  • A Uniswap Trade API key as UNISWAP_API_KEY (see Uniswap docs)

Configuration

Create a .env file next to Cargo.toml (or export the variable in your shell):

UNISWAP_API_KEY=your_key_here

The server loads .env at startup using the crate manifest directory, so it works when MCP hosts run the binary from another working directory.

Build

cargo build --release

How it works

  • Transport: stdio (standard for local MCP: the host spawns this process and speaks JSON-RPC over stdin/stdout).
  • SDK: rmcp with server + transport-io.
  • Tool: uniswap_swap_quote — calls POST https://trade-api.gateway.uniswap.org/v1/quote with your API key and returns the JSON quote (pretty-printed text). Use token_in_preset to pick the asset you sell on Ethereum mainnet without typing addresses: native_eth, usdc, usdt, wbtc, dai, weth. If you set a preset, it overrides token_in; otherwise pass a full token_in address.

Async runtime: Tokio (required by RMCP and reqwest).

Using with an MCP client

Point your MCP host at the compiled binary. Example for Cursor (.cursor/mcp.json or global MCP settings):

{
  "mcpServers": {
    "uniswap": {
      "command": "/absolute/path/to/uniswap-api-rust/target/release/uniswap-mcp-server-rust",
      "env": {
        "UNISWAP_API_KEY": "your_key_here"
      }
    }
  }
}

You can omit env if UNISWAP_API_KEY is already in the environment.

To debug with the official inspector (see RMCP examples):

npx @modelcontextprotocol/inspector /absolute/path/to/target/debug/uniswap-mcp-server-rust

Example to test

Run the commands from the previous section and open the MCP Inspector in your browser.

  1. Enter the following values as example
"tokenIn": "0x0000000000000000000000000000000000000000", // ETH
"tokenOut": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT
"tokenInChainId": 1,
"tokenOutChainId": 1,
"type": "EXACT_INPUT",
"amount": "1000000000000000000", // 1 ETH in wei
"swapper": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", // User's wallet address (vitalik.eth)
  1. Click on the "Run Tool" button

Learning steps

  • MCP server over stdio with RMCP
  • Async quote tool via Uniswap Trade API
  • Make it I can enter different commands while it is running (start, stop, unicorns)
  • Try to use functionalities from the allow web3 library for Rust.
  • Extend with more tools (e.g. supported chains, token metadata)

License

See LICENSE in the repository.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Uniswap MCP Server Rust

How do I install Uniswap MCP Server Rust?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Uniswap MCP Server Rust safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Uniswap MCP Server Rust still maintained?

The last commit was 6 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.