Kode implements the Model Context Protocol (MCP) as an MCP server. When you runDocumentation Index
Fetch the complete documentation index at: https://kode-f177b001.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
kode mcp serve, Claude Desktop and any other MCP-compatible client can invoke Kode’s Context Engine and Verification-on-Write pipeline as first-class tools — meaning Claude can build a surgical context graph of your codebase and apply verified code changes on your behalf, with the same verification gates Kode enforces in kode run and kode loop.
What Kode exposes over MCP
The server registers two tools that clients can call:| Tool | Description |
|---|---|
kode_plan | Uses Kode’s Tree-sitter Context Engine to build a context graph (up to 8 000 tokens) for a given task description. Returns a structured context packet with files, AST nodes, import edges, and confidence scores. |
kode_apply_verified | Runs the full Generate → Verify → Apply pipeline for a task description. Hunks are verified through the same gate that kode run uses before anything is written to disk. Returns a success message with the count of applied hunks, or the last error message if the pipeline failed. |
task string as their input.
Starting the MCP server
stdio — it reads JSON-RPC requests from stdin and writes responses to stdout. All Kode diagnostic output goes to stderr so it does not interfere with the MCP wire protocol.
The MCP server must have access to your project directory on disk. The
--project-dir flag defaults to the current working directory, so run kode mcp serve from inside your project or pass the path explicitly. Claude Desktop’s working directory may differ from your shell’s, so using --project-dir with an absolute path is recommended.Configuring Claude Desktop
Add the following entry to your Claude Desktop configuration file. On macOS the file is at~/Library/Application Support/Claude/claude_desktop_config.json:
kode appear in the tool list. Claude can now call kode_plan to understand your codebase and kode_apply_verified to make changes — both subject to Kode’s verification gate.
How the tools behave inside Claude
When Claude callskode_plan, it receives a JSON context packet describing the files, symbols, and relationships in your codebase that are relevant to the task. Claude can use this context to understand the blast radius of a change before asking kode_apply_verified to make it.
When Claude calls kode_apply_verified, Kode runs the full pipeline internally:
- Sends the task description to your configured LLM (same model as
kode run) - Parses the structured JSON hunks from the response
- Passes every hunk through the verification gate (syntax, imports, calls, architecture)
- Writes only the verified hunks to disk in your project directory
- Returns a success message with the count of applied hunks, or the last error message if the pipeline failed
Next steps
First Task
Learn the core
kode run workflow that underpins both the CLI and the MCP kode_apply_verified tool.Daemon Mode
Run Kode in the background to catch tech debt automatically without any manual invocation.