npm @trishchuk/kimi-mcp-serverstdioMITupdated 3mo ago
MCP server (stdio) that bridges Claude / Cursor / any MCP client to Moonshot AI's Kimi Code CLI.
What can you do with Kimi MCP Server?
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
npm install -g @trishchuk/kimi-mcp-server
You also need Kimi Code CLI:
curl -LsSf https://code.kimi.com/install.sh | bash
# OR
uv 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:
{
"mcpServers": {
"kimi": {
"command": "kimi-mcp"
}
}
}
Pin a specific project root only if your client launches the server from somewhere unrelated:
{
"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
| 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 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
| 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 |
Environment
| 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 |
Development
npm install
npm run build # tsc ā dist/
npm run lint # tsc --noEmit
node dist/index.js # smoke run on stdio
License
MIT ā Taras Trishchuk
Install
Add Kimi MCP Server to your client. Pick the one you use.
claude mcp add kimi-mcp-server -- npx -y @trishchuk/kimi-mcp-servercodex mcp add kimi-mcp-server -- npx -y @trishchuk/kimi-mcp-serveramp mcp add kimi-mcp-server -- npx -y @trishchuk/kimi-mcp-server{
"mcpServers": {
"kimi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"kimi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"kimi-mcp-server","command":"npx","args":["-y","@trishchuk/kimi-mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"kimi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"kimi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"kimi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"kimi-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"kimi-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@trishchuk/kimi-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @trishchuk/kimi-mcp-serverRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance13/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 97 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 0.2.0Latest | May 27, 2026 |