# Kimi MCP Server [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/x51xxx/kimi-mcp-server  
**GitHub Stars:** 1  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kimi-mcp-server

## Description
MCP server bridging AI assistants to Moonshot AI Kimi Code CLI for code analysis and review

## Tools
Capabilities this server exposes over MCP:

- **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** — Smoke tests + help passthrough

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/x51xxx/kimi-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g @trishchuk/kimi-mcp-server
```

## Documentation

## What Kimi MCP Server does

Kimi MCP Server MCP server exposes Moonshot AI’s Kimi Code CLI as tools for MCP clients. It is intended for use from Claude Desktop, Cursor, Claude Code, or another client that can launch an MCP server over stdio. The server lets an agent send prompts to Kimi, include file references, resume conversations, and request structured development workflows.

The main entry point, `ask-kimi`, handles general prompts and supports `@path/to/file` references for adding file context. It can also resume a tracked session, select a model, change thinking settings, return either final text or fuller tool output, and pass an MCP configuration file to Kimi for nested MCP access.

## How it works

The server starts Kimi CLI in non-interactive print mode and translates MCP tool arguments into the CLI’s supported flags. Kimi performs the requested work in the selected project directory, and the server returns the result to the calling client. Streaming JSON output can be parsed into assistant and tool messages, while the default response mode returns only the final assistant text.

Working-directory selection follows a defined priority: the per-call `workingDir` argument, `KIMI_MCP_CWD`, `PWD`, `INIT_CWD`, an inferred path from an `@path` reference, and finally the current process directory. Additional project roots can be supplied through repeated `addDirs` values.

Session identifiers are isolated by workspace and tracked by the server. Native Kimi session IDs can be replayed for later calls, and `continueLatest` can request the most recent session in the current directory. Sessions expire after the configured time-to-live and are limited by the configured maximum.

## Setup and configuration

Install the npm package globally, then install Kimi Code CLI separately using its installer or `uv`. Kimi must be run once for platform login, unless unattended authentication is provided with `MOONSHOT_API_KEY`. The MCP client can launch the server with the command `kimi-mcp` and needs no extra setting when its working directory is the intended project.

Set `KIMI_MCP_CWD` to pin a project root when the client starts the process elsewhere. `KIMI_SESSION_TTL_MS` controls session expiration, and `KIMI_MAX_SESSIONS` sets the concurrent session limit. These settings are optional; authentication can use the Kimi login flow or the API key environment variable.

Kimi MCP Server MCP server is configured as a standard stdio MCP process. Development from the repository uses the package install, TypeScript build, lint check, and a direct Node smoke run against the generated entry point.

## Tools and capabilities

- `ask-kimi`: Send prompts, attach file context, resume sessions, choose models, toggle thinking, and pass nested MCP configuration.
- `brainstorm`: Run divergent, convergent, SCAMPER, design-thinking, lateral, or automatic ideation modes.
- `batch-kimi`: Execute atomic tasks sequentially or in parallel with priorities, stop-on-error behavior, and a structured report.
- `review-changes`: Review the working tree, a branch diff, or a specific commit after collecting the relevant Git diff.
- `list-sessions`: List, delete, or clear active conversation sessions.
- `health`: Check Kimi CLI installation, authentication, and session state.
- `ping`, help, and version operations: Run smoke checks or forward basic CLI information.

## Limitations and notes

The server depends on a separately installed Kimi Code CLI and on valid Kimi authentication. Its MCP transport is stdio, so the client must support launching a local command. Print mode is required for MCP calls, and approval shortcuts such as `yolo` and `afk` are mainly documentation or logging controls because print mode automatically approves operations. Kimi CLI transient failures may use exit code 75, while fatal failures use exit code 1.

_Full upstream README: https://allmcps.com/mcp/kimi-mcp-server/readme_

