Repository navigation
Agent2FA v0.1.0 — Out-of-band 2FA for AI Browser Agents
Out-of-band 2FA (Touch ID & Telegram) before your AI browser agent clicks Pay, Delete, or Send.
Major US banks updated customer guidance clarifying that users bear liability for unauthorized AI agent purchases (reported Nov 2026 by TechRadar & Bloomberg). In-page confirmation popups can be clicked by agents — Agent2FA moves approval out of the web page into an isolated hardware-backed confirmation sheet or directly to your phone.
What's Included in v0.1.0
- Dual-Layer Chrome MV3 Guard (
packages/extension)- Network-layer
declarativeNetRequesthard-blocking of checkout navigations,fetch()POSTs,form.submit(), andnavigator.sendBeacon()(ping). ISOLATED-worlddocument_startcapture guard resistant toMAIN-world prototype tampering, covering open Shadow DOM buttons viacomposedPath(), card-number inputs (Luhn detection +[REDACTED_CARD]scrubbing), and destructive actions (deleting repos, DNS records, cloud resources, irreversible sends).- Minimal permissions: no
debugger, nodeclarativeNetRequestFeedback, and<all_urls>strictly opt-in viaoptional_host_permissions.
- Network-layer
- Zero-Backend Out-of-Band Approvals
- Native
chrome-extension://WebAuthn (Touch ID, Windows Hello, system password, or iPhone QR Passkey) with local ECDSA P-256 +UP/UV+ bound-challenge verification. - Optional BYO Telegram Bot inline-button approval (
[Approve Once (60s)]/[Block]) with MV3 keepalive port and optionalfrom.iduser allowlist for group chats, plus optional Slack/ntfy secondary alerts. - Fail-closed 60-second single-use grants strictly bound to
host + actionHash, immediately re-locking after one use and rejecting replays.
- Native
- Human Minimal v2 UI + Complete Bilingual i18n (
en&zh-CN)- Calm consumer hardware-security confirmation sheet (
approve.html), toolbar popover (popup.html), and settings/activity console (options.html) with liveEN / 中文switching.
- Calm consumer hardware-security confirmation sheet (
- Single-File Companion MCP CLI (
@agent2fa/mcp-cli·node packages/mcp-cli/dist/index.js mcp)- Standard stdio JSON-RPC 2.0 MCP server exposing a cooperative
request_approvalapproval gate for Claude Code, OpenClaw, Cursor, and Browser Use (automatic hard-blocking is enforced by the Chrome extension's DNR + isolated-world layers). - Supports BYO Telegram Bot (use a separate Bot Token from the extension if running both simultaneously; set
AGENT2FA_TELEGRAM_USER_IDfor group chats) and an ephemeralhttp://localhost:<port>WebAuthn approval server (never127.0.0.1, with strict same-origin +application/jsonCSRF protection), minting 60-second single-use HMAC-SHA256 grant tokens (a2fa1_...) and writing redacted0600JSONL audit logs to~/.agent2fa/audit.jsonl. - CLI rule evaluator:
node packages/mcp-cli/dist/index.js check --url <url> [--action <text>].
- Standard stdio JSON-RPC 2.0 MCP server exposing a cooperative
- Shared Deterministic Rule Pack (
packages/rules)- Declarative
default-rules.v1.jsoncovering major payment gateways, cloud billing consoles, domain registrars, and destructive actions with zero-false-positive editorial exclusions (/docs/,/blog/,/en-us/docs/, query-string immunity).
- Declarative
Install v0.1.0
- Download
agent2fa-v0.1.0-chrome.zipfrom the release assets below and unzip it. - Open
chrome://extensions, enable Developer mode, and click Load unpacked on the extracted folder. - Click Agent2FA in your Chrome toolbar → Settings to enroll Touch ID (or connect your own Telegram Bot).
Honest Threat Model
Agent2FA strongly defends against indirect prompt injection, agent misclicks/hallucinations, silent checkout submissions (fetch / form.submit() / sendBeacon), and fake in-page popups. It does not stop local malware that already possesses unrestricted OS keyboard/mouse control or raw CDP access to disable extensions. See README.md for our empirical Chrome 158 boundary matrix and the One-Shot Agent Browser Hardening Prompt.
Checksums (SHA-256)
50195d6aa6a3f8671f6c4bd4ce4bfe3db414d1e16d673664c988dcd95651d996 agent2fa-v0.1.0-chrome.zip