
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 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 控制工作目录与会话限制。仅限桌面客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 Kimi MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Kimi MCP Server
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
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.
Configure (Claude Desktop / Cursor / Claude Code)
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().
Tools
ask-kimi highlights
prompt— supports@path/to/fileto drop file context (Kimi reads via working dir).model— overridesdefault_modelat runtime via--config. Known:kimi-for-coding,kimi-k2-6,kimi-k2-thinking-turbo,kimi-k2-5,kimi-latest.thinking— toggles thinking mode (writesdefault_thinkinginto runtime config).outputFormat—text(default) orstream-json(JSONL of assistant + tool messages, parsed transparently).responseMode—clean(default; final assistant text only) orfull(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 viakimi -r <id>.continueLatest— sets--continue(resume the most recent session in the cwd).mcpConfigFile— passes--mcp-config-fileso Kimi can talk to other MCP servers from inside this process.addDirs— repeats--add-dirfor multi-root projects.yolo/afk— approval shortcuts (print mode auto-approves anyway, but useful for documentation/logging).
CLI compatibility
Environment
Development
License
MIT — Taras Trishchuk
来源:README.md,提交 83eee42
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分