
Uniswap Tx Builder Mcp
io.github.Yummybait-fin由 GitHub 账号 Yummybait-fin 发布v0.4.3更新于 Oct 24, 2026
Builds and simulates unsigned Uniswap v3 liquidity-position transactions — keyless, never signs.
概览
无需密钥的 MCP 服务器,用于构建未签名的 Uniswap v3 流动性头寸与兑换交易,可选通过 eth_call 模拟。
- 可以做什么
- 构建 Uniswap v3 头寸的未签名交易:收取手续费、平仓或销毁、铸造、增加流动性
- 构建 ERC-20 授权、原生 ETH 包装,以及经 Universal Router 的精确输入单跳兑换
- 读取链上状态:兑换报价、池子状态,以及钱包持有的头寸 NFT
- 把人类可读的价格区间与数量换算为对齐的 tick 和 wei 数量
- 可选对构建结果做 eth_call 试运行,并返回解码后的模拟结果
- 适用场景
- 适合让助手准备 Uniswap v3 头寸或兑换的 calldata,再由你自己的钱包签名并广播;也适合在操作前查看池子、报价和已有头寸。
- 运行要求
- 以 stdio 在本地运行,通常通过 npm 包的 npx 或 Docker 镜像启动。无需密钥或账户。链上读取默认使用公共 RPC 端点,可用 RPC_ETH、RPC_OP、RPC_POLYGON、RPC_BASE 或 RPC_ARB 按链覆盖。仅在读取和模拟时需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Uniswap Tx Builder Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
uniswap-tx-builder-mcp
[CI] [coverage] [npm version] [node] [license] [OpenSSF Scorecard]
A keyless MCP server that builds unsigned Uniswap v3
liquidity-position transactions and optionally simulates them via eth_call. It never holds
keys and never signs — you take the returned calldata and sign + broadcast it with your own
wallet (viem, a CDP wallet MCP, any signer).
Because it's keyless, the only limits that apply to a built tx are your wallet's — the server's threat surface is just "it returns calldata and reads public RPCs."
Ecosystem
Part of Yummybait:
cdp-wallet-agent-example— a reference agent that drives this MCP with a Coinbase CDP wallet as the signer.- yummybait.finance — the product these tools power.
Tools
Every build tool returns tx = { to, data, value, chainId } plus rlp — the unsigned
EIP-1559 (type-2) serialization of tx with nonce/fees/gas zeroed (signing services like the
CDP API populate them; serialize tx yourself if you manage nonces) — and a human description.
value is "0" except the payable Universal Router wrap/swap builds. Addresses are 0x…40;
positionId and amounts are decimal strings (they exceed JS safe integers).
Encoding itself is offline: build_mint, build_increase, build_wrap, build_swap, and
build_collect (with simulate: false) produce calldata without any network access. Only chain
reads need a reachable RPC endpoint — and public defaults are baked in per chain, so nothing has
to be configured either way (see Configuration to override them).
simulate runs an opt-in eth_call dry-run: on by default for collect/close, off for
mint/increase (those need approvals + balances, so the dry-run usually reverts); wrap/swap/approve
simulate when you pass sender (the signing wallet). A reverted simulation comes back as an
error — don't sign a tx that failed to simulate. When a dry-run succeeds, the response also
includes simulationResult — the actual decoded return value of the call (e.g.
{amount0, amount1} for build_collect/build_close, {tokenId, liquidity, amount0, amount1}
for build_mint, {approved} for build_approve) rather than just the simulated: true flag.
build_wrap/build_swap go through the Universal Router's execute, which has no return value,
so they only report simulated. See the companion skill for the full argument reference and
position lifecycle.
Install & run
From npm (no clone, stdio transport — what MCP clients spawn):
From source:
Set MCP_HTTP_PORT to serve the streamable-HTTP transport instead of stdio (endpoint:
http://<host>:<port>/mcp). HTTP runs stateless — every POST gets a fresh server/transport
pair, so any number of clients can connect and reconnect freely with no session bookkeeping:
Docker — build locally, or pull a released image from GHCR:
Connect to an MCP client
Claude Code (stdio via npm):
Generic client config (Claude Desktop, etc.) — add to the client's mcpServers:
(For a local build, swap the command for node /abs/path/to/uniswap-tx-builder-mcp/dist/mcp.js.)
For HTTP, run the server with MCP_HTTP_PORT and point the client at http://<host>:<port>/mcp.
Install the companion skill
skills/uniswap-tx-builder/ is a generic agent skill (no app- or wallet-specific knowledge)
that teaches an agent how to drive these tools: the argument reference, simulate-first, the
close→mint rebalance sequence, and the "your wallet signs" handoff. It pairs with the MCP — install
both. Pick whichever install path suits you.
A. Claude Code plugin (/plugin) — the repo doubles as a plugin marketplace:
B. npx — copies the skill into a skills dir (no clone needed):
C. Manual copy — straight from a checkout:
The agent picks it up by its SKILL.md frontmatter — no restart needed for project skills.
Configuration
Per-chain RPCs default to public endpoints; override with env vars (see src/config.ts):
Public RPCs are rate-limited and best-effort — set your own for anything beyond casual use.
Architecture
One code path, transport kept separate so it stays testable and ready for a future v4 tool set:
CI / releases
GitHub Actions (.github/workflows/):
- CI — typecheck + tests + npm-tarball allowlist check on every push to
mainand on PRs. - Release — pushing a
v*tag re-runs the tests, bumps the version onmainto match the tag (package.json+.claude-plugin/plugin.json), publishes the npm package (@yummybait/uniswap-tx-builder-mcp) with provenance, and builds + publishes the Docker image to GHCR (ghcr.io/yummybait-fin/uniswap-tx-builder-mcp), tagged with the version (andlatest). The tag is the single version source for both artifacts; the bump lands onmainafter the tag, so the tagged commit keeps its old version.
npm supply-chain posture
The npm publish job is locked down; keep these properties when touching it:
- Trusted publishing (OIDC) — no long-lived npm token in CI. Configured on npmjs.com under
package → Settings → Trusted publisher (GitHub Actions, this repo,
release.yml). TheNPM_TOKENsecret path in the workflow exists only to bootstrap the first release (trusted publishers can't be configured before the package exists) — delete the secret afterwards and set the package's publishing access to "Require two-factor authentication and disallow tokens". - Provenance —
publishConfig.provenance: trueattaches a Sigstore attestation linking every published tarball to the exact workflow run and commit. It also makes an accidental localnpm publishfail (no OIDC outside CI). Consumers verify withnpm audit signatures. - Gates before publish —
npm audit signatures(registry attestations of the dep tree),npm audit --omit=dev --audit-level=high(no known high/critical vulns in shipped deps), typecheck + full test suite (prepublishOnly), andscripts/verify-tarball.mjs(the tarball must contain exactly the allowlisted files — no secrets, no strays). - Hardened job —
npm ci --ignore-scripts(no dependency postinstall runs where publish credentials live), minimal per-job permissions, actions pinned to commit SHAs, Dependabot keeping pins and deps fresh.
Scope
Uniswap v3 NonfungiblePositionManager on the chains above. Calling an unconfigured chain returns
an "Unsupported chain" error. Roadmap: Uniswap v4 as a separate set of tools alongside these.
来源:README.md,提交 2cfdb32
工具
0版本历史
1- v0.4.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分