Skip to content

Kimi Code MCP

MCP server for Claude Code × Kimi K2.5 (256K context) — delegate bulk codebase analysis to Kimi, save 90% on token costs. Session caching, parallel agents, TypeScript.

Install

$npx kimi-mcp-server
Claude Code
claude mcp add kimi-code-mcp -- npx kimi-mcp-server
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "kimi-code-mcp": {
      "command": "npx",
      "args": [
        "kimi-mcp-server"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

kimi-code-mcp

English | 中文說明


Illustrative estimates. The ~90% is Claude-side token reduction on analysis-heavy tasks — not total cost: Kimi's own subscription still applies. The monorepo row mirrors the example below; the PDF/commits rows are rough sketches.


Delegate codebase analysis from Claude to Kimi Code (default: K3 / k3, 256K) — 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.

Quick start

# 1. Install Kimi CLI and log in
curl -L code.kimi.com/install.sh | bash
kimi login

# 2. Install via npm
npm install -g kimi-mcp-server

Add to .mcp.json (project-level or ~/.claude/mcp.json for global):

{
  "mcpServers": {
    "kimi-code": {
      "command": "npx",
      "args": ["-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 explicitly passes -m kimi-code/k3 for CLI calls. Override it with the tool's model argument or KIMICODE_MODEL / KIMI_MODEL (argument takes priority). Run kimi provider list to check installed aliases; the CLI's own default may differ from the MCP default.

[!TIP] You don't need the CLI for the common case. kimi_query and kimi_verify call the Kimi Code API directly — no Python CLI install or kimi login required. Just provide an API key via $KIMICODE_API_KEY or ~/.kimi/config.toml (see Kimi Code API Setup). Only the codebase-reading tools (kimi_analyze, kimi_resume) need the CLI. See Two backends: API vs CLI for the full split.

How it works

  1. Claude calls the kimi_analyze tool when a task needs bulk codebase reading.
  2. MCP routes the request to Kimi Code (kimi-for-coding, 256K context) — Kimi reads the entire codebase in one pass.
  3. The result is piped back as a structured response — Claude acts on it with precise, targeted edits.
┌──────────────┐  stdio/MCP   ┌──────────────┐  subprocess   ┌──────────────┐
│  Claude Code │ ◄──────────► │ kimi-code-mcp│ ────────────► │ Kimi CLI     │
│  (conductor) │              │ (MCP server) │               │ (256K ctx)   │
└──────────────┘              └──────────────┘               └──────────────┘

Two backends: API vs CLI

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.

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io