All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
kimi_queryno longer breaks when the CLI is installed but not logged in. The previous routing preferred the CLI whenever the binary merely existed, ignoring auth state, sokimi_queryerrored against an unauthenticatedkimiCLI instead of using the configured API. It now prefers the direct API whenever a key is configured (a contextless query needs no codebase), falling back to the CLI only when no key is present
kimi_statusnow reports the Kimi Code API configured state first (the backend that actually serveskimi_query/kimi_verify), then the CLI install/version/auth state — making clear that a "not authenticated" CLI does not affect the API tools
- Added "Two backends: API vs CLI" and "Guidelines for agents" sections to the READMEs, documenting which tool uses which backend and what each requires
- Documented the
~/.local/binPATHgotcha that causescommand not found: kimiafter install
- API mode (
src/kimi-api.ts) — call the Kimi Code API directly, no Python CLI required. Reads the key from$KIMICODE_API_KEYor~/.kimi/config.toml(section-aware, prefers the coding provider, supports${VAR}interpolation) and sends theKimiCLI/1.0User-Agent the endpoint requires kimi_verifytool — Kimi as an independent third-party verifier. Cross-check a fix, diff, claim, or plan from a second model. Context-driven: callers must pass self-contained material since Kimi has no access to the session/repo. API-backed, so it works without the CLIkimi_queryAPI fallback — uses the direct API when the CLI isn't installedKIMI_SHARE_DIRenv var support insession-reader.tsandkimi-runner.ts— overrides the default~/.kimidata root, matching the same env var the upstream Kimi CLI recognizes. Default behavior unchanged
- Brand sync with current Kimi Code docs (2026-06): replaced "Kimi K2.5" references in
README.md,README_zh.md, andpackage.jsonwithkimi-for-coding(the official model ID, auto-upgraded on the backend) - Pricing table removed: replaced the hardcoded Moderato/Allegretto/Allegro/Vivace table with a link to kimi.com/code; subscription tiers and quotas change too often to maintain in README
- Added CLI Invocation Reference section to both READMEs clarifying the exact flags the MCP server uses (
--print -p) and explicitly noting thatkimi analyzesubcommand does not exist
0.3.0 - 2026-03-04
- Session Cache Manager — automatic caching of Kimi sessions per working directory
CacheManagerclass with LRU eviction, TTL expiration, and change detection- Git commit hash detection for automatic invalidation on code changes
- Fallback to file mtime hashing for non-git repositories
- Concurrent warmup deduplication (prevents duplicate session creation)
- New MCP Tools
kimi_cache_status— view cache statistics, hit rates, and entry detailskimi_cache_invalidate— manual cache invalidation (single or all)
- Enhanced
kimi_analyzeuse_cacheparameter (default: true) — enable automatic session caching- Automatic cache hit/miss indicators in response
- Automatic retry on invalid cached sessions
- Enhanced
kimi_runnersessionIdreturned inKimiResultfor cache trackingextractSessionId()function parses session ID from Kimi output
- Configuration
KIMI_CACHE_DEBUGenvironment variable for debug logging- Configurable
maxSize(default: 10) andmaxAgeMs(default: 30min)
- Documentation
- Comprehensive test requirements in
TEST_REQUIREMENTS.md - 25+ test cases covering functional and non-functional requirements
- Comprehensive test requirements in
- Cache hit latency: ~10s vs ~60-120s for cache miss (6-12x faster)
- Token cost reduction: Subsequent queries reuse cached context
- Session reuse: Up to 256K tokens of context retained between calls
0.2.0 - 2026-03-03
detail_levelparameter forkimi_analyzeandkimi_resume(summary/normal/detailed)max_output_tokensparameter for all tools (default: 15000, hard truncation safety net)include_thinkingparameter (default: false — saves 10-30K tokens per call)- Structured output prompt engineering — Kimi returns concise markdown reports
- Token Economics documentation section in both READMEs
- Kimi Code reviewer documentation and workflow examples
- Thinking blocks now excluded by default (previously always included)
- Output truncated at clean markdown boundaries when exceeding budget
- Tool descriptions updated to reflect budget-controlled output
0.1.0 - 2026-03-03
- Initial MCP server with 4 tools:
kimi_analyze— deep codebase analysis (architecture, audit, refactoring)kimi_query— quick programming questions without codebase contextkimi_list_sessions— list existing Kimi sessions with metadatakimi_resume— resume previous sessions (up to 256K token context)
- Kimi CLI subprocess management with stream-json parsing
- Session metadata reader for
~/.kimi/sessions/ - Configurable timeouts (10 min for analysis, 2 min for queries)
- Thinking mode support (
--thinkingflag) - Bilingual documentation (English + 繁體中文)
- CONTRIBUTING.md with development workflow guide