Kimi Code MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kimi Code MCPprompt: implement a simple calculator function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kimi Code MCP
kimi-code-mcp 是一个面向 Codex Desktop 的本地 direct-control 桥接器。
Codex 仍是主控,通过一个 kimi MCP 工具直接操作本机已经安装、登录的
官方 Kimi Code CLI。
Codex Desktop -> MCP `kimi` -> `kimi acp` / `kimi <args...>` -> Kimi Code它不会把 Kimi 加进 Codex 模型菜单,不会把 Kimi 伪装成 GPT,也不替代 CCSwitch 或 LiteLLM。Kimi 使用本地配置选择的账号和供应商;官方 OAuth 登录对应 Coding Plan 会员额度,不走 Moonshot API 余额。
一个工具,七个 action
action | 用途 |
| 发送 ACP prompt;省略 |
| 查询或长轮询任务、结果及 Kimi 交互 |
| 取消任务并停止对应 ACP 进程 |
| 回答 Kimi 原生问题或 Plan 评审 |
| 列出官方 Kimi 持久化会话 |
| 用完整 |
| 检查二进制;deep 模式再检查 ACP 初始化与登录 |
唯一 MCP resource 是 kimi://manual,包含完整参数、能力映射和风险边界。
MCP 启动时还会自动常驻 kimi vis:默认监听
http://127.0.0.1:58631,首次启动自动打开浏览器,意外退出后自动重启。
它只负责显示 Kimi 会话,不增加新的 MCP 工具。
Related MCP server: Codex Bridge MCP
重要边界
这是刻意精简的直接控制,不是安全沙箱:
prompt默认mode=yolo。不固定模型或 Thinking;需要 K3 时显式传
model=kimi-code/k3、thinking=on和 effort。不使用 bridge 路径守卫、敏感文件过滤、环境白名单、任务时限或持久会话 cwd 核验;只限制同一个已知
session_id同时一轮,不同 session 可并发。ACP 文本回调可以直接读写 Kimi 请求的路径;Bash 使用当前用户权限。
Kimi 自己的 MCP、Skills、Plugins、Hooks、权限规则和项目指令仍会加载。
cli没有命令白名单、超时或 TTY;argv 不经过 shell,但官方命令本身 可以修改凭据、供应商、安装、会话和外部状态。Agent/AgentSwarm 和并行 prompt 会快速消耗 Coding Plan 额度。
对不可信仓库、生产凭据、危险命令或外部副作用,请使用容器、VM、受限 账号或一次性工作树,而不是依赖提示词。
前置条件
Node.js
>=22.19.0官方 Kimi Code CLI 已安装并登录
可用的 Kimi Coding Plan 或本地配置供应商
支持本地 stdio MCP 的 Codex Desktop
桌面应用可能不继承终端 PATH,推荐直接使用绝对路径:
$HOME/.kimi-code/bin/kimi --version
node --version安装
发布版本:
codex mcp add kimi_code -- "$(command -v npx)" --yes --package=github:lxq020801/kimi-code-mcp#v0.2.1 kimi-code-mcp本地开发:
git clone https://github.com/lxq020801/kimi-code-mcp.git
cd kimi-code-mcp
npm install
npm run check
npm test
npm run build修改源码后必须重新构建 dist,再重启 Codex Desktop。
Desktop 配置
[mcp_servers.kimi_code]
command = "/node/绝对路径"
args = ["/kimi-code-mcp/绝对路径/dist/index.js"]
startup_timeout_sec = 30
tool_timeout_sec = 3600
enabled = true
[mcp_servers.kimi_code.env]
KIMI_MCP_KIMI_COMMAND = "/Users/example/.kimi-code/bin/kimi"
KIMI_MCP_SHUTDOWN_GRACE_MS = "3000"
KIMI_MCP_DEBUG = "0"
KIMI_MCP_AUTO_VIS = "1"
KIMI_MCP_VIS_HOST = "127.0.0.1"
KIMI_MCP_VIS_PORT = "58631"TOML 不展开 $HOME。修改配置后完全退出并重新打开 Desktop,再新建任务以
重新加载 MCP 工具和 resource。
使用
新建一个 K3 编码会话:
{
"action": "prompt",
"prompt": "实现这个独立功能,运行聚焦测试,并报告修改文件和验证命令。不要访问凭据或外部服务。",
"cwd": "/项目/绝对路径",
"model": "kimi-code/k3",
"thinking": "on",
"effort": "high",
"mode": "yolo"
}随后使用返回的 task_id 长轮询:
{ "action": "status", "task_id": "...", "wait_ms": 30000 }继续同一个 Kimi 会话:
{
"action": "prompt",
"session_id": "session_...",
"prompt": "根据 code review 修复这些问题:...",
"cwd": "/项目/绝对路径",
"mode": "yolo"
}读取额度或供应商信息等非交互 CLI 输出:
{ "action": "cli", "args": ["provider", "list", "--json"] }cli 也返回异步 task id;用相同的 status / cancel 查询 stdout/stderr 或
停止命令。输出在内存中累积,没有 bridge 大小上限。
不要用 cli 启动 TUI、裸 acp 或其他等待 stdin/TTY 的流程。登录、更新、
迁移、供应商修改、导出、server/web 和额外的 raw vis 实例等操作必须得到
用户当前请求的明确授权。默认 visualizer 已由安装行为持续授权。
模型与额度
direct mode 默认不改 Kimi 的 model/Thinking/effort,只有 mode 在 MCP schema
中默认 yolo。需要可复现的 K3 行为时显式传:
model=kimi-code/k3
thinking=on
effort=low|high|maxlow 适合短审查和小任务,high 适合常规实现,max 只用于明确值得的复杂
任务。Kimi 子 Agent 会额外消耗 Coding Plan;主控 GPT 的规划和复核也会消耗
当前 Codex/中转供应商额度。
验证
npm run check
npm test
npm run build
npm audit --omit=devDesktop 中先调用浅 health。deep=true 不发送模型 prompt,但会检查 ACP
初始化/认证并创建一个无法由 ACP 自动关闭的空诊断会话;它不验证 K3 或
Thinking。真实 prompt 测试会消耗少量 Coding Plan。
文档
官方资料:
许可证
MIT。本项目是本地桥接实现,不是 Moonshot AI 或 OpenAI 官方产品。
Available Tools
1 toolkimiDirect Kimi controlC
Directly control the installed Kimi ACP/CLI without bridge sandbox, path, permission, environment, timeout, or session-binding restrictions.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| args | No | ||
| deep | No | ||
| mode | No | yolo | |
| model | No | ||
| action | Yes | ||
| cursor | No | ||
| effort | No | ||
| prompt | No | ||
| task_id | No | ||
| wait_ms | No | ||
| thinking | No | ||
| option_id | No | ||
| request_id | No | ||
| session_id | No | ||
| image_paths | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the tool operates without bridge sandbox, path, permission, environment, timeout, or session-binding restrictions, which is a significant behavioral trait (direct and unrestricted). However, it does not mention potential side effects, required permissions, or how these bypassed restrictions might impact the system.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It conveys the core function and the key restriction-bypassing aspect efficiently, though it sacrifices necessary detail for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (16 parameters, multiple action enums, no output schema) and lack of annotations, the description is severely incomplete. It does not explain the actions, parameters, behavior, or return values, making it inadequate for safe and correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description provides no information about any of the 16 parameters. The description fails to compensate for the lack of schema descriptions, leaving all parameters semantically unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool directly controls the installed Kimi ACP/CLI, which identifies the resource and that it bypasses restrictions. However, 'control' is a broad verb and does not specify the specific actions (prompt, status, cancel, etc.) available through the schema, leaving the purpose somewhat vague.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It only describes what it does and the restrictions it bypasses, without any context for appropriate usage scenarios or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.2.1- First observed
kimi
TDQS
With only one tool, there is no possibility of confusion or overlap. The tool's purpose is clearly defined as direct control of the installed Kimi ACP/CLI.
The single tool name is consistent with no conflicting conventions. Although it is not a verb_noun pattern, consistency is trivially satisfied.
The server provides exactly one tool, which feels minimal for general use. While it may be sufficient for a focused integration, it borders on being too thin for a typical MCP server.
The tool offers unrestricted direct control of the Kimi CLI, covering the full range of possible operations. There are no apparent gaps in functionality since it can execute any command supported by the CLI.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Related MCP Servers
- AlicenseBqualityBmaintenanceWindows-first MCP bridge for Kimi Code CLI, exposing code analysis, editing, sessions, and diagnostics as tools for AI agents.626MIT
- FlicenseNot gradedqualityBmaintenanceCodex Bridge MCP is a local MCP orchestration service for a stable Claude Code x Codex CLI development workflow.2-
- AlicenseNot gradedqualityBmaintenanceBridges Notion AI models to coding environments like OpenCode, Claude Code, and Codex CLI, enabling local file operations and shell commands via MCP tools.20MIT
- AlicenseAqualityBmaintenanceBridges Claude Code to Kimi Code via MCP, enabling task delegation with file and command execution.3MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lxq020801/kimi-code-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server