Kimi CodeSAFE
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.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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 (`kimi-for-coding`, 256K) — cut Claude-side token cost ~90%.
*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.
[!TIP] You don't need the CLI for the common case.kimi_queryandkimi_verifycall the Kimi Code API directly — no Python CLI install orkimi loginrequired. Just provide an API key via `$KIMICODE_
9e649ff195faOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add kimi-mcp-server -- npx -y [email protected]
Exposed tools (8)
6 read · 1 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
kimi_analyze | read | |
kimi_cache_invalidate | destructive | Manually invalidate session cache entries. Use when you want to force fresh analysis or if you suspect cached sessions are stale. |
kimi_cache_status | read | View session cache statistics and status. Shows cache hits/misses, active sessions, and performance metrics. Use this to monitor cache effectiveness and troubleshoot issues. |
kimi_list_sessions | read | List existing Kimi Code sessions with titles, working directories, and timestamps. Use to find session IDs for kimi_resume. |
kimi_query | read | Ask Kimi Code a question without codebase context. Default model: ${DEFAULT_MODEL} (K3). Use for general programming questions, algorithm explanations, or getting a second opinion. |
kimi_resume | read | Resume an existing Kimi Code session with a new prompt. The session retains all previous context (up to 256K tokens). Use kimi_list_sessions to find session IDs first. Ideal for drilling deeper after an initial kimi_analyze scan. |
kimi_status | write | Check Kimi CLI/API status, default model (K3 detection), and auth. Set probe_api=true for a live Coding API model echo check. |
kimi_verify | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (1 observation(s))
- Shell
- declared (3 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (11)
kimi_cache_invalidate
const hash = createHash('md5')return crypto.createHash('md5').update(input).digest('hex')const hash = crypto.createHash('md5').update(wd.path).digest('hex')targetHash = crypto.createHash('md5').update(opts.workDir).digest('hex')@modelcontextprotocol/sdk, zod, @types/node, tsx, typescript, vitest
# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux)
curl -L code.kimi.com/install.sh | bash
- **Install**: `curl -L code.kimi.com/install.sh | bash`
- **安裝**:`curl -L code.kimi.com/install.sh | bash`
curl -L code.kimi.com/install.sh | bash
Gates applied: no_behavioural_pass.
9e649ff195fafull audit observations/trust-audit/mcp-server/howardpen9__kimi-code.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 9e649ff195fa | SAFE | B | 89 | first audit |
Questions
What is the Kimi Code MCP server?
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.
What tools does Kimi Code expose?
8 in total: 6 read-only, 1 that write, and 1 that can delete or overwrite (kimi_cache_invalidate). Every one is listed on this page with its risk.
Is Kimi Code safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Kimi Code need?
It reads KIMICODE_API_KEY and MY_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Kimi Code run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as kimi-mcp-server at 0.5.0.
How current is this page?
The grade is for one exact copy of the source (9e649ff195fa), read on 2026-10-07. The repository is watched and re-audited when it changes.