Kimi MCP Server

io.github.x51xxx由 GitHub 帳號 x51xxx 發布v0.2.0更新於 Oct 24, 2026

MCP server bridging AI assistants to Moonshot AI Kimi Code CLI for code analysis and review

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

一個本機 stdio MCP 伺服器,讓助理把 Moonshot AI 的 Kimi Code CLI 當作子代理呼叫,用於程式碼分析、審查、腦力激盪與批次任務。

可以做什麼
讓 Kimi 分析以路徑引用的檔案,可設定模型、思考模式、輸出格式與工作階段續接,並透過設定檔把其他 MCP 伺服器透傳給 Kimi,還可用額外目錄支援多根專案。執行結構化腦力激盪,支援發散、收斂、SCAMPER、設計思考或水平等模式。依優先順序或平行執行原子任務,可設定出錯即停,並回傳結構化報告。收集 git diff 後審查工作區、分支差異或指定提交的程式碼變更。列出、刪除或清空對話工作階段,並診斷 CLI 安裝、驗證與工作階段狀態。
適用情境
適合在支援 MCP 的編輯器或 Claude Desktop 中工作、希望不離開目前介面就能使用第二個編碼代理(Kimi)做程式碼審查、檔案分析或構想的使用者。也適合已安裝或願意安裝 Kimi Code CLI 的人。
執行需求
以 npm 套件 @trishchuk/kimi-mcp-server 透過 stdio 在本機執行,需要 Node.js,並需另外安裝 Kimi Code CLI。驗證方式為互動式 Kimi 登入或設定 MOONSHOT_API_KEY 環境變數。選用變數 KIMI_MCP_CWD、KIMI_SESSION_TTL_MS 與 KIMI_MAX_SESSIONS 控制工作目錄與工作階段上限。僅限桌面用戶端。
安裝前請注意
伺服器會啟動 Kimi CLI,把你的提示與引用的檔案內容傳送到 Moonshot AI 的服務,避免用於敏感程式碼。MOONSHOT_API_KEY 是轉傳給 CLI 的密鑰。列印模式會自動核准操作,yolo 與 afk 是核准快捷選項,Kimi 可能不經逐步確認就執行動作。review-changes 會讀取 git diff,工作階段工具可刪除或清空工作階段。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Kimi MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Kimi MCP Server

[License: MIT]

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).

Why

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.

Install

sh
npm install -g @trishchuk/kimi-mcp-server

You also need Kimi Code CLI:

sh
curl -LsSf https://code.kimi.com/install.sh | bash# ORuv tool install --python 3.13 kimi-cli

Then run kimi once and use /login to authenticate via the Kimi Code platform — or set MOONSHOT_API_KEY.

Configure (Claude Desktop / Cursor / Claude Code)

Minimal — working directory is auto-detected from PWD / INIT_CWD / process.cwd(), just like codex-mcp-tool:

json
{  "mcpServers": {    "kimi": {      "command": "kimi-mcp"    }  }}

Pin a specific project root only if your client launches the server from somewhere unrelated:

json
{  "mcpServers": {    "kimi": {      "command": "kimi-mcp",      "env": { "KIMI_MCP_CWD": "/absolute/path/to/your/project" }    }  }}

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().

Tools

ToolWhat it does
ask-kimiMain entry — file analysis (@path), session resume, MCP passthrough
brainstormStructured ideation (divergent / convergent / SCAMPER / design-thinking / lateral / auto)
batch-kimiSequential or parallel atomic tasks with priority, stop-on-error, structured report
review-changesCode review of working tree / branch diff / specific commit (collects git diff and prompts Kimi)
list-sessionsList, delete, or clear active conversation sessions
healthDiagnose Kimi CLI installation, auth, and session state
ping / Help / versionSmoke tests + help passthrough

ask-kimi highlights

  • prompt — 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).

CLI compatibility

FeatureKimi 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>'
Workspacespawn cwd + --add-dir <path> (no --cd flag)
MCP passthrough--mcp-config-file or kimi mcp add
Exit codes0 ok, 1 fatal, 75 retryable transient

Environment

VarDefaultPurpose
KIMI_MCP_CWD—Override working directory for every tool call
KIMI_SESSION_TTL_MS86400000 (24h)Session expiration
KIMI_MAX_SESSIONS50Max concurrent sessions
MOONSHOT_API_KEY—Forwarded to Kimi CLI for unattended auth

Development

sh
npm installnpm run build       # tsc → dist/npm run lint        # tsc --noEmitnode dist/index.js  # smoke run on stdio

License

MIT — Taras Trishchuk

來源:README.md,提交 83eee42

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分