MCP server bridging AI assistants to Moonshot AI Kimi Code CLI for code analysis and review
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server (stdio) that bridges Claude / Cursor / any MCP client to Moonshot AI's Kimi Code CLI.
Architecture mirrors @trishchuk/codex-mcp-tool β same patterns, adapted to Kimi's flag surface (--print, --quiet, -r, --continue, --add-dir, --mcp-config-file, --config).
Kimi K2.6 (April 2026) is a 1T-parameter MoE open-weight model with native agent-swarm orchestration, 262k context, and SWE-Bench Pro on par with GPT-5.5. Kimi Code CLI is the reference agent harness. This server lets MCP-aware editors call Kimi as a sub-agent without leaving their primary interface.
You also need Kimi Code CLI:
Then run kimi once and use /login to authenticate via the Kimi Code platform β or set MOONSHOT_API_KEY.
Minimal β working directory is auto-detected from PWD / INIT_CWD / process.cwd(), just like codex-mcp-tool:
Pin a specific project root only if your client launches the server from somewhere unrelated:
You can also override per call via the workingDir argument on ask-kimi, or let the server infer it from @path/to/file references in the prompt β same priority chain as codex-mcp-tool: workingDir arg β KIMI_MCP_CWD β PWD β INIT_CWD β @path inference β process.cwd().
| Tool | What it does |
|---|---|
ask-kimi | Main entry β file analysis (@path), session resume, MCP passthrough |
brainstorm | Structured ideation (divergent / convergent / SCAMPER / design-thinking / lateral / auto) |
batch-kimi | Sequential or parallel atomic tasks with priority, stop-on-error, structured report |
review-changes | Code review of working tree / branch diff / specific commit (collects git diff and prompts Kimi) |
list-sessions | List, delete, or clear active conversation sessions |
health | Diagnose Kimi CLI installation, auth, and session state |
ping / Help / version | Smoke tests + help passthrough |
ask-kimi highlightsprompt β supports @path/to/file to drop file context (Kimi reads via working dir).model β overrides default_model at runtime via --config. Known: kimi-for-coding, kimi-k2-6, kimi-k2-thinking-turbo, kimi-k2-5, kimi-latest.thinking β toggles thinking mode (writes default_thinking into runtime config).outputFormat β text (default) or stream-json (JSONL of assistant + tool messages, parsed transparently).responseMode β clean (default; final assistant text only) or full (tool calls + stderr log + final).sessionId β workspace-isolated session ID (md5 of repo:head:path). The server tracks the native Kimi session ID returned by the CLI and replays it via kimi -r <id>.continueLatest β sets --continue (resume the most recent session in the cwd).mcpConfigFile β passes --mcp-config-file so Kimi can talk to other MCP servers from inside this process.addDirs β repeats --add-dir for multi-root projects.yolo / afk β approval shortcuts (print mode auto-approves anyway, but useful for documentation/logging).| Feature | Kimi CLI |
|---|---|
| Print / non-interactive | --print (required for MCP); --quiet = --print --output-format text --final-message-only |
| JSON streaming | --output-format=stream-json, --input-format=stream-json |
| Sessions | --continue, --session <id>, -r <id> |
| Configuration | --config-file <path>, --config '<json/toml>' |
| Workspace | spawn cwd + --add-dir <path> (no --cd flag) |
| MCP passthrough | --mcp-config-file or kimi mcp add |
| Exit codes | 0 ok, 1 fatal, 75 retryable transient |
| Var | Default | Purpose |
|---|---|---|
KIMI_MCP_CWD | β | Override working directory for every tool call |
KIMI_SESSION_TTL_MS | 86400000 (24h) | Session expiration |
KIMI_MAX_SESSIONS | 50 | Max concurrent sessions |
MOONSHOT_API_KEY | β | Forwarded to Kimi CLI for unattended auth |
MIT β Taras Trishchuk
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/kimi-mcp-server)<a href="https://allmcps.com/mcp/kimi-mcp-server"><img src="https://allmcps.com/api/badge/kimi-mcp-server?style=directory" alt="Kimi MCP Server on AllMCPs" /></a>