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.
Install Uniswap Universal Router Decoder
Built from the published package, never by AI.
claude mcp add uniswap-universal-router-decoder -- uvx uniswap-universal-router-decoderRun in your terminal. Add --scope user to use it in every project.
Step-by-step: install Uniswap Universal Router Decoder in Claude Code
{
"mcpServers": {
"uniswap-universal-router-decoder": {
"args": [
"uniswap-universal-router-decoder"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install Uniswap Universal Router Decoder in Claude Desktop
{
"mcpServers": {
"uniswap-universal-router-decoder": {
"args": [
"uniswap-universal-router-decoder"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
Step-by-step: install Uniswap Universal Router Decoder in Cursor
{
"servers": {
"uniswap-universal-router-decoder": {
"args": [
"uniswap-universal-router-decoder"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
Step-by-step: install Uniswap Universal Router Decoder in VS Code
codex mcp add uniswap-universal-router-decoder -- uvx uniswap-universal-router-decoderStep-by-step: install Uniswap Universal Router Decoder in Codex
{
"mcpServers": {
"uniswap-universal-router-decoder": {
"args": [
"uniswap-universal-router-decoder"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install Uniswap Universal Router Decoder in Antigravity CLI
gemini mcp add uniswap-universal-router-decoder uvx uniswap-universal-router-decoderGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
Step-by-step: install Uniswap Universal Router Decoder in Gemini CLI
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
| Setting | Needed | What it is |
|---|---|---|
RPC_Environment variable | Optional | Ethereum 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
ANo 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 →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
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.
