Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Uniswap Universal Router Decoder

MCP server by Elnaril Community

Decodes and encodes Uniswap Universal Router calldata for V2, V3 and V4 on Ethereum. Offers a Python library, ur-decode and ur-encode CLI tools, and an optional ur-mcp server for AI agents. Built for developers who know web3.py.

  • Score 82
  • 277 stars
  • MIT
  • Updated

Install Uniswap Universal Router Decoder

Built from the published package, never by AI.

claude mcp add uniswap-universal-router-decoder -- uvx uniswap-universal-router-decoder

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Uniswap Universal Router Decoder in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the uniswap-universal-router-decoder block.

About

The Uniswap Universal Router Decoder is a Python library that decodes and encodes transactions sent to the Uniswap Universal Router (UR) on Ethereum Mainnet. It is based on web3.py and maps UR versions from v1 to v2.1.2 to SDK releases. The source says it would also work on other compatible chains where the UR is deployed.

The same codec is available without Python through the ur-decode and ur-encode command line tools, which print JSON. An optional ur-mcp MCP server lets AI agents drive the codec, including rebuilding calldata from a decoded call. The project targets Python developers who are familiar with Ethereum, web3.py and how DEXes work.

Written from the project's README and checked against it.

Tools it gives your assistant

  • list_commandsLists the supported Universal Router commands.
  • describe_commandDescribes the decoded call format and ABI parameters of a command.
  • encode_calldataRebuilds the calldata from a decoded call.
  • encode_v3_pathEncodes a V3 swap path.

What you need

  • Python
  • web3.py
  • Optional mcp extra to run the ur-mcp server
SettingNeededWhat it is
RPC_URLEnvironment variableOptionalEthereum RPC endpoint. Optional: only decode_transaction needs it.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • List the Universal Router commands this codec supports
  • Describe the ABI parameters for a Universal Router command
  • Rebuild the calldata from this decoded Universal Router call

Good to know

  • Read-only: it never signs or sends transactions.
  • V4_SWAP, V4_POSITION_MANAGER_CALL and EXECUTE_SUB_PLAN can be decoded but not rebuilt.
  • ACROSS_V4_DEPOSIT_V3 is not supported.
  • Not all supported functions are available through the CLI or MCP tools.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Uniswap Universal Router Decoder

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

Uniswap Universal Router Decoder: common questions

Which Universal Router versions does it cover?

The README maps UR versions v1, v2, v2.1.1 and v2.1.2 to SDK versions. It covers commands for V2, V3 and V4 swaps and related functions.

Does it sign or send transactions?

No. The declared description says it is read-only and never signs or sends, and the MCP tools are annotated as read-only.

Can every decoded call be rebuilt?

No. V4_SWAP, V4_POSITION_MANAGER_CALL and EXECUTE_SUB_PLAN can be decoded but cannot be rebuilt from a decoded call.

How do I install Uniswap Universal Router Decoder?

In Claude Code run claude mcp add uniswap-universal-router-decoder -- uvx uniswap-universal-router-decoder. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Uniswap Universal Router Decoder the official server?

Uniswap Universal Router Decoder is a community project by Elnaril, not verified by a company domain.

Is Uniswap Universal Router Decoder free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Uniswap Universal Router Decoder safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Uniswap Universal Router Decoder?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does Uniswap Universal Router Decoder work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Uniswap Universal Router Decoder Install

Add to stack

Loading.