MCP server for Claude Code × Kimi Code CLI 2.4.1 — default model k3 (up to ~1M on eligible plans); kimi-for-coding = K2.8 Preview. Delegate bulk reads to Kimi, cut Claude-side tokens.
翻译准备中
开发工具GitHub @howardpen9自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗English | 中文說明
Delegate codebase analysis from Claude to Kimi Code (default model k3, CLI alias kimi-code/k3) — cut Claude-side token cost ~90%.
| Task | Claude only | Claude + kimi-code-mcp | Claude-side savings |
|---|---|---|---|
| Analyze 200-file monorepo | ~250K tok | ~25K tok | ~90% |
| Summarize 50-page RFC PDF | ~60K tok | ~6K tok | ~90% (sketch) |
| Cross-reference 100 commits | ~80K tok | ~8K tok | ~90% (sketch) |
*Illustrative estimates — savings are on Claude tokens only and depend on the task; Kimi's subscription cost is separate. See Token Economics.
# 1. Install the current Kimi Code CLI (macOS / Linux) and log in.
# code.kimi.com/install.sh redirects to the archived Python kimi-cli. Do not use it.
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
kimi login
# Node.js >= 22.19.0 alternative:
# npm install -g @moonshot-ai/kimi-code
# This server runs ~/.local/bin/kimi only. The installer puts the binary in
# ~/.kimi-code/bin and adds that directory to your shell rc.
mkdir -p "$HOME/.local/bin"
ln -sfn "$HOME/.kimi-code/bin/kimi" "$HOME/.local/bin/kimi"
# 2. Install this MCP server (Node.js >= 18)
npm install -g kimi-mcp-server
[!WARNING] On 2026-11-02 the npm registry only has
[email protected]. Gitmainis 0.5.0 and is not published, sonpm install -gdoes not yet default tok3or read~/.kimi-code/config.toml. Use Install from source until 0.5.0 is published if you need the behavior on this page.
Windows (PowerShell): irm https://code.kimi.com/kimi-code/install.ps1 | iex. The runner in this repo still expects the POSIX path ~/.local/bin/kimi, so link the installed kimi binary there the same way.
Project scope — commit .mcp.json at the repo root:
{
"mcpServers": {
"kimi-code": {
"command": "npx",
"args": ["-y", "kimi-mcp-server"]
}
}
}
User scope (all projects, stored in ~/.claude.json, not ~/.claude/mcp.json):
claude mcp add --scope user --transport stdio kimi-code -- npx -y kimi-mcp-server
Run /mcp in Claude Code to verify — you should see kimi-code with 8 tools.
The MCP defaults to k3 and passes -m kimi-code/k3 on CLI calls.
Override with the tool's model argument or KIMICODE_MODEL / KIMI_MODEL
(argument wins). On CLI 2.4.1, kimi provider list prints Default model: … when a default is set.
That value can differ from the MCP default. Switch inside the CLI with /model.
[!TIP] You don't need the CLI for the common case.
kimi_queryandkimi_verifycall the Kimi Code API directly — no CLI install orkimi loginrequired. Set$KIMICODE_API_KEY(see Kimi Code API Setup). Onlykimi_analyzeandkimi_resumespawn the CLI. See Two backends: API vs CLI.
kimi_analyze tool when a task needs bulk codebase reading.-m kimi-code/k3) — Kimi reads the codebase from disk.┌──────────────┐ stdio/MCP ┌──────────────┐ subprocess ┌──────────────┐
│ Claude Code │ ◄──────────► │ kimi-code-mcp│ ────────────► │ Kimi CLI │
│ (conductor) │ │ (MCP server) │ │ (k3) │
└──────────────┘ └──────────────┘ └──────────────┘
The server reaches Kimi two different ways, and each tool uses the one that fits its job. Knowing which is which tells you what you need to set up.
| Backend | How it talks to Kimi | What it needs | Sees your codebase? |
|---|---|---|---|
| Direct API | HTTPS to api.kimi.com/coding/v1 (or KIMI_BASE_URL) | An API key ($KIMICODE_API_KEY, or api_key in ~/.kimi/config.toml / ~/.kimi-code/config.toml) | ❌ No — you paste in the context |
| Local CLI | Spawns the kimi binary as a subprocess | CLI installed and kimi login done | ✅ Yes — reads files from disk |
| Tool | Backend | Why |
|---|---|---|
kimi_query | API (CLI only if no key configured) | Contextless Q&A — no codebase needed, so the API is simpler and has no login dependency |
kimi_verify | API | You pass the code/diff/claim inline; Kimi judges it as an independent third party |
kimi_analyze | CLI | Reads the codebase from disk. Context follows the model window |
kimi_resume | CLI | Continues a stateful CLI session that holds prior codebase context |
kimi_list_sessions, kimi_cache_*, kimi_status | local | Read local session/cache metadata |
[!IMPORTANT] Most users only need the API key. If you just want a second opinion / verification (
kimi_query,kimi_verify), set the API key and you're done — skip the CLI entirely. Install +kimi loginonly when you want Kimi to read your codebase viakimi_analyze/kimi_resume.
Run kimi_status any time to see which backends are live — it reports the API-configured state and the CLI install/auth state separately.
If you are an AI agent (Claude Code, a subagent, etc.) deciding when to call these tools:
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗