Documentation

Getting started

Install Mikie, point it at a repo, and route compact, line-anchored context into your agents in a few minutes.

Overview

Mikie is a local-first MCP server. It ranks your repository, builds a compact line-anchored context packet for each prompt, injects it into your agent before the model turn, and records the tokens, cost, and outcomes to a durable measurement ledger. It works with Codex, Claude Code, Cursor, and any MCP-compatible client.

Install

From the repo root, install the package in editable mode:

powershell
python -m pip install -e . --no-deps

Verify the CLI is available:

powershell
mikie --help

Quickstart

Build a context packet for a prompt to see ranking and line anchors in action:

powershell
mikie build-context --cwd . --prompt "fix the redaction bug"

Set up Codex

Write the project-scoped Codex config and hooks:

powershell
mikie setup codex --cwd .

This registers the MCP server in .codex/config.toml and installs the UserPromptSubmit, PostToolUse, and Stop hooks. Restart Codex, then run /mcp in the TUI and confirm mikie is active.

Set up Claude Code

The Claude path is intentionally separate from Codex and writes a project runner under .mikie/claude/:

powershell
mikie setup claude --cwd .

The runner uses --setting-sources project, an empty MCP config, a minimal system prompt, and a tight tool set (Bash,Edit,Read) — the configuration that produced the best measured token savings.

Cursor and other MCP clients

Any MCP-compatible client can start the server over stdio. Point it at the Mikie server command:

powershell
mikie mcp serve --cwd .

This is a long-running stdio server — it waits for the client to send JSON-RPC. For a quick sanity check, use the smoke test below instead.

Smoke test

Run the terminating protocol and tool-discovery check:

powershell
mikie mcp smoke --cwd .

A passing smoke test confirms initialize returns server capabilities and tools/list includes the Mikie tools.

Reading savings

Read the measurement summary and export reports from the ledger:

powershell
mikie measure summary --cwd .
mikie measure export --cwd .

Claim boundaries

Mikie separates token savings from answer quality. Cost comparisons can be estimated from recorded usage, but accuracy claims require a paired baseline-vs-Mikie score. Until the evidence exists for a given claim, it stays blocked rather than inferred — so every number you report traces back to a measurement row.

Next steps

Compare agents side by side, track cost per accepted patch, and share a waste report. See pricing for the plan that fits your stack.