← back to Kimi Mcp
README.md
39 lines
# kimi-mcp
Owned MCP server that exposes **Moonshot Kimi (`kimi-k2.5`)** to Claude Code as
two **consult** tools. No Kimi CLI, no subscription — it calls the Moonshot API
directly with your existing `MOONSHOT_API_KEY`.
Model + temperature match the `/dtd` panel (`kimi-k2.5`, `temperature=1`,
`api.moonshot.ai`) so this is the same Kimi lens you already trust — just
available as an on-demand tool instead of only inside the debate panel.
## Tools
| Tool | Args | What it does |
|------|------|--------------|
| `ask_kimi` | `prompt`, `system?` | Ask Kimi a self-contained question; returns its answer + a cost footer. |
| `review_with_kimi` | `code`, `focus?`, `context?` | Independent adversarial code/diff review. |
**Scope: consult only.** Kimi gets no filesystem, bash, or agent loop here — it
answers, it does not act. Paste any needed context/code inline.
## Config
Reads env:
- `MOONSHOT_API_KEY` (required) — routed by the `secrets` skill.
- `KIMI_MODEL` (optional, default `kimi-k2.5`) — e.g. `kimi-k2.7-code`.
- `KIMI_MAX_TOKENS` (optional, default `8000`).
## Smoke test
```sh
MOONSHOT_API_KEY=… npm run smoke # expects: reply="KIMI_OK"
```
## Wired into Claude Code
Registered in `~/.claude.json` as MCP server `kimi` (command `node
~/Projects/kimi-mcp/server.mjs`, `MOONSHOT_API_KEY` in its env block). New
sessions pick it up automatically; a running session needs `/clear` or restart.