How uvsign works
The tools uvsign adds, every check it runs, the confirm page, its config and its files.
On this page
Tools
uvmcp’s tools are listed to the agent as uvmcp_* (plain lowercase names only, descriptions
shortened). Their answers are wrapped and labelled as untrusted data; fields that could pass for
uvsign’s own (status, id, txHash, confirm_url, next) are renamed, and links are replaced with
“[link removed by uvsign]”. uvsign never asks you to open a link from the chat.
uvsign adds sign_and_send, sign_limits, confirm_status, wallet_info and burner_close. The agent
builds a swap with uvmcp_swap_build and passes each transaction to sign_and_send with the request it
was given. When you must approve, the tool answers at once with pending and an id, and uvsign opens
the confirm page; the agent polls confirm_status. The agent never sees the page’s address. One
confirmation is open at a time.
Checks
| Check | Refused when |
|---|---|
| Chain | the chain id is not the requested one, or the RPC is on another chain |
| Contract | to is not the pinned UvRouter, or (on Base) its code hash differs |
| Encoding | the calldata is not a canonical swapWithAllowance or swapNative call |
| Recipient | the output does not go to you (for a burner, to the burner) |
| Sell side | the token or amount differs from the request |
| Buy side | another output token; a minimum output of zero, below the request, or below the Chainlink value minus the tolerance |
| Value | the native coin sent does not match exactly |
| Approvals | the spender is not the pinned UvRouter; more than you sell; the token is in a live agent budget |
| Revokes | a zero approval on a contract without a nonzero ERC-20 allowance() for that spender |
| Limits | fee above 0.3%, a hop token other than WETH/USDC/cbBTC (Base), an approval of 2^128 or more, a deadline more than 60 seconds in the past (clock tolerance) or more than 10 minutes ahead, gas above 3M |
| Network fee | base fee above the chain’s cap; the priority fee is cut to the cap; an agent key or burner over its per-transaction cap |
Refusals are fixed sentences; text from the server, the chain or a revert is never passed on.
Prices. Only Chainlink authorizes a swap. With feeds for both tokens (on Base: ETH, USDC, cbBTC),
the minimum output must be within price_tolerance_bps (default 1%, at most 3%) of the Chainlink value.
A feed is used only if its description() matches, its answer is recent, and on Base the L2 sequencer
has been up for an hour. A pair without feeds is signed only up to unpriced_max_usd ($25), valued at
the sell token’s feed; your own wallet can exceed that for one swap with allowUnpriced, and the page
warns in capitals. uvsign’s own on-chain quote over UvRouter’s venues is advisory: it can refuse a
minimum output below it, never approve one.
Confirm page
The page runs on 127.0.0.1 at a random port and one-time path, shows only uvsign’s decoded summary,
and loads nothing from the network (default-src 'none'). Only the first visit gets a session; every
action needs the session cookie and form token. An unanswered page expires after five minutes and
nothing is approved by default. The browser is opened through a user-only launcher file, deleted once
the page loads, so the URL never appears on a command line. Other programs running as you can still
read that file, open the page first or show a fake one. The page and the agent’s answer carry the same
request id, which helps against other programs but not against the agent that asked: it can read the
launcher and relay the id.
Approving needs your browser wallet’s popup (the connected account must be your address; uvsign then looks the transaction up on chain), a button on your Ledger or Trezor, or your keystore password.
Config
~/.config/uvsign/config.toml ($XDG_CONFIG_HOME/uvsign; %LOCALAPPDATA%\uvsign on Windows; or
$UVSIGN_HOME):
server_url = "https://mcp.uvstack.xyz/mcp"
signer = "browser" # browser, ledger, trezor or keystore
address = "0x…" # your main wallet; every signer is checked against it
confirm_timeout_secs = 300
price_tolerance_bps = 100 # at most 300 is used
unpriced_max_usd = 25.0
update_check = true
auto_update = false
[rpc] # optional; public endpoints otherwise
"8453" = "https://mainnet.base.org"
The home and config.toml must be your own and not writable by others, or uvsign refuses to read them.
Files and permissions
Keys are decrypted only to sign, wiped from memory on drop, and never logged or returned by a tool. On Linux and macOS files are 0600 and directories 0700. On Windows the config directory and every file uvsign writes there are owned by your user, with a protected access list for your user and SYSTEM only; files are written to a new temp file and renamed into place, junctions on the way must belong to you or the system, and uvsign refuses to write when the protection does not hold (for example on FAT32 or exFAT). Hot keys (agent key, burners) are only as safe as your user account.
An AI agent that can run shell commands as your user (Claude Code, Codex, Gemini CLI, OpenCode, …) counts as local software. It can read burner and agent key files and edit uvsign’s config. With such agents use “ask every time” with a hardware wallet, or budget mode, whose limits are enforced on chain even if the agent key leaks. Keep burner balances small.
Tor
With --tor, uvmcp and RPC traffic go through a local Tor SOCKS proxy (socks5h, 127.0.0.1:9050 by
default; Tor Browser uses 9150). Set onion_url to
http://2eenvkcyb2j2hdlkyicleim4l3lln3dsqlqq3yarvkdrb3prnrwhbcyd.onion/mcp. uvsign never falls back to a
direct connection and refuses browser wallets in Tor mode.
uvsign verify
uvsign verify tx.json --from 0xYOU [--sell TOKEN --amount N --buy TOKEN [--min-out N]]
Runs the same checks as signing, including the on-chain ones, and signs nothing. Exits 1 if anything would be refused or could not be checked.
Status
Signing is live on Base with UvRouter 1.2.0 (0x0Dc5Cf7AeD22AC4D0D03eC4f28227A1BCC571261) and its
two enforcers built in with their code hashes. BNB Chain has no router yet, so everything there is
refused; its price feeds are not vetted.
cargo audit reports RUSTSEC-2026-0387 (timing variability in crypto-bigint 0.5, through k256 0.13
used by alloy). Ledger and Trezor sign on the device.