Skip to main content
Guide · How-to

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

  1. Installs the hook wrapper at ~/.senkani/bin/senkani-hook (compiled Mach-O when available, < 5 ms startup; bash fallback otherwise).
  2. Ensures a single global MCP entry in ~/.claude/settings.json under mcpServers:
    "mcpServers": {
      "senkani": {
        "command": "/Users/you/.../SenkaniApp",
        "args": ["--mcp-server"]
      }
    }
  3. Strips any legacy global hook entries — Senkani never pollutes the global Claude Code hook chain.
  4. Idempotent on every launch. No sudo. No shell profile changes.

What senkani init modifies

  1. Run from a project root: registers PreToolUse + PostToolUse hook entries in <project>/.claude/settings.json, pointing at ~/.senkani/bin/senkani-hook.
  2. Touches only the project's .claude/settings.json — never global. Idempotent.
  3. Reverse with senkani init --uninstall; pin a specific binary with senkani init --hook-path /path/to/senkani-hook.
  4. 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

  1. Launch SenkaniApp (open it from /Applications or run .build/release/SenkaniApp). The Welcome surface gates Claude / Ollama launches behind a project-folder pick.
  2. Click Choose project folder and select the repo you want the agent to work in. The Claude card flips to Start Claude in <project>.
  3. 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.
  4. 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.

Next

Your first session →