原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Uniswap Universal Router Decoder

作者:Elnaril版本 4.0.0i★ –i在你的电脑上运行
注册名称io.github.Elnaril/uniswap-universal-router-decoder

安装

概览

作者提供的说明(英文原文)

Decode and encode Uniswap Universal Router calldata (V2, V3, V4). Read-only: never signs or sends.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "uniswap-universal-router-decoder": {
      "command": "uvx",
      "args": [
        "uniswap-universal-router-decoder"
      ],
      "env": {
        "RPC_URL": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add uniswap-universal-router-decoder --env RPC_URL=your-value -- uvx uniswap-universal-router-decoder

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "uniswap-universal-router-decoder": {
      "command": "uvx",
      "args": [
        "uniswap-universal-router-decoder"
      ],
      "env": {
        "RPC_URL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "uniswap-universal-router-decoder": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "uniswap-universal-router-decoder"
      ],
      "env": {
        "RPC_URL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • RPC_URL env
    Ethereum RPC endpoint. Optional: only decode_transaction needs it.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 Elnaril 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32712 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32712 个服务器的 79% 更新
  • 基础检查结果等于或优于此分类中其他 32712 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Uniswap Universal Router Decoder 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(4.0.0)于9天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Aiterm MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211前天更新
安装

Aiterm MCP

作者:kitepon

Persistent terminals and one launcher for Claude, Codex, Grok, Cursor, and Antigravity harnesses.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Uniswap Universal Router Decoder & Encoder

Many thanks to everyone who has ☕️ offered some coffees! ☕️

or ⭐ starred this project! ⭐

It is greatly appreciated! :)



Project Information
Code Quality

Release Notes

See the release notes page

v4.0.0 - breaking changes
  • Update COMMAND_TYPE_MASK to 0x7f to match UR
  • Add support for the PAY_PORTION_FULL_PRECISION command (0x07)
  • Add support for the BALANCE_CHECK_ERC20 command (0x0e)
  • Add support for the V3_POSITION_MANAGER_PERMIT command (0x11)
  • Add support for the V3_POSITION_MANAGER_CALL command (0x12)
  • Add support for the EXECUTE_SUB_PLAN command (0x21)
  • Add revert_on_fail to the encoder methods for the commands whose failure the UR can tolerate
  • Capture the bytes some callers append after the UR arguments as trailing_data, and re-append them when rebuilding the calldata, so a decoded call can be rebuilt byte-for-byte
  • Make the chained function builders public and expose the encoder & decoder modules
  • Reduce CI time
  • Add a publish.yml GitHub Actions workflow that automatically publishes the package to PyPI and the MCP Registry with OIDC Trusted Publishing
  • Agent-friendly changes:
  • Add Encoder.function_input() / AsyncEncoder.function_input() to rebuild the calldata from a decoded call
  • Add decoded_input_to_dict() and transaction_to_dict() to render the decoder output as JSON-friendly dicts
  • Add the ur-decode and ur-encode command line tools, including ur-encode v3-path and its encode_v3_path MCP counterpart
  • Add the ur-mcp MCP server (optional mcp extra) so AI agents can drive the codec, including encode_calldata to rebuild the calldata from a decoded call
  • Annotate the MCP tools as read-only so a host can auto-approve them, and give them human-readable titles
  • The command descriptions (ur-encode list / describe and the list_commands / describe_command MCP tools) now describe the decoded call format and its ABI parameters, instead of the encoder methods
  • Add the MCP Registry metadata (server.json) to make the ur-mcp server discoverable
  • Add AGENTS.md and llms.txt for AI agents, plus a mcp PyPI keyword
  • Add tests/test_version_consistency.py to keep the packaging version, server.json and the README mcp-name: marker in sync

Overview and Points of Attention

The object of this library is to decode & encode transactions sent to the Uniswap Universal Router (UR) on Ethereum Mainnet, though it would work on any compatible chain where the UR is deployed. See Version Mapping below. This Python SDK is based on, and intended to be used with web3.py

The target audience is Python developers who are familiar with the Ethereum blockchain concepts and web3.py, and how DEXes work. The same codec is also available without Python, through the ur-decode / ur-encode command line tools and the optional ur-mcp MCP server (see "Command line interface" and "MCP server" below): both print JSON, so shell scripts and AI agents can drive it too.

⚠ Before using this library, ensure you are familiar with general blockchain concepts. The Python API also expects web3.py knowledge in particular.

⚠ Not all UR functions supported by this SDK are available through the CLI or MCP tools: run ur-encode list and look for the "rebuildable" flag.

List of supported Uniswap Universal Router Functions
Command IdUniversal Router FunctionUnderlying Action - FunctionSupported
0x00 / 0V3_SWAP_EXACT_IN✅
0x01 / 1V3_SWAP_EXACT_OUT✅
0x02 / 2PERMIT2_TRANSFER_FROM✅
0x03 / 3PERMIT2_PERMIT_BATCH✅
0x04 / 4SWEEP✅
0x05 / 5TRANSFER✅
0x06 / 6PAY_PORTION✅
0x07 / 7PAY_PORTION_FULL_PRECISION✅
0x08 / 8V2_SWAP_EXACT_IN✅
0x09 / 9V2_SWAP_EXACT_OUT✅
0x0a / 10PERMIT2_PERMIT✅
0x0b / 11WRAP_ETH✅
0x0c / 12UNWRAP_WETH✅
0x0d / 13PERMIT2_TRANSFER_FROM_BATCH✅
0x0e / 14BALANCE_CHECK_ERC20✅
0x0f / 15placeholderN/A
0x10 / 16V4_SWAP✅
0x06 - SWAP_EXACT_IN_SINGLE✅
0x07 - SWAP_EXACT_IN✅
0x08 - SWAP_EXACT_OUT_SINGLE✅
0x09 - SWAP_EXACT_OUT✅
0x0b - SETTLE✅
0x0c - SETTLE_ALL✅
0x0e - TAKE✅
0x0f - TAKE_ALL✅
0x10 - TAKE_PORTION✅
0x11 / 17V3_POSITION_MANAGER_PERMIT✅
0x12 / 18V3_POSITION_MANAGER_CALL✅
0x13 / 19V4_INITIALIZE_POOL✅
0x14 / 20V4_POSITION_MANAGER_CALL✅
0x02 - MINT_POSITION✅
0x0b - SETTLE✅
0x0d - SETTLE_PAIR✅
0x0e - TAKE✅
0x11 - TAKE_PAIR✅
0x12 - CLOSE_CURRENCY✅
0x13 - CLEAR_OR_TAKE✅
0x14 - SWEEP✅
0x15 - WRAP✅
0x16 - UNWRAP✅
0x15 - 0x20placeholdersN/A
0x21 / 33EXECUTE_SUB_PLAN✅
0x22 - 0x3fplaceholdersN/A
0x40 / 64ACROSS_V4_DEPOSIT_V3❌

All the ✅ commands can be decoded and encoded. V4_SWAP, V4_POSITION_MANAGER_CALL and EXECUTE_SUB_PLAN can also be decoded, but they cannot be rebuilt from a decoded call (see "How to rebuild the calldata from a decoded call").

Version Mapping

Here is the mapping between the Universal Router versions and the SDK ones


Installation

A good practice is to use Python virtual environments, here is a tutorial.

The library can be pip installed from pypi.org as usual:

# update pip to latest version if needed

pip install -U pip

install the decoder from pypi.org

pip install uniswap-universal-router-decoder

To install it from source:

pip install .

or for contributors:

pip install -e '.[mc

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx