kilo-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KILO_MCP_CONFIG | No | Path to the configuration file. Overrides default search locations. | |
| KILO_MCP_TIMEOUT | No | Timeout in seconds for Kilo subprocesses. Defaults to 1800. | 1800 |
| KILO_MCP_DATA_DIR | No | Directory for task records and metrics data. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
kilo-mcp exposes the local Kilo Code CLI: kilo_implement delegates development work, kilo_rag_search queries the semantic index of the workspace.
IMPORTANT — the indexing resource is yours to use directly: kilo_rag_search reads the codebase index maintained by the Kilo IDE extension, and it is available for YOUR OWN exploration and development work, not only as a scoping step before delegating to kilo_implement. Whether or not you delegate the implementation, prefer kilo_rag_search over grep-style search for conceptual queries ('where is X handled?') on indexed workspaces — it is cheaper than pulling files into your context and works from intent rather than exact strings.
Orchestration workflow (for the connected assistant)
Phase 1 — Discovery & RAG: explore with kilo_rag_search; check capabilities with kilo_list_models and kilo_auth_status.
Phase 2 — Isolation: kilo_implement has NO isolation and NO locking by default — it runs directly in working_directory (defaulting to the server's own cwd) with nothing preventing a concurrent writer (another kilo_implement call, or your own git commands) from racing it in the same tree. Pass isolation='worktree' on kilo_implement (or call kilo_create_worktree yourself first) for anything beyond a single trivial edit, and always when dispatching parallel tasks against the same repo. If you skip isolation, kilo_implement still warns you when another task is already running against the exact same working_directory — do not proceed past that warning without a plan (wait, isolate, or pick a different directory).
Phase 3 — Delegation: call kilo_implement in parallel across the worktrees. It runs in the BACKGROUND BY DEFAULT and returns a task_id immediately — the conversation is never blocked waiting for Kilo.
Phase 4 — Monitoring & intervention: scale how closely you watch a task to its complexity/risk. Small, well-scoped delegations can be awaited deterministically with kilo_task_wait (which polls and reconciles orphaned processes from their log files, returning kilo_task_result when done or live progress on timeout). Large, multi-file, or high-risk ones are worth polling periodically with kilo_task_progress (Kilo's own live plan/todo list, recent commentary, running cost — read from its session database, not a heuristic); kilo_task_status gives a quicker but coarser OS-level signal. If a task drifts off-spec or looks stuck, kilo_task_cancel stops it, and a corrective kilo_implement call with continue_session_id resumes the same session with corrective instructions instead of starting blind.
Phase 5 — Verification & review: inspect results with kilo_workspace_status, run verification gates with kilo_verify_worktree, and review every Final Report.
Phase 6 — Closure & telemetry: log orchestration decisions with kilo_log_decision and defects found during review with kilo_log_issue.
Metrics analysis (for the connected assistant)
Call kilo_metrics to analyze ROI (delegation_cost_usd vs inline_estimate_usd) and decision branches (kilo_log_decision).
Review kilo_log_issue defects to improve future specs.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/skills": {}
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| kilo_list_agentsA | Discover which Kilo agents are available for the Scans the project ( Call this before delegating if you are unsure which agent to target, so you pick a real one instead of guessing. |
| kilo_list_skillsA | Discover which Kilo skills are available for the Scans project and global directories (plus the VS Code extension storage
for marketplace-installed skills) for |
| kilo_list_modelsA | List the model ids that Kilo can actually use, in Use this to validate the Reflects the providers you are authenticated with; run |
| kilo_rag_searchA | Delegate READ-ONLY codebase search/exploration to Kilo, so you (the architect) can locate relevant code without pulling the whole repository into your own context. This tool is a standing resource for YOUR OWN work: use it whenever you need to understand or navigate an indexed codebase — also (and especially) when you are implementing or answering questions yourself and NOT delegating anything to kilo_implement. Runs Kilo's Note: this reuses the index maintained by the Kilo IDE extension — it does not create or refresh the index. If a workspace was never indexed by the extension, semantic search falls back to plain text/glob search. Typical flow: call this to find the relevant files, reason about the design yourself, then hand the concrete file list to kilo_implement via focus_files. Returns a text report: |
| kilo_implementA | Delegate a concrete code IMPLEMENTATION task to Kilo (the executor) while you stay the architect/orchestrator/reviewer. ⚠️ SIDE EFFECTS: Kilo runs non-interactively and AUTO-APPROVES its actions —
it will create/edit/delete files and run commands in NON-BLOCKING BY DEFAULT: this tool starts the task and returns IMMEDIATELY
with a
How to use it well:
STEERING & RESUMING: if a run (background or foreground) drifts off-spec, don't just
restart from scratch — read its Parallelism & Batch Queues: emitting several kilo_implement calls in one turn
runs them concurrently (independent Kilo subprocesses). For large batches, pass
⚠️ NO ISOLATION, NO LOCKING BY DEFAULT: Kilo runs directly in
When to skip a worktree: a worktree adds nothing for a brand new repository or a directory nobody else writes to; it is still recommended whenever another writer (a session, the user, another task) may touch the same tree. ⚠️ PROTECTED CONFIG FILES: Kilo always asks for approval before editing the
project-root ⚠️ EXTERNAL PATHS: Unattended runs cannot read outside the working directory unless
the Kilo config allows Handling of
Returns a text report (trimmed by default: status, exit code, session_id,
worktree/branch when present, parsed Final Report, and log file path; pass
When to delegateKilo runs at no cost to this operator; the only cost is your own (Claude) tokens. DELEGATE to Kilo when doing the task yourself would need a large agentic loop that is specifiable up front — multi-file changes, bulk/mechanical generation (e.g. tests for every endpoint), wide refactors, anything where the resent context of an inline loop would dwarf a written spec. ALSO PREFER DELEGATING when Kilo has a skill or agent matching the task's domain (check kilo_list_skills / kilo_list_agents; pass them via skills_to_load / agent): domain-specific skills and agents encode proven procedures and pitfalls, making Kilo's output better than an unguided inline attempt regardless of size. DO IT YOURSELF when the task is small (one or a few files, short edits), needs tight back-and-forth reasoning that can't be pinned down in a spec, or when writing the spec plus reviewing Kilo's output would cost more tokens than just doing it inline. Either way, always review the returned report. |
| kilo_task_resultA | Fetch the outcome of a background kilo_implement task. Returns the task result once completed: by default, returns a trimmed
summary with status, exit code, session_id, worktree/branch (when isolated),
the parsed Final Report, and the log file path. Pass |
| kilo_task_waitA | Wait until a background kilo_implement task reaches a terminal state
(completed, failed, failed_with_uncommitted_work, cancelled, error) or Accepts |
| kilo_task_progressA | Poll FINE-GRAINED LIVE progress of a running background kilo_implement task: Kilo's own plan/todo list (each step's status), a tail of its most recent commentary, and running cost/tokens — read directly from Kilo's session database (kilo.db), not inferred from OS-level process heuristics. Use this instead of (or alongside) kilo_task_status when you need to actually judge WHAT Kilo is doing, not just whether the process is alive — e.g. to decide whether to keep waiting, kilo_task_cancel a run that has drifted off-spec, or prepare a corrective kilo_implement call with continue_session_id. Scale how often you poll to the task's complexity/risk: a small, well-scoped delegation rarely needs this at all (just wait for kilo_task_result); a large, multi-file, or high-stakes one is worth checking periodically so problems surface long before the final report. If no session is found yet, Kilo has probably just started — try again in a few seconds. |
| kilo_task_cancelA | STOP a running background kilo_implement task: this is the direct intervention lever, for when kilo_task_progress (or kilo_workspace_status) shows a delegation going wrong — off-spec changes, a stuck/looping process, burning cost with no progress — and you don't want to wait for the timeout. Sends SIGTERM to the tracked process (and attempts an HTTP abort if
connected to a running |
| kilo_log_issueA | Record a defect found while reviewing code that Kilo generated. ALWAYS call this when your post-delegation review finds a problem — this is the feedback loop used to tune the instruction prompts over time. Issues are aggregated by kilo_metrics; recurring categories indicate what the generated spec template must start guarding against. |
| kilo_log_decisionA | Record an orchestration routing or outcome decision to decisions.jsonl under DATA_DIR so kilo_metrics can summarize delegation vs inline choices, escalations, discarded runs, and inline follow-up rates. |
| kilo_metricsA | Summarize kilo-mcp usage: runs, outcomes, generated code volume, real delegation cost vs estimated inline-Claude cost, recorded orchestration decisions from kilo_log_decision, and defect categories from kilo_log_issue. Use this to judge whether delegation is paying off and which defect classes the spec template should address next. Raw data lives in JSONL files (metrics.jsonl / issues.jsonl / decisions.jsonl) under KILO_MCP_DATA_DIR (default ~/.local/share/kilo-mcp) for ad-hoc analysis. |
| kilo_create_worktreeA | Create an isolated git worktree under .kilo/worktrees/<branch_name> (runs git directly, not Kilo). Each worktree gets its own new branch, so parallel kilo_implement runs on independent components never collide on files. Prefer passing isolation='worktree' directly to kilo_implement instead of calling this separately — one step instead of two, and harder to forget. Use this standalone tool when you need the worktree before deciding what to delegate into it, or want a worktree kilo_implement doesn't manage. Fails if the branch already exists — pick a fresh branch name per task. Also registers the new worktree in .kilo/agent-manager.json (best-effort) so it can appear in the Kilo Agent Manager UI. There is no live sync with a running VS Code extension window — see kilo_implement's isolation parameter description for the caveat. |
| kilo_auth_statusA | Check the authentication status of Kilo providers by running 'kilo auth list'. |
| kilo_session_revertB | Revert a Kilo session back to a previous message/checkpoint. Allows the orchestrator to undo changes or steps if Kilo took a wrong path. |
| kilo_session_forkB | Fork an existing Kilo session at a specific checkpoint to explore an alternative implementation path in parallel. |
| kilo_respond_questionA | Respond to an interactive question asked by Kilo during task execution, unblocking the session. |
| kilo_get_session_todoA | Read the live plan and checklist (todo list) maintained by Kilo for a specific session. |
| kilo_update_session_todoB | Create or update the checklist/todo list for a Kilo session. Allows an orchestrator architect to inject a structured plan or adjust steps mid-task. |
| kilo_run_commandA | Execute a deterministic, pre-programmed Kilo custom command (e.g., db-migrate)
via |
| kilo_workspace_statusA | Report the git status (porcelain short format) of a working directory or worktree — use it to review what a delegated run actually touched. |
| kilo_verify_worktreeA | Run a structured verification gate on a working directory or worktree. Executes a sequence of verification commands (lint, test, build) and returns a compact structured verdict with git head/dirty state and output tails for failed checks only, minimizing context window waste. SECURITY NOTE: This tool executes arbitrary shell commands provided by the caller or read from project configuration. Commands are taken from the explicit Each command runs sequentially with cwd=working_directory via the shell.
If a command exceeds Returns a JSON string: { "ok": bool, "working_directory": str, "head": str | null, "dirty": bool, "checks": [ { "command": str, "exit_code": int | null, "passed": bool, "duration_s": float, "timed_out": bool, "output_tail": str } ] } |
| kilo_task_statusA | Diagnose the state of running When called with |
| kilo_cleanupA | Safely cleans up stale git worktrees, merged feature branches, and orphan background dev server processes created by delegated Kilo runs. Features:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| kilo-mcp-conflict-resolver | Resolve merge conflicts in files produced by parallel Kilo tasks - find conflict markers, merge both versions preserving the semantics of each parallel feature, verify with linter/build. |
| index.json | |
| kilo-mcp-executor-contract | Behavioral contract for Kilo when executing background tasks delegated by an orchestrating AI (e.g. Claude) through the kilo-mcp server - zero interactivity, focus_files contract, mandatory Final Report, fail fast. |
| index.json | |
| kilo-mcp-metrics-analyst | Evaluate kilo-mcp delegation efficiency - ROI analysis via kilo_metrics (delegation_cost_usd vs inline_estimate_usd), decision telemetry via kilo_log_decision, defect-pattern review from kilo_log_issue, and feedback-loop proposals for better task specifications. Use when asked whether delegation to Kilo is paying off. |
| index.json | |
| kilo-mcp-orchestrator | Tool-level binding for orchestrating Kilo via the kilo-mcp server - kilo_rag_search, kilo_implement with worktree isolation, deterministic wait (kilo_task_wait), progress monitoring, and defect telemetry (kilo_log_issue). Use specifically when executing tasks through kilo-mcp tools. For generic multi-agent coordination or native worktrees, use orchestration-workflow. |
| index.json | |
| incidents.md | |
| diagnose-kilo-tasks.sh | |
| kill-kilo-task.sh | |
| kilo-mcp-rag-explorer | Specialized skill for Kilo's explore agent when running codebase semantic searches. Optimizes index lookups, file summaries, and ensures read-only safety. |
| index.json |
TDQS
Scored across 24 tools
Most tools have distinct roles, but the task-monitoring cluster overlaps heavily: kilo_task_result, kilo_task_wait, kilo_task_status, and kilo_task_progress all report on a running/finished task, and kilo_task_progress vs kilo_get_session_todo both surface the todo list. kilo_run_command vs kilo_implement and kilo_workspace_status vs kilo_verify_worktree are also close pairs. The very detailed descriptions help an agent choose correctly, but there is more than one or two confusable boundaries.
Every name is snake_case with a uniform kilo_ prefix, which makes the set predictable and searchable. Most follow verb_noun (list_models, create_worktree, log_issue), but some deviate into noun-only or noun_noun forms (kilo_metrics, kilo_implement, kilo_cleanup, kilo_auth_status, kilo_rag_search). These are minor deviations rather than a breakdown of convention.
24 tools is on the heavy side but the domain (delegation, task lifecycle, sessions, worktrees, discovery, metrics) is genuinely broad and most tools earn their place. A few could be consolidated — task_result/task_wait, status/progress, workspace_status/verify_worktree — which keeps it from being a clean 5. Slightly over-scoped but reasonable for an orchestration server.
Coverage is strong: discovery (models/agents/skills), auth, RAG search, implementation, full task monitoring and cancel/resume, session todo/revert/fork/respond, worktree create/verify/cleanup, and metrics/logging. Minor gaps remain — no explicit list of past tasks or worktrees (only inferred from status/cleanup dry-run) and no direct session-delete or task-record management. Agents can work around these.