Skip to main content

Documentation 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 starts Kode as a Model Context Protocol server over stdio. External agents — such as Claude Desktop — connect to it and can invoke Kode’s Context Engine and Verification-on-Write pipeline as structured tool calls. This lets any MCP-capable agent use Kode’s verification gates and code generation without leaving its own interface.

Synopsis

kode mcp serve
kode mcp serve --project-dir /path/to/project

Flags

FlagTypeDefaultDescription
--project-dirstringcurrent working directoryProject root that Kode’s tools operate against

How it works

kode mcp serve uses stdin/stdout for the MCP wire protocol (JSON-RPC over stdio). All Kode diagnostic output and logging is redirected to stderr so it does not interfere with the protocol stream. The server exposes Kode’s Context Engine and pipeline as typed tools that the connecting agent can call by name.
Because kode mcp serve communicates over stdio, you do not invoke it directly in a terminal during normal use. Instead, you register it in your MCP client’s configuration file so the client spawns the process automatically. See the Claude Desktop integration guide for the exact configuration snippet.

Claude Desktop integration

To use kode mcp serve with Claude Desktop, add an entry to Claude’s MCP configuration file (typically ~/.config/claude/mcp.json or the platform equivalent):
{
  "mcpServers": {
    "kode": {
      "command": "kode",
      "args": ["mcp", "serve", "--project-dir", "/path/to/your/project"]
    }
  }
}
Claude Desktop will spawn kode mcp serve automatically when it starts and route tool calls to Kode’s Context Engine.
Set --project-dir to the absolute path of the repository you are working in. If you switch projects frequently, create one MCP config entry per project with a descriptive name like "kode-backend" or "kode-frontend".