Open source · MIT · self-hosted
A checkpoint between your agent and the scam.
AI agents now click links and pay for things. scamgate checks every link and payment before the agent acts, and answers allow ask or deny with reasons a person can read.
uv tool install git+https://github.com/odaiameera/scamgate@v0.2.0
No network calls while checking No LLM judging Same input, same verdict
scamgate-hook output. deny blocks the call, ask sends it to you, allow means the hook stays silent. Click a row for the reason.Every point has a reason.
Rules add points. Under 25 is allow, 25 to 69 is ask, 70 or more is deny. Pick a case: these are
exactly what scamgate returns, generated from the code, not typed in.
Swipe the cases →
A check the agent can choose to skip isn't a check.
Over MCP the agent decides whether to ask, and a prompt injection can tell it not to. The hook moves the decision into the harness. The mechanics page is the call order, the dialects, and what is not scanned.
| Mode | MCP toolscheck_url · check_payment | Hookscamgate-hook |
|---|---|---|
| Who runs the check | The agent, if it remembers | The harness, before every gated tool call |
| On deny | A warning the agent should respect | The call is blocked |
| On ask | The agent should stop and ask you | Hermes sends it to you for approval; Claude Code prompts you |
| Destination unreadable | Not checked | You approve it, judged per command (curl "$URL", string-built or encoded links, new packages) |
| On its own crash | Nothing happens | Fails closed: the call is blocked |
| Tampering | Nothing stops it | Blocks edits to its files, rules and hook config, and installed copies verify their own files |
| Works with | Any MCP client | Hermes shell hook, Hermes plugin, Claude Code PreToolUse |
Yes, a hook can be scammed too.
So here's how, and what scamgate does about each one. The honest limits are in the docs.
Going around it
The agent fetches the page with curl, a script, or browser code instead of the browser tool.
CounterEvery network-capable tool is gated, including unknown MCP tools. Each command segment is judged alone. A script the command names is read, including scripts that file calls. Disguised hosts are decoded, including
https:/andhttps:///. A destination it can't read goes to you.Lying about the payee
The agent passes
is_new_payee=falsefor someone you've never paid.CounterPayee facts come from a local history of people you've actually paid, stored as salted hashes. A known name with a new account counts as changed bank details.
Switching it off
An injected instruction tells the agent to edit the rules, turn Hermes approvals off, start
--yolo, or uninstall the gate.CounterThose commands are blocked, in the shell and inside a script the agent then runs. Writes to the gate, its state, and Hermes or Claude hook config are blocked. Installed copies check their files on every call.
Crashing it
Malformed input or an exception, hoping the gate fails open.
CounterFails closed: exit code 2 and a block message. Hermes'
fail_closedand Claude Code'sonFailure: "block"cover timeouts and crashes too.Training it
Hit the same harmless-looking site for a week until it gets allow-listed, then switch.
CounterNothing is learned automatically. You promote rules yourself, and an allow waives one rule on one exact host, never feeds, your blocklist or intent checks.
Wearing you down
Enough harmless prompts and you start tapping yes.
CounterEvery ask is logged with what you did.
scamgate reviewshows what keeps tripping it, so repeats become rules instead of prompts.
Gate the click and the payment before the damage.
uv tool install git+https://github.com/odaiameera/scamgate@v0.2.0