Cursor + Open Kioku MCP

Give Cursor an evidence layer before it edits your codebase

Open Kioku is a local-first MCP server that gives Cursor code search, symbol resolution, impact analysis, and evidence-backed edit plans. Index once, plan from facts, verify bounded changes. Open Kioku does not upload source.

4-Step Setup

From zero to evidence-backed edits in four local steps.

Install the CLI, index your repo, connect MCP to Cursor, and paste the golden prompt. The Open Kioku commands run locally.

1

Install Open Kioku

Install the CLI globally with npm. The wrapper pulls the native binary for your OS automatically (macOS, Linux, Windows).

terminal
$npm install -g open-kioku
2

Index your repo

Build the local index — files, symbols, imports, tests, and graph edges — all stored under .ok/ in your repo. Open Kioku does not send the index to a hosted service.

terminal
$ok index .
# Scans files → parses symbols → builds graph → indexes for search
# Local indexes: .ok/index.sqlite + .ok/search/tantivy
3

Connect MCP to Cursor

Generate the MCP server configuration for Cursor. This prints a JSON snippet that you paste into Cursor Settings → MCP.

terminal
$ok mcp install cursor --repo .
How to paste: Open Cursor → Settings (⌘ ,) → search "MCP" → click "Edit in mcp.json" → paste the JSON below and save.
mcp.json
{
  "open-kioku": {
    "command": "ok",
    "args": [
      "mcp",
      "serve",
      "--repo",
      "/absolute/path/to/repo",
      "--read-only"
    ]
  }
}
4

Paste the golden prompt

Add this prompt to your Cursor chat or .cursorrules file. It tells the agent to use Open Kioku's plan-before-edit workflow every time.

.cursorrules
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 Cursor can call after setup.

Every tool runs locally against the index you built in Step 2. Read-only by default. No hosted index or embeddings service required.

plan_change

Build an evidence-backed edit plan with primary context, impact candidates, validation targets, and boundary policy.

verify_change

After the edit, verify that changes stayed inside the plan boundaries and flag any drift or unintended side effects.

search_code

BM25 full-text search over your codebase. Returns ranked snippets with file paths, line ranges, and confidence scores.

impact_analysis

Trace callers, dependents, and affected modules using the local symbol graph. Know what breaks before you touch it.

get_definition

Jump to the definition of any symbol — function, class, type, or constant — from the indexed symbol table.

get_references

Find every reference to a symbol across the codebase. Uses persisted graph edges, not text grep.

find_tests_for_change

Surface the test files and test functions most relevant to a planned change, before the agent starts editing.

repo_status

Get a snapshot of the indexed repository — file counts, symbol counts, index freshness, and health signals.

build_context_pack

Assemble a focused context bundle from search results, symbols, and graph data for the agent's next edit.

Local & Private

Built for codebases people cannot upload.

All indexes stored locally under .ok/
No cloud API or embeddings service
MCP stdio transport — no open ports
Read-only by default
Write tools explicitly gated
No source upload by Open Kioku