# Uniswap Universal Router Decoder

Uniswap Universal Router Decoder — an MCP server to decode and encode Uniswap Universal Router calldata. Operates purely in read-only mode without signing transactions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 277 repo stars
- Author: Elnaril
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Elnaril/uniswap-universal-router-decoder
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/uniswap-universal-router-decoder

## What it does

The server inspects calldata targeted at Uniswap Universal Router contracts on Ethereum and compatible networks. It translates raw input bytes into readable JSON structures and reconstructs raw payload bytes directly from decoded parameter representations.

Every tool exposed by the server carries read-only annotations, allowing agents to execute lookups without approval prompts. Not every router command supports calldata reconstruction via MCP: tools flag supported entries with a rebuildable property before attempting encoding.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `RPC_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env RPC_URL=<RPC_URL> --transport stdio uniswap-universal-router-decoder -- uvx uniswap-universal-router-decoder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from uniswap-universal-router-decoder <command>

### Codex

**Platform CLI**
```bash
codex mcp add uniswap-universal-router-decoder --env RPC_URL=<RPC_URL> -- uvx uniswap-universal-router-decoder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from uniswap-universal-router-decoder <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "uniswap-universal-router-decoder": {
            "command": "uvx",
            "args": [
                "uniswap-universal-router-decoder"
            ],
            "env": {
                "RPC_URL": "<RPC_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from uniswap-universal-router-decoder <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "uniswap-universal-router-decoder": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "uniswap-universal-router-decoder"
            ],
            "env": {
                "RPC_URL": "<RPC_URL>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from uniswap-universal-router-decoder <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e RPC_URL=<RPC_URL> uniswap-universal-router-decoder uvx uniswap-universal-router-decoder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from uniswap-universal-router-decoder <command>

## When to use it
- decode complex Uniswap Universal Router transactions into plain JSON
- reconstruct raw calldata payloads directly from decoded parameters
- encode Uniswap V3 swap paths using encode_v3_path

## Example prompts
- Decode this Universal Router transaction input: 0x...
- List all supported router commands and their schemas using list_commands
- Encode a V3 swap path for the given token addresses and fee tiers

## Similar
- [grimoire-uniswap](https://affpapa.org/en/nevibecode/skills/grimoire-uniswap.md) — skill · 1100 installs
- [uniswap-ai](https://affpapa.org/en/nevibecode/skills/uniswap-ai.md) — skill · 138 installs
- [defi-skills](https://affpapa.org/en/nevibecode/plugins/defi-skills.md) — plugin · ★ 17 repo stars
- [uniswap-monitor-teneo](https://affpapa.org/en/nevibecode/skills/uniswap-monitor-teneo.md) — skill · 516 installs
- [teardrop](https://affpapa.org/en/nevibecode/mcp/teardrop.md) — MCP server · 1012 installs
- [liquidity-planner](https://affpapa.org/en/nevibecode/skills/liquidity-planner.md) — skill · 1300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
