Add YeNo to Claude Code
Two ways: add YeNo as an MCP server with one command, or add YeNo's hook, which checks risky commands before they run and adds nothing to Claude's context. You can use both.
By Jude Eric ·
At a glance
Checked 11 November 2026. Menus move: if a name differs, look for "connectors", "apps" or "MCP".
| Way 1 | MCP server: claude mcp add, sign in with /mcp |
|---|---|
| Way 2 | Hook: runs before each command, 0 tokens, Node 18 or newer |
| Sign-in | A code you approve in YeNo on your phone |
| Address | https://app.yenorules.com/mcp |
Way 1: add YeNo as an MCP server
Run this in your terminal:
claude mcp add --transport http yeno https://app.yenorules.com/mcpThen start Claude Code, type /mcp, pick yeno and choose Authenticate. A YeNo page opens with a code: enter it in YeNo on your phone and tap Allow.
Add --scope user to have YeNo in every project, or --scope project to write it to the project's .mcp.json for your team.
Way 2: the YeNo hook (zero tokens)
The hook is a small script Claude Code runs before each command. Ordinary coding (reading, editing, tests) runs as usual and isn't sent anywhere. Risky actions are checked against your rules first: deleting files or data, force-pushing, publishing, deploying and paying.
- In YeNo on your phone, open the AI → Token use and download yeno-hook.mjs. Save it as ~/.claude/hooks/yeno-hook.mjs.
- Set YENO_KEY to this AI's YeNo link, for example in your shell profile.
- Add the hook to ~/.claude/settings.json (YeNo can copy this for you):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|mcp__.*",
"hooks": [
{
"type": "command",
"command": "node ~/.claude/hooks/yeno-hook.mjs",
"timeout": 90
}
]
}
]
}
}Yes runs as usual. No blocks it, and Claude is told why. Ask me waits for your OK on your phone; if you don't answer in time, Claude Code asks you in the terminal instead. If YeNo can't be reached, Claude Code asks you: a risky action is never silently let through.
What Claude Code checks
Claude Code reads, edits and tests code as usual. YeNo is for the moves you'd want a say in: deploying, publishing a package, force-pushing, deleting data or cloud resources, and spending money. Your rules answer yes, no (with the reason, so the agent can do something else) or ask me, which waits for a tap on your phone.
Rules files such as AGENTS.md tell an agent how to write code; YeNo checks what it's allowed to do. Rules for AI agents explains the difference.
Not working?
- Type /mcp: YeNo should say connected. If it needs authentication, choose Authenticate again.
- For the hook, check that node --version is 18 or newer and that YENO_KEY is set in the shell that starts Claude Code.
- Run claude mcp list to see every server Claude Code knows about.
Questions, answered
01Hook or MCP server?
The hook checks commands without the agent having to remember, and uses no tokens. The MCP server lets Claude ask YeNo about your rules and budget itself. Many people use both.
02Does the hook send my code to YeNo?
No. Only risky actions are checked, and YeNo gets the action, not your files.
Cite this page
Jude Eric, YeNo Rules. “YeNo for Claude Code.” Last updated . www.yenorules.com/guides/yeno-for-claude-code