Claude Code
ototo init sets Otōto up in Claude Code, and the installer runs it for you. This page says what it changes, so
that you can read it before you say yes, do it by hand, or take it out again.
What we ran (11 October 2026): Claude Code 2.1.296 with Otōto 2026.19 on a Mac, set up by ototo init:
claude mcp get ototo says Connected, and ototo doctor passes its checks for Claude Code. It is also how Otōto is
written, and the figures on ototo.dev were measured with Claude Code.
Claude Code 2.1 or later.
Set up
ototo init
finds a model server, tests it, lists what it will change and asks before it writes. --dry-run only lists,
--yes does not ask, and it can be run again at any time: it is also the step after an upgrade. Each file it
changes is backed up first, as <file>.before-ototo-<time>.
Then start a new Claude Code session: one that is already running keeps the tools it started with.
What it changes
The registration. ototo as an MCP server for all your projects. By hand, that is:
claude mcp add ototo --scope user -- ~/.local/bin/ototo serve
It serves the directory Claude Code starts it in. -e OTOTO_…=… on the registration sets a setting for it, and
wins over ~/.config/ototo/config.toml; a project’s .mcp.json can register it with settings of its own.
~/.claude/CLAUDE.md. A marked block that tells Claude when to use Otōto: for a question about the code, first
ask with the whole question; read with read and outline; search with search. The text is
dist/CLAUDE.ototo.md. A
CLAUDE.md that already tells Claude about Otōto in your own words is left as it is. This block is where the
savings come from: the same advice in the MCP server’s own instructions alone was weaker.
~/.claude/settings.json. Three things:
| Key | What is added | Why |
|---|---|---|
permissions.allow | mcp__ototo | Otōto’s tools run without a prompt each time |
permissions.deny | Grep, Glob, Bash(grep:*), Bash(rg:*), Bash(find:*), Bash(git grep:*) | Claude’s own search is off, so a question goes to ask and exact text to search. It is how we run it, and how it was measured |
hooks | four, below |
| Hook | What it does |
|---|---|
UserPromptSubmit | Says with each prompt what the block says, briefly |
SubagentStart | Says the same to the agents Claude starts, which see neither CLAUDE.md nor the prompt hook, only the brief Claude writes for them |
PreToolUse on Bash | ototo hook bash refuses a command that only prints code (sed -n '10,40p', head, cat, and unzip -l or javap on an archive) on a file Otōto can read, and names the ototo read to make. Pipes, redirections, other commands and files outside the repository run as before; about 10 ms |
PreToolUse on Read | ototo hook read refuses nothing. When Claude reads a file one of the plugins reads (a pipeline, a compose file), it adds a note naming the ototo read that gives the file as its tool evaluates it |
ototo init --keep-search leaves Claude’s own search on: no permissions.deny, and no hook on Bash. The rest is
the same.
With no small model
ototo init on a machine with no model server sets up the tools that need none: search, read, outline,
changes, history and replace_all. The block and the hooks then speak of those alone. Run ototo init again
once a server runs (quick starts), and ask, locate, callers and edit join them.
Check
claude mcp get ototo
should say Status: ✔ Connected. ototo doctor checks the three parts above, with the model server and the
plugins, and says what to do about anything wrong.
Worth knowing
- A long question. An
askcan take minutes. If Claude Code gives up on one, raiseMCP_TOOL_TIMEOUT(milliseconds) in its environment. - Git worktrees. Otōto serves the checkout the session started in and that repository’s other worktrees: a call
works in one when its paths point inside it, or when it passes
root. - Directories added to the session (
/add-dir,claude --add-dir) are served the same way. A home directory or/is too broad, and is not. - Agents. Claude’s own agents get Otōto’s tools too, and the
SubagentStarthook tells them so. When you brief one yourself, say it as well: outline a file before reading it, readpath#Namefor the parts that matter.
Taking it out
sh uninstall.sh, from the package, undoes all of it and removes the binary. By parts:
claude mcp remove ototo -s user
ototo settings remove ~/.claude/settings.json
and delete the block between <!-- ototo:begin and <!-- ototo:end --> in ~/.claude/CLAUDE.md. Everything else in
those files stays as it was.
For everyone on a machine
ototo managed writes the registration, the permissions and the hooks as Claude Code’s managed settings
(managed-mcp.json, managed-settings.json), which apply to every user and sit above anything a user or a project
sets: see For organisations.