Claude Code + Open Kioku MCP

Give Claude Code an evidence layer before it edits your codebase

Connect Open Kioku as a local MCP server so Claude Code shows its evidence before it edits — files, streams, confidence, caveats — declares an edit boundary in a plan, and has its diff verified against that plan. Nothing leaves your machine.

Setup Guide

4 steps to code intelligence in Claude Code.

Install, index, connect, prompt. Indexing time depends on repo size; Open Kioku commands run locally on your machine.

  1. 1

    Install Open Kioku

    Install the CLI globally. The npm wrapper pulls the native binary for macOS, Linux, or Windows automatically.

    terminal
    $ npm install -g open-kioku

    Other channels: cargo install open-kioku-cli or cargo binstall open-kioku-cli from crates.io; binaries with checksums, an SBOM, and provenance on GitHub releases.

  2. 2

    Index your repository

    Navigate to your project directory and run the indexer. Open Kioku scans files, extracts symbols, builds a dependency graph, and creates local SQLite + Tantivy search indexes under .ok/.

    terminal
    $ ok index .
  3. 3

    Connect MCP to Claude Code

    Shortcut: one command indexes the repository, writes a repository-scoped .mcp.json plus managed guidance, and checks that the local server answers an MCP initialize request (run without --apply to preview; nothing is written).

    terminal
    $ ok setup agent claude --repo . --apply

    Or generate the MCP server entry for Claude Code manually and paste it into your Claude Code MCP settings:

    terminal
    $ ok mcp install claude --repo .
    MCP config output — paste into Claude Code settings
    {
      "mcpServers": {
        "open-kioku": {
          "command": "ok",
          "args": [
            "mcp",
            "serve",
            "--repo",
            "/absolute/path/to/repo",
            "--read-only"
          ]
        }
      }
    }
  4. 4

    Paste the golden agent prompt

    Add this prompt to your CLAUDE.md file or system instructions. It tells Claude Code to gather evidence from Open Kioku before every edit and verify changes afterward.

    CLAUDE.md — golden prompt
    Use Open Kioku before editing. Check repo_status, search_code, get_definition,
    get_references, impact_analysis, and find_tests_for_change. Build a plan with
    plan_change first, then edit, and verify after the edit with verify_change.
What You Get

MCP tools Claude Code can call after setup.

Every Open Kioku tool runs locally against your indexed repo. No hosted index or embeddings service required, read-only by default.

What to expect: on a Java repository of about ten thousand files the right file is in the top five about half the time and in the context pack about two thirds of the time; on a TypeScript repository of about nine hundred files, in the pack nearly nine in ten and in the top five about four in five. That is the retrieval floor before exact lookups and the plan → verify loop; it is re-measured nightly against frozen baselines. Numbers and method.

plan_change

Build an evidence-backed edit plan with primary context, impact candidates, validation targets, and boundary policies — before touching a single file.

verify_change

After editing, verify the change stayed within the plan's boundaries and didn't break expected contracts.

search_code

BM25-ranked code search returning snippets with file paths, line ranges, and confidence scores.

get_definition

Jump to the definition of any symbol — functions, classes, types — from the local symbol index.

get_references

Find every reference to a symbol across the codebase using indexed graph edges, not text matching.

impact_analysis

Trace which modules, callers, and dependents a proposed change would affect before it happens.

find_tests_for_change

Identify which tests cover the files and symbols you're about to change, so the agent runs the right ones.

repo_status

Check index health, file counts, symbol totals, and last-indexed timestamps at a glance.

build_context_pack

Assemble a focused context window of relevant files, symbols, and tests for a specific task.

Back to openkioku.com