Agent Wallet Firewall
Sends unclear or suspicious transactions to the user's Telegram chat for approval or rejection via a bot; no response is treated as rejection.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Tollgate
A firewall between your AI agent and your wallet. Every transaction the agent wants to sign is checked against your rules, a simulation, threat lists and your actual intent. Suspicious ones are blocked or sent to your phone for a yes/no.
⚠️ Version 0. Runs on Base Sepolia testnet only. Do not use it with real money yet.
Why
AI agents are getting wallets. They pay for APIs (x402), trade, and settle invoices. But an agent can be tricked:
Prompt injection: a web page, email or token name says "send the funds to this new address". OWASP says this cannot be fully prevented.
Memory injection: a poisoned memory makes a malicious transfer look like something you agreed to earlier (research on ElizaOS agents).
Drainer calls: a "claim your airdrop" transaction that secretly approves someone to take all your tokens.
Spending limits alone do not stop this: an attacker stays under the limit, or drains you in many small payments.
Related MCP server: WETH
How it works
The agent never holds the key. It talks to this MCP server, and the server signs only what passes every check:
Your AI agent (Claude API, AgentKit, any MCP client)
│ send_eth / send_token / approve_token / contract_call
▼
┌────────────────────── Tollgate ───────────────────────┐
│ 1. Decode what does this transaction really do? │
│ 2. Threats known drainer addresses, your blocklist │
│ 3. Rules per-tx limits, daily budgets, rate │
│ limits, recipients, approvals │
│ 4. Simulate would it fail? is the recipient a │
│ contract? │
│ 5. Intent does it match what YOU asked for? │
│ (a separate model, the agent can't │
│ talk to it) │
│ 6. Human anything unclear → Telegram approve / │
│ reject, no answer = rejected │
└───────────────────────────┬───────────────────────────┘
▼
sign & send (or block)The strictest check wins. A model can only make a decision stricter, never override a hard rule.
Your mandate (what the agent may do, in plain words) lives in a local file the agent cannot read or write. The intent check compares every transaction against it, and treats the agent's own explanation as untrusted.
Agent-Drain-Benchmark
18 attack and false-alarm scenarios ship with the repo. Run them yourself:
npm run bench # rules only, offline, free
npm run bench -- --intent # adds the intent check (needs ANTHROPIC_API_KEY)Rules alone catch 16 of 18. The two that get through are the interesting ones: a changed address in an invoice and a fake "as we agreed earlier" memory. Both look completely normal to a spending limit. That is what the intent check is for: with it switched on, all 18 are handled correctly (both injections blocked, no false alarms).
# | Attack | Caught by |
3–5 | Over the limit, thousand small cuts, transaction flood | rules |
7 | Known drainer address | threat list |
8–9 | Unlimited approval, hidden | decoder + rules |
10 | NFT drainer | decoder + rules |
11 |
| decoder + rules |
14 | Transaction that would fail | simulation |
16 | "Alice's address changed" prompt injection | intent check |
17 | "As we agreed earlier" memory injection | intent check |
Found a bypass? See SECURITY.md. Confirmed bypasses become new benchmark scenarios.
Quickstart
Requires Node.js 20.12 or newer.
git clone https://github.com/evolve-hodl/tollgate.git
cd tollgate
npm install # also builds
node dist/cli.js init # creates ~/.tollgate with a fresh TESTNET walletinit prints your new testnet address and the config snippet for your MCP client. Then:
Send the address some free Base Sepolia ETH from a testnet faucet.
Write your mandate and limits in
~/.tollgate/policy.yaml.Optional: add
ANTHROPIC_API_KEY(intent check) andTELEGRAM_BOT_TOKEN+TELEGRAM_CHAT_ID(approvals on your phone) to~/.tollgate/.env.Connect your agent to Tollgate as an MCP server (stdio, the printed snippet), or try the demo agent below.
Note: consumer chat apps such as Claude Desktop refuse to send crypto on their own, so they are not a good client for Tollgate. It is built for agents you run yourself.
Demo agent
demo/agent.mjs is a small payments agent on the Claude API that only gets Tollgate's tools (needs ANTHROPIC_API_KEY in ~/.tollgate/.env):
npm run agent -- "Pay 0.00002 ETH to Coffee Corner for two flat whites."
npm run agent -- --file demo/poisoned-invoice.md "Please pay this invoice."Payments inside your mandate go through, anything unclear goes to your phone (or is rejected without Telegram), and every Tollgate decision is printed.
The memory attack. Current models often spot a crude injection like the hidden note in the invoice above. A poisoned memory is harder: the agent's own saved contacts say Coffee Corner has a new wallet, so it pays the attacker in good faith. Run it with --blind, which hides wallet_status, so the agent does not see your mandate (like most real agents):
npm run agent -- --blind --memory demo/poisoned-memory.md --file demo/invoice.md "Please pay this invoice."The agent sends the payment to the attacker's address. Tollgate blocks it: the recipient is new, and the intent check flags the claimed address change as manipulation.
Tools the agent gets
Tool | What it does |
| Address, balances, remaining budgets, your mandate |
| Send ETH |
| Send an ERC-20 token |
| Approve token spending (unlimited is blocked by default) |
| Raw contract call, decoded before signing |
Every call needs a reason. You see it in the approval message; the firewall never trusts it.
Files
Everything lives in ~/.tollgate/:
File | Purpose |
| Your mandate and rules (example) |
| Testnet key and optional API keys (permissions 600) |
| Known malicious addresses |
| Every decision, with reasons |
| Spending history for budgets |
Roadmap
Live threat feeds instead of a local list
Asset-change simulation (exactly what leaves your wallet)
Set your mandate from your phone, per task
More chains, mainnet once it is battle-tested
Plugins for agent frameworks (AgentKit, ElizaOS)
x402 payment checks
Hosted version with dashboard, team policies and audit export
Interested in the hosted version? Join the waitlist
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Pay-per-call safety checks for AI agents: screen a crypto address or URL before you transact.
Pre-spend firewall for AI agents. Approves, blocks, flags transactions against policy rules.
Pre-trade risk gating and verifiable decision evidence for AI trading agents. Oracle-backed price/safety checks across Base, Solana, Hyperliquid and BNB, plus signed receipts and portable evidence bundles for any agent action.
Security intelligence for AI agents monitoring Ethereum before actions.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to check balances and send transactions across multiple blockchains with automatic spending limit protection and policy enforcement.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to analyze Ethereum wallets, simulate transactions, and draft transfers with deterministic policy and risk scoring, requiring human approval before on-chain execution.12 npmISC
- AlicenseNot gradedqualityDmaintenanceSecurity layer for AI agents that evaluates transaction intents and returns verdicts (ALLOW/WARN/DENY) using deterministic rules, on-chain checks, and simulation.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to safely sign and send Solana transactions under a policy, with automatic signing for in-policy actions, air-gapped human approval for escalations, and rejection of disallowed transactions.50 npmMIT