Wire up Claude Code
SenkaniApp auto-registers its MCP server globally on launch; senkani init wires PreToolUse + PostToolUse hooks per project. Two paths, no config files to maintain.
What SenkaniApp does on launch
- Installs the hook wrapper at
~/.senkani/bin/senkani-hook(compiled Mach-O when available, < 5 ms startup; bash fallback otherwise). - Ensures a single global MCP entry in
~/.claude/settings.jsonundermcpServers:"mcpServers": { "senkani": { "command": "/Users/you/.../SenkaniApp", "args": ["--mcp-server"] } }
- Strips any legacy global hook entries — Senkani never pollutes the global Claude Code hook chain.
- Idempotent on every launch. No sudo. No shell profile changes.
What senkani init modifies
- Run from a project root: registers PreToolUse + PostToolUse hook entries in
<project>/.claude/settings.json, pointing at~/.senkani/bin/senkani-hook. - Touches only the project's
.claude/settings.json— never global. Idempotent. - Reverse with
senkani init --uninstall; pin a specific binary withsenkani init --hook-path /path/to/senkani-hook. - Does not register the MCP server (that's the app's job above) and does not install the hook binary (the app does that too).
Verify
senkani doctor
Should show "MCP server registered" and "Hooks registered." If not, run senkani doctor --fix.
First session
- Launch SenkaniApp (open it from
/Applicationsor run.build/release/SenkaniApp). The Welcome surface gates Claude / Ollama launches behind a project-folder pick. - Click Choose project folder and select the repo you want the agent to work in. The Claude card flips to Start Claude in <project>.
- Click Start Claude in <project>. Senkani opens a Terminal pane in the project root and launches
claude; the agent sees all senkani MCP tools on top of Claude Code's built-ins. - Open an Analytics pane side-by-side (⌘K → "Analytics"). Watch token savings accumulate as the session runs.
MCP activation is gated on
SENKANI_PANE_ID, which the app injects only into managed panes. Run claude in a non-Senkani terminal and it won't see the senkani tools — by design.