npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trishchuk/kimi-mcp-server

v0.2.0

Published

MCP server for Moonshot AI Kimi Code CLI integration

Downloads

121

Readme

Kimi MCP Server

License: MIT

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_CWDPWDINIT_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/file to drop file context (Kimi reads via working dir).
  • model — overrides default_model at runtime via --config. Known: kimi-for-coding, kimi-k2-6, kimi-k2-thinking-turbo, kimi-k2-5, kimi-latest.
  • thinking — toggles thinking mode (writes default_thinking into runtime config).
  • outputFormattext (default) or stream-json (JSONL of assistant + tool messages, parsed transparently).
  • responseModeclean (default; final assistant text only) or full (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 via kimi -r <id>.
  • continueLatest — sets --continue (resume the most recent session in the cwd).
  • mcpConfigFile — passes --mcp-config-file so Kimi can talk to other MCP servers from inside this process.
  • addDirs — repeats --add-dir for 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