
Chain Signer
io.github.Kevthetech143由 GitHub 帳號 Kevthetech143 發布v0.5.31更新於 Oct 24, 2026
Security suite for AI agents: flag drains, permit-phishing & risky actions before signing.
發布方自己的服務:Agent.chain.tokyo Address Contracts
概覽
在簽署前檢查未簽名的 EVM 交易、EIP-712 簽章與擬執行的代理動作,找出盜領與授權釣魚模式。
- 可以做什麼
- 以 MCP 工具形式提供三個唯讀防護:preflight 解碼未簽名交易並標記盜領模式,例如無限授權、transferFrom 拉取、代理升級,以及藏在 multicall 或智慧帳戶批次呼叫中的授權;inspect_signature 檢查 EIP-712 型別化資料中的授權釣魚與白送資產的 Seaport 訂單;check_action 對擬執行的工具呼叫套用允許/禁止清單以及金額與收款方限制。另外還內建非託管錢包工具:create_wallet、get_balance、send、call_contract、swap 與 bridge。
- 適用情境
- 當代理需要簽署或發送 EVM 交易,並希望在簽名前對已知盜領與授權釣魚模式做第一道檢查時,值得加入。錢包工具是選用的,只有在需要代理自己持有金鑰時才使用。
- 執行需求
- 透過 stdio 在本機執行,從 PyPI 安裝並以 uvx 或 chain-signer-mcp 指令啟動。不需要帳號,也不託管資產。選用環境變數 ETHERSCAN_API_KEY 僅在讀取即時餘額與廣播交易時需要;防護功能可離線使用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Chain Signer,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
chain-signer
[PyPI] [Python] [License] [Release]
A security suite for AI agents — the seatbelt that catches the dangerous thing BEFORE it happens. Three guards, each callable on its own (and as MCP tools), pairing with any wallet or identity stack:
preflight(tx)— decode an unsigned transaction and flag drains before signing (unlimited/large approval, approve-all, token & NFT transferFrom, proxy upgrade, on-chain permit, on-chain Permit2 approve/permit/transferFrom, approvals hidden in multicall incl. Uniswap router batches and Multicall3 aggregate/aggregate3/aggregate3Value (the batch helper on every EVM chain), approvals wrapped in ERC-4337/smart-account execute/executeBatch, Gnosis Safe multiSend/execTransaction and DSProxy execute, drains routed through the Uniswap Universal Router (Permit2 permit/transferFrom commands incl. sub-plans), 1inch AggregationRouter v5 swap() with redirected output or zero slippage, 0x ExchangeProxy transformERC20() with zero slippage, EIP-7702 account delegation, will-revert).inspect_typed_data(td)— catch permit-phishing in an EIP-712 message before the agent signs it (ERC-2612, Uniswap Permit2 incl. SignatureTransfer + witness variants, DAI-style permits) and Seaport orders that give assets away — zero consideration, proceeds routed to a third party, or hidden in a BulkOrder tree.check_action(action, policy)— enforce allow/forbid + value/recipient limits before the agent acts.
All three fail safe and are guards, not guarantees. Also bundled: a non-custodial multi-chain wallet (burner, balance, send, swap) — the agent holds its own key and signs locally. No MetaMask, no account, no custody.
Install
Bitcoin/Solana support is optional: pip install "chain-signer[all]".
Quickstart (10 seconds — offline, no key, no funds, no network)
That's the wedge: the drain gets flagged before you'd ever sign it — no key, no funds, no network.
Bundled wallet (optional — the guards pair with any wallet)
Full runnable demos are in the repo: examples/agent_safety_demo.py (all three guards stop three
real attacks) and examples/quickstart.py (wallet) — clone to run them, or just import as above.
Safety preflight (the wedge)
Before an agent signs, hand the unsigned tx to preflight() — it decodes the calldata and returns
the risks, or use assert_safe() to hard-stop on a HIGH flag. Offline, no network, never raises.
What it flags today: unlimited/large approval, increaseAllowance, setApprovalForAll,
ERC-20 transferFrom + ERC-721/1155 safeTransferFrom (token & NFT drains), ERC-777 authorizeOperator/operatorSend
(operator-grant + operator-pull drains), on-chain ERC-2612 and DAI-style permit,
on-chain Permit2 approve/permit/transferFrom (single and batch — the dominant approval router:
unlimited uint160 allowance + drain pull) plus Permit2 SignatureTransfer permit(Witness)TransferFrom
(the one-shot signed-permit pull intent/filler protocols use), proxy upgradeTo/upgradeToAndCall, approvals hidden inside multicall (all router
variants, nested) and Multicall3 aggregate/aggregate3/aggregate3Value (the canonical batch
helper deployed at one address on every EVM chain), approvals wrapped in ERC-4337/smart-account execute/executeBatch, Gnosis Safe
multiSend/execTransaction, or DSProxy execute(target,data)/execute(code,data) (decoded and recursed),
drains routed through the Uniswap Universal Router
(execute(commands,inputs) — Permit2 permit/transferFrom commands, batch and EXECUTE_SUB_PLAN),
EIP-7702 account delegation (the "wallet upgrade" drainer), large native value,
opaque calldata, malformed calls, and will-revert (with a sim hook).
Honest limits (read these): this is STATIC analysis — it decodes calldata and matches known drain
patterns. It is NOT a transaction simulator: it won't catch a novel/obfuscated drain it can't decode
(those get a low-severity "unknown" flag, not a block), and simulation-based scanners go deeper there.
Safety coverage is EVM-only today (no Solana/Bitcoin tx analysis). And it is not yet field-proven at
scale. A first-line guard for known patterns — not a guarantee. Pair it with simulation + human
review for high-value actions.
Signed-message inspector (the off-chain half)
A drain doesn't need a transaction. A dApp can ask the agent to sign an EIP-712 message —
most dangerously a permit granting an unlimited token allowance, which preflight (a tx check)
can't see. inspect_typed_data() catches it before the agent signs:
Covers all three major permit shapes: ERC-2612, Uniswap Permit2 (PermitSingle/PermitBatch, plus
SignatureTransfer and the witness variants intent protocols use), and DAI-style (allowed: true),
plus Seaport marketplace orders that hand assets over for nothing — zero consideration, proceeds
routed to a third party while your asset leaves, or the same giveaway buried in a BulkOrder merkle tree.
Offline, never raises.
Guarded signer (screen + sign in one call)
inspect_typed_data only protects when the agent remembers to call it first — sign_typed_data
alone will happily sign a permit-phishing message. guarded_sign_typed_data() composes the two so
signing is screened by default: it inspects, then refuses to sign a HIGH-risk drain.
On a clean message the signature is byte-identical to sign_typed_data; pass force=True to override.
Action-policy gate (inspect what the agent DOES)
Identity tells you who the agent is; it doesn't stop a bad action. check_action() enforces a
policy on a proposed tool call before it runs — fail-safe (denies on unreadable input):
All three guards are exposed as MCP tools (preflight, inspect_signature, check_action) — any
agent runtime (Claude, Cursor, …) can call them directly, read-only, no key.
What's caught and what isn't — the honest threat-coverage map: docs/THREAT-COVERAGE.md.
What you get
preflight(tx)/assert_safe(tx)— decode an unsigned tx and flag drain patterns before signing.inspect_typed_data(td)— flag permit-phishing in an EIP-712 message before the agent signs it.guarded_sign_typed_data(w, domain, types, message, primary_type)— screen then sign; refuses a drain.check_action(action, policy)— enforce allow/forbid + value/recipient limits before the agent acts.burner()— a fresh wallet for a one-off task; discard it when done.restore(key)— reload a wallet later from its exported private key (same key → same address).send_ether(w, to, amount)— send in ETH (not wei); nonce, gas, and broadcast handled for you.get_balance(w)— live balance from the chain (Etherscan v2 indexer, not a flaky public RPC).swap(...)— token swaps via 0x/Paraswap.- Optional Solana + Bitcoin wallets via the
[all]extra.
Non-custodial guarantee
The private key is generated/loaded locally, used only to sign, and never logged, returned, or stored by this library. You hold the key; we never touch your funds. That is the whole design.
Handling the key (read this)
w.private_key is the keys to the wallet. Treat it like a password:
- NEVER log it, print it in production, or write it into notes/memory/chat. Anyone who has it controls the funds.
- For a burner holding a few dollars this is low-stakes by design — but the rule still holds.
- To reuse a wallet later, store the key in a secret manager / env var, then
restore(key). - Better:
export_encrypted(w, password)gives a password-protected keystore dict to store at rest;load_encrypted(keystore, password)brings the wallet back. Never store the raw key if you can store the keystore.
Signing idiom (note for web3.py users)
The wallet does not expose sign_transaction / sign_message methods. Signing is done by
function helpers you pass the wallet to — e.g. send_ether(w, to, amount) signs and broadcasts,
and sign_message(w, "text") returns an EIP-191 signature for auth / sign-in flows
(recoverable via eth_account Account.recover_message).
CLI on PATH
pip install may warn that the chain-signer script dir isn't on your PATH. The library works
regardless; to use the CLI directly, add that dir to PATH or run python -m chain_signer ....
Tool surface (for any AI / MCP / CLI)
chain_signer.mcp_server exposes list_tools() and call_tool(name, arguments). CLI:
Responsible use
General-purpose, non-custodial tooling. You are responsible for using it within the laws and terms of service that apply to you. Not intended or marketed for any restricted or prohibited trading in your jurisdiction.
Notes
- Balances/broadcast use the Etherscan v2 indexer (authoritative), never a free public RPC.
- Low-level building blocks (
tx.send,call_contract, explicit nonce/gas) remain available for advanced use.
Pay an x402 API in one call
Builds + signs the EIP-3009 authorization x402 expects (the "exact" scheme). Your agent pays a paid API by itself — no password prompt, no signup, no custody.
Sign typed data (EIP-712) — for agent payments / x402
Your agent can authorize a payment by signing typed data locally — no password prompt, no signup.
Run as an MCP server
chain-signer is also a Model Context Protocol (MCP) server, so MCP-aware agents can use it directly:
Exposes 9 tools. The three security guards (the wedge): preflight, inspect_signature,
check_action. Plus the non-custodial wallet: create_wallet, get_balance, send, call_contract, swap, bridge.
Wire it into any MCP client (Claude Desktop, Cursor, etc.) by adding it to the client's
mcpServers config:
That's all — the agent can now screen every tx, signature, and action through the guards before it
acts, and (optionally) hold its own wallet to read balances, send, and swap as native tools.
(ETHERSCAN_API_KEY is optional; needed only for live balance reads and broadcasting.)
來源:README.md,提交 bc4f1f2
工具
0版本歷史
1- v0.5.31最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Chain 整合
Agent.chain.tokyo Address Contracts
tokyo.chain.agent官方發布者
讓助理為 AI 代理租用日本真實郵寄地址:瀏覽地點與樓層、建立 55 USDC 付款意圖,並查看合約與事件。

Zovo Countdown Chain
由 GitHub 帳號 theluckystrike 發布
為單一事件產生可列印的倒數日曆——月曆頁、紙鏈或撕頁卡片——並附上 ICS 提醒檔案。

DeviceChain
io.devicechain
針對自架 DeviceChain IoT 執行個體的唯讀 MCP 工具,讓助理檢視裝置、遙測資料與告警。

BridgePilot — cross-chain route quotes
由 GitHub 帳號 ert1981 發布
Best cross-chain route via LI.FI + Across with net USD value. Non-custodial, x402-paid.
BrainChain
com.usebrainchain
讓助理把任務交給由 AI 代理挑選並評分的頂尖模型,只有在成果達到你設定的品質標準時才以 USDG 或 USDC 付款。