Let an AI agent propose transfers as a proposer, through an MCP server #18
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #18"
general
weight: 0.35
b3hr4d
<!-- claude-projects-attribution: {"github_login":"b3hr4d"} -->
_Requested by Behrad · project thread_
Before: a wallet had owners, approvers and viewers. An AI could only reach it by holding an owner's key, which can move funds, or a viewer's, which can ask for nothing.
After: an AI agent joins the wallet as a proposer. It reads the accounts, balances, open actions and audit log, and it proposes transfers. Its approval never counts, so every transfer it proposes waits for an owner or an approver on the Approvals page. That holds even under the daily limit, where an owner's own transfer goes through at once.
mcp/is an MCP server that runs on your Mac. Claude Code or Claude Desktop starts it, and it calls one wallet with the agent's own key, which it makes on first run.scripts/try-local.shprints theclaude mcp addcommand for the wallet it installs. You chose this as "Propose only" in the thread; it is recorded as [decision 0007](docs/decisions/0007-agent-proposer.md).How:
RolegainsProposer.proposetakes owners and proposers. A proposer may propose only aTransfer, its proposal starts with no approvals, and it may have at most 8 actions open, so it cannot crowd the owners out of the 64.approve,execute,rejectandadd_accountkeep their guards.request_jointakes a trailingopt Role, which may beViewerorProposer. A call with one argument still asks to be a viewer, and a test still makes such calls.membersfor that. A proposer can use the Send page, which says the transfer waits for approval.mcp/has seven tools:wallet_whoami,wallet_join(returns the 8-digit code),wallet_accounts,wallet_balance,wallet_activity(the audit log),wallet_pendingandwallet_propose_transfer(a decimal amount in the token's units). None approves, runs or rejects. Reads are certified replicated calls, as on the pages.- The key is a PKCS #8 Ed25519 PEM at
~/.config/b3wallet-mcp/agent.pem, mode 0600, and the server refuses a key file others can read. icp-cli imports the same file and shows the same principal.- The protocol (JSON-RPC over stdio, tools only) is written in
mcp/src/protocol.tsrather than taken from the SDK. That way the process holding the key runs only this code and the IC libraries the pages already use.- CI gets an
mcpjob.Worth your review
membersorwhoamicannot decode aProposerrole, which it does not know. The pages ship with the wallet, so they are fine. Your own scripts are affected only once a proposer has joined.proposeused to be refused with "only an owner can do this" and now gets "only an owner or a proposer can do this".historyis incandid/wallet.didbut not in the wallet yet. The first version of the server offered it, and Claude's local run below hit "Canister has no update method 'history'". The server readsaudit_loginstead. A test now reads the wallet's exported methods fromcanisters/wallet/src/lib.rsand fails if a tool calls any other. The fake replica answers whatever the interface file names, which is how the first version slipped through.Tests.
- A proposer's transfer under the daily limit waits for an owner. Its other actions are refused, and its 9th open proposal is refused.
- A join request asks only to be a viewer or a proposer.
- The role test now covers a proposer.
Real Claude, local network. I ran Claude Code (
claude -p) with only this server against a wallettry-local.shinstalled:1. Claude called
wallet_whoami, thenwallet_join. It told me the code2052 5840, which matches the SHA-256 code of its principal.2. As the owner, I approved and ran the join.
3. Asked to send 1.5 ICP and "approve and send it yourself", Claude read the balance (10 ICP) and proposed action 2. It said it could not approve, since its approval never counts.
4. The owner's
executebefore approving gotQuorumNotMet { approvals: 0, quorum: 1 }.5. With the agent's key in icp-cli,
approve,execute,rejectandadd_accountwere refused by their guards. ProposingChangeRoleto make itself an owner gotForbidden: a proposer proposes only transfers.6. The owner approved and ran it, and the account then held 8.4999 ICP.
7. Asked whether it went through, Claude read
wallet_activityand saw the owner's approval and execution.The whole CI battery passes locally:
uiandmcpjobs' steps---
_Generated by Claude Code_