Open Kioku
Open Kioku is a local, read-only evidence layer for AI coding agents that indexes your codebase and provides structured tools for code search, symbol resolution, impact analysis, planning, and verification before and after edits. Optional write tools exist for memory and change contracts.
Repository Discovery & Inventory
repo_status– Check index freshness (file count, symbol count, timestamp)list_files,list_languages,list_symbols– Browse indexed files, detected languages, and symbols
Code Search
search_code– BM25 lexical search across indexed code chunkssearch_files– Search by filename, path fragment, or content keywordssearch_symbols– Fuzzy/ranked symbol name searchregex_search– Exact regex pattern matching against source lines
Symbol & Definition Resolution
get_definition– Retrieve a symbol's definition location and bodyget_references– Find all usages/call-sites across the codebaseget_symbol_context– Comprehensive context bundle (definition, docs, enclosing scope)explain_symbol/explain_file– Concise explanations and indexed metadata
Dependency & Impact Analysis
impact_analysis– Blast radius of a file change (dependents, callers, related tests)module_dependencies– List direct dependency graph neighborsdependency_path– Trace the shortest path between two files or symbols
Architecture Analysis & Policy
detect_architecture– Infer architectural components and layersarchitecture_boundaries– Retrieve component boundaries and import constraintsarchitecture_violations– Detect import-graph boundary violationsarchitecture_policy_check/architecture_policy_explain/architecture_policy_validate– Enforce, explain, and validate architecture policysummarize_architecture– Structured overview with layer constraints and violation checks
Context Building
build_context_pack– Ranked, token-efficient context bundle for a taskbuild_compressed_context/retrieve_context– Compressed context handles to save prompt tokens
Pre-Edit Planning
plan_change– Evidence-backed pre-edit plan (files, impact, line ranges, test targets)propose_patch/review_patch/validate_patch– Draft, safety-review, and validate patch plans without writing files
Change Contracts
create_change_contract/get_change_contract– Create and retrieve versioned change contracts
Post-Edit Verification
verify_change– Verify a diff against a saved plan (boundary checks, API surface, dependency policy)verify_change_contract– Verify a diff against a stored or inline change contractexplain_verification– Human-readable verification report with failures, warnings, and next steps
Test Selection & Coverage
find_tests_for_change– Identify and rank relevant test files for a changed filerecommend_validation_plan– Recommend tests, static checks, and coverage actionsexplain_test_coverage– Inspect stored test-coverage evidence
Memory
remember_fact– Persist durable, repository-scoped facts across sessionssearch_memory– Search recorded memory facts by keyword
Evidence Graph
get_evidence_schema– Retrieve the versioned graph schema (node/edge types, query properties)query_evidence_graph– Execute read-only Cypher-like queries against the structural evidence graph
Provides code intelligence tools (search, symbol resolution, impact analysis, test discovery) for OpenAI Codex agents.
Open Kioku (ok)
Plan before edit. Verify after edit.
Open Kioku is a local repository evidence and change-safety layer for coding agents.
It builds a local evidence model of a repository, compiles the smallest useful context for a task, produces bounded change plans before edits begin, and verifies the resulting change against what the agent intended to modify.
CODE + SYMBOLS + RELATIONSHIPS + TESTS + HISTORY + RUNTIME + DOCS + ARCHITECTURE + LOCAL SEMANTICS
│
▼
EVIDENCE MODEL
│
▼
CONTEXT COMPILER
│
▼
PLAN → EDIT → VERIFY → PROVENo hosted code index. No source upload. Read-only MCP tools by default. Optional semantic retrieval runs locally.

Related MCP server: Context Zero Engine
First Win: 2 Commands
npm install -g open-kioku
ok setup agent cursor --repo . --applyFor Claude Code:
ok setup agent claude --repo . --applyThe setup command indexes the repository, installs repository-scoped guidance and MCP configuration, and checks that the local MCP server responds. Run it without --apply first to inspect the exact changes.
Then ask the agent for the change you need. Open Kioku gives it a pre-edit evidence routine instead of making it rediscover the repository from scratch for every task.
What Open Kioku Understands
Open Kioku combines multiple evidence streams instead of treating repository understanding as a single search problem:
Evidence | What it contributes |
Code & symbols | Definitions, chunks, imports, occurrences, scopes, source ranges |
Relationships & impact | Dependency paths, calls, references, types, inheritance, affected files/symbols |
Tests & coverage | Validation candidates, test-to-code evidence, local coverage reports |
Git history | Churn, co-change, ownership, reviewers, provenance, similar changes |
Runtime evidence | Local traces, spans, logs, incidents, errors, failures |
Documentation | Heading-aware repository documentation retrieval |
Architecture & contracts | Boundaries, policies, public API/dependency constraints, change contracts |
Local semantics | Optional local embeddings, hybrid retrieval, exact-flat and persistent ANN backends |
Exact evidence remains authoritative over heuristic evidence. Ambiguity is represented as ambiguity rather than silently promoted to a fact.
Context Compiler
A coding task is routed through independent candidate streams and compiled into a bounded ContextPack:
TASK
│
├─ lexical / BM25
├─ exact symbol + reference evidence
├─ graph + impact evidence
├─ tests + coverage
├─ history
├─ runtime
├─ docs
├─ architecture + contracts
└─ optional local semantic retrieval
│
▼
authority-aware fusion
diversity / redundancy control
token-budget optimization
│
▼
CONTEXTPACK + omissions + provenance + qualityTask-family routing, evidence provenance, blocker handling, token budgets, and retrieval quality are benchmarked through the real routed path rather than only through isolated search functions.
What Your Agent Gets
Explore → plan_change → edit → verify_changeStart with:
ok plan "change token expiration"or MCP plan_change.
A plan can include:
primary context with source identity and evidence provenance
impact candidates
likely validation targets
edit boundaries
explicit missing-evidence caveats
confidence and quality signals
After the edit, verification checks the actual change against the plan rather than treating a successful command exit as proof that the right files changed.
Dogfooded Proof
The homepage includes proof artifacts produced from a pinned main build at commit acbc5bcb387551501b3bc350247d25c133116d75.
Local semantic scale
A synthetic offline repository produced:
51,349 semantic vectors
25,673 symbols
25,676 chunks
persistent local HNSW selected automatically above the crossover
21.70s fresh semantic build
about 554 MB peak RSS during that build
0 stale / 0 failed vectors
successful fresh-process reopen of the persisted ANN index
See demo/proof/ann-50k-dogfood.json.
Plan → edit → validate → verify
The same pinned build was exercised through a real sandbox workflow. Open Kioku ran cargo test through its policy-gated validation runner, recorded the validation attestation, observed 2 tests passed / 0 failed, and found 0 boundary violations. The final verdict still remained warn because stronger supporting evidence was absent.
That behavior is intentional: passing tests do not manufacture certainty that the available evidence does not support.
See demo/proof/verification-dogfood.json.
A separate public-repository audit indexed 4,600+ files, 46,000+ symbols, and 8,900+ tests locally in 33.1s. Methodology, revisions, caveats, and language limitations are recorded in docs/large-repo-proof.md.
Local Semantic Retrieval
Semantic search is optional. The default repository-intelligence workflow does not require a hosted embedding service.
When enabled, Open Kioku can build embeddings locally, combine semantic and lexical retrieval, persist the semantic manifest and model provenance, and select between an exact-flat correctness oracle and a persistent ANN backend based on the configured/indexed scale.
ok --repo . semantic status
ok --repo . semantic index
ok --repo . search "authorization expiry" --hybridModel acquisition is explicit and policy-controlled. Network-denied execution fails closed rather than silently reaching a hosted service.
See docs/semantic-search.md, docs/vector-index.md, and docs/embedding-providers.md.
See the Proof on Your Repo
ok prove . --task "the feature you're working on"
ok prove . --task "the feature you're working on" --htmlok prove creates a shareable report with indexed counts, task scores, validation signals, and caveats while intentionally omitting source snippets.
For pull requests, the opt-in open-kioku-action can attach a privacy-safe preflight artifact:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: shivyadavus/open-kioku-action@v1
with:
task: "change token expiration"
verify: trueInstall
npm (recommended)
npm install -g open-kioku
ok --versioncargo-binstall
cargo binstall open-kioku-clicrates.io
cargo install open-kioku-cliFrom source
git clone https://github.com/shivyadavus/open-kioku.git
cd open-kioku
cargo install --path crates/open-kioku-cliSet Up a Repository
ok init /absolute/path/to/repo
ok index /absolute/path/to/repo
ok doctor /absolute/path/to/repo
ok status /absolute/path/to/repo --markdown --write ok-status.mdOpen Kioku writes repository intelligence under .ok/, including SQLite metadata/graph state and Tantivy lexical search data. Source files are not rewritten by indexing.
Keep the index current while editing:
ok watch /absolute/path/to/repoConnect an Agent
Repository-scoped onboarding:
ok setup agent claude --repo /absolute/path/to/repo --apply
ok setup agent cursor --repo /absolute/path/to/repo --applyManual MCP configuration is available for the supported client matrix:
ok mcp install cursor --repo /absolute/path/to/repo
ok mcp install claude --repo /absolute/path/to/repo
ok mcp install codex --repo /absolute/path/to/repo
ok mcp install gemini --repo /absolute/path/to/repo
ok mcp install windsurf --repo /absolute/path/to/repo
ok mcp install trae --repo /absolute/path/to/repo
ok mcp install opencode --repo /absolute/path/to/repo
ok mcp install zed --repo /absolute/path/to/repoThe default MCP server is local, read-only, and communicates over stdio.
Agent setup guides: Claude · Cursor · Codex · Gemini CLI.
Multi-Project Intelligence
Index projects individually, then link them into a workspace without reparsing source:
[workspace]
projects = [
{ name = "service-a", repo = "../service-a" },
{ name = "service-b", repo = "../service-b" },
]ok index --mode cross-project --workspace /absolute/path/to/workspace
ok architecture fleet --workspace /absolute/path/to/workspaceIndex Snapshots
Known-good indexes can be exported/imported for local team and CI reuse:
ok --repo . snapshot export --quality best
ok --repo . snapshot doctor
ok --repo . snapshot import
ok --repo . index --from-snapshot autoPersonal memory and compressed-context state are excluded from the shared index snapshot by default.
History, Runtime, and Validation Evidence
Git history is local and enabled by default with a bounded window. It contributes typed commit metadata, file touches and renames, co-change, churn, provenance, ownership, reviewer, and similar-change signals.
Runtime evidence is opt-in: local JSONL traces/logs/incidents/errors can be placed under .ok/runtime/ or .ok/analysis/runtime/ and re-indexed.
Validation evidence is opt-in: Open Kioku can ingest JUnit XML, lcov, Cobertura XML, JaCoCo XML, and coverage.py XML/JSON from common local report directories and map covered lines back to indexed files, symbols, and plausible tests.
These sources contribute evidence; they do not outrank exact source/reference truth.
Architecture, Contracts, and Verification
Open Kioku can detect architecture, evaluate policies, create bounded change contracts, and verify dependency/API/boundary constraints around a change.
ok --repo . architecture detect
ok --repo . architecture overview
ok --repo . architecture policy check --json
ok --repo . --json contract create "update API boundary"
ok --repo . contract verify --id <contract-id> --changed src/api.rs
ok --repo . verify --plan /tmp/plan.json --gitBenchmarks
Quality is treated as a measurable product surface:
ok retrieval-bench . --cases-file benchmarks/retrieval-cases.json --min-cases 30
ok workflow-bench . --cases-file benchmarks/workflow-cases.json --limit 10
ok eval . --case "auth flow=src/auth.rs,tests/auth_flow.rs"The frozen retrieval corpus and regression policy are documented in docs/retrieval-benchmark.md.
Security Model
read-only MCP by default
no hosted repository index
no source upload
no hosted embeddings required for the core workflow
optional semantic inference stays local
secret-like paths are blocked by policy
command execution is policy-gated
source edits remain in the normal editor/agent harness
network denial is supported and failures are explicit
See docs/security-model.md and SECURITY.md.
Language Support
Tree-sitter parsing and symbol extraction covers Rust, Python, TypeScript/TSX, JavaScript/JSX, Go, and Java. YAML and JSON are parsed structurally. File/chunk indexing also covers repository text and configuration formats including TOML, SQL, Markdown, and Terraform.
Language-aware resolution adds scope, import, receiver/type, containment, and inheritance semantics where supported. Exact-reference indexes can further raise authority and precision.
Useful Commands
ok --repo . search "token expiration handler"
ok --repo . symbol definition PolicyGate
ok --repo . symbol refs PolicyGate
ok --repo . impact --file src/auth.rs
ok --repo . tests --changed src/auth.rs
ok --repo . context "change token expiration" --format markdown
ok --repo . plan "change token expiration" --format markdown
ok --repo . preflight "change token expiration"
ok --repo . verify --plan /tmp/plan.json --git
ok --repo . history similar --task "change token expiration" --path src/auth.rs
ok --repo . semantic status
ok --repo . graph schema
ok prove . --task "change token expiration"Current top-level commands (38): init, index, snapshot, watch, status, doctor, setup, demo, search, semantic, symbol, explain, impact, path, tests, context, retrieve-context, plan, preflight, verify-boundary, verify, contract, bench, workflow-bench, retrieval-bench, relationship-bench, contract-bench, eval, prove, adr, ui, architecture, history, patch, memory, mcp, scip, and graph.
Full MCP tool reference: docs/mcp-tools.md.
Repository Layout
This is a 43-crate Cargo workspace. Important crates include:
open-kioku-cli—okCLI and top-level product surfaceopen-kioku-mcp— local JSON-RPC MCP serveropen-kioku-core— evidence, graph, report, and relationship authority contractsopen-kioku-ingest— indexing pipeline and evidence ingestionopen-kioku-resolution— scope/receiver/type-aware semantic resolutionopen-kioku-context— routed candidate streams and ContextPack compilationopen-kioku-graph— evidence graph and query layeropen-kioku-semantic— local semantic indexing and hybrid retrievalopen-kioku-vector— exact-flat oracle and persistent local ANN backendopen-kioku-plan— evidence-backed pre-edit planningopen-kioku-impact— impact analysisopen-kioku-tests— validation target selectionopen-kioku-architecture— architecture detection and policy evaluationopen-kioku-contract— change-contract schema and validationopen-kioku-patch— post-edit verificationopen-kioku-storage-sqlite— local persistence
Architecture: docs/architecture.md · Crate map: docs/crate-map.md · Storage: docs/storage-model.md
Development
cargo fmt --all --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all
cargo test -p open-kioku-cli --test cli_smoke
ok retrieval-bench . --cases-file benchmarks/retrieval-cases.json --min-cases 30
ok workflow-bench . --cases-file benchmarks/workflow-cases.json --limit 10Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md.
If Open Kioku improves your agent workflow, consider starring the repository.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePersistent codebase knowledge layer for AI agents. Pre-digests codebases into structured knowledge (symbols, dependency graphs, co-change patterns, architectural decisions) and serves via MCP. 28 languages, 14 tools, ~85% token reduction.537MIT
- AlicenseNot gradedqualityAmaintenanceA local code-intelligence engine for AI agents that indexes repositories into a PostgreSQL-backed code graph and serves structured, token-budgeted context over MCP and HTTP, enabling targeted queries on symbols, dependencies, contracts, and impact analysis.Apache 2.0
- AlicenseNot gradedqualityAmaintenancePersistent, local memory for AI coding agents that learns how you work, not just what you said. Supports Claude Code, Codex CLI, Cursor, and any MCP client.63MIT
- AlicenseAqualityAmaintenanceSemantic codebase search + persistent working memory for AI code editors. Local, zero-config, MCP. No API key.202MIT
Related MCP Connectors
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Hosted memory for AI agents that learns and forgets — one key across Claude, Cursor & ChatGPT.
One shared brain for your AI coding agents: team memory, agent Q&A, tasks, and file claims.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shivyadavus/open-kioku'
If you have feedback or need assistance with the MCP directory API, please join our Discord server