🧠 KacheDB MCP Server
High-Performance Model Context Protocol (MCP) server for KacheDB — exposing sub-millisecond in-memory caching, Tree-Sitter AST symbol intelligence, and SIMD semantic vector memory to Antigravity IDE, Claude Desktop, Cursor, and AI coding agents.
⚡ Why KacheDB for AI Agents?
AI coding assistants repeatedly re-read large codebases, parse ASTs, and crawl directories, wasting tens of thousands of tokens and adding hundreds of milliseconds of latency per turn.
kachedb-mcp connects your AI assistant directly to KacheDB's Megaslab pure-RAM SwissTable:
- 🚀 Sub-50 Nanosecond Retrieval: Instant symbol inspection and exact KV hits in memory.
- 🌳 Tree-Sitter AST Code Intelligence: Multi-language symbol graphs (functions, classes, structs, signatures, docstrings) across Python, Rust, Go, TypeScript, and JavaScript.
- 🔍 Upward Anchor Discovery: Zero-config project root detection from any touched file — no arbitrary
$HOMEscans or guessing folder names. - 🔄 Incremental Git Watermarks: Sub-millisecond sync verification using commit SHA watermarks (
kache:meta:<ws>:commit). Up-to-date projects are skipped with zero overhead. - 🧠 SIMD Semantic Vector Memory: Natural language concept and code recall powered by ARM NEON & AVX2/FMA cosine similarity kernels.
- 🪙 Live Financial Telemetry: Tracks avoided latency, cumulative tokens saved, and real-time USD cost savings.
🛠️ MCP Tools Exposed (11 Tools)
🌳 Codebase Intelligence Tools
| Tool | Type | Description |
|---|---|---|
kache_explore_symbol |
⚡ Exact AST | Instant (< 50 ns) symbol inspection from SwissTable. Returns signatures, docstrings, line numbers, and file paths in a surgical < 300 token payload. |
kache_index_workspace |
🚀 Indexer | Discovers projects, parses AST symbols across supported languages, and persists SwissTable keys and vector embeddings. |
kache_workspace_status |
📊 Status | Inspects indexing status, total indexed symbols, language breakdown, commit watermark, and cache freshness. |
🧠 Semantic Memory Tools
| Tool | Type | Description |
|---|---|---|
kache_semantic_search |
🧠 Vector | Natural language semantic search over cached codebases, PR reviews, and past decisions (top_k, threshold). |
kache_save_context |
🧠 Vector | Save architectural patterns, bug solutions, or file digests with hierarchical chunking and SIMD vector embeddings. |
kache_get_parent_document |
📄 Context | Retrieve the full unabridged parent document for chunked semantic matches. |
⚡ Exact Key-Value Tools
| Tool | Type | Description |
|---|---|---|
kache_get |
⚡ Exact | Sub-millisecond exact key retrieval for code chunks, ASTs, and tool outputs. |
kache_set |
⚡ Exact | Store string content in memory with optional TTL expiration. |
kache_delete |
⚡ Exact | Remove a key or vector from cache and reclaim slab memory. |
📊 Telemetry & Health Tools
| Tool | Type | Description |
|---|---|---|
kache_stats |
📊 Health | Real-time connection health, active vector counts, and RAM footprint. |
kache_telemetry |
📊 Telemetry | Live cumulative tokens saved, latency saved (seconds), hit ratios, and estimated USD saved. |
🚀 Quickstart
1. Start the KacheDB Server Daemon
Ensure your KacheDB daemon is running locally:
kachedb-server --port 6380
2. Configure in Antigravity IDE / Claude Desktop / Cursor
Add kachedb to your MCP configuration file (mcp_config.json or claude_desktop_config.json):
Zero-Config Mode (Recommended)
No hardcoded paths needed. When an agent opens or mentions any file, Upward Anchor Discovery automatically resolves the enclosing project root and indexes it on-demand:
{
"mcpServers": {
"kachedb": {
"command": "uvx",
"args": ["kachedb-mcp"],
"env": {
"KACHEDB_PORT": "6380"
}
}
}
}
Pre-Configured Multi-Project Roots
To automatically discover and index projects on startup, set KACHEDB_WORKSPACE_ROOTS:
{
"mcpServers": {
"kachedb": {
"command": "uvx",
"args": ["kachedb-mcp"],
"env": {
"KACHEDB_PORT": "6380",
"KACHEDB_WORKSPACE_ROOTS": "/path/to/projects:/path/to/work"
}
}
}
}
Or install via Python pip:
pip install kachedb-mcp
{
"mcpServers": {
"kachedb": {
"command": "kachedb-mcp",
"env": {
"KACHEDB_PORT": "6380"
}
}
}
}
🌐 Multi-Language AST Support
Tree-Sitter parsers extract rich symbol graphs with zero external compiler dependencies:
| Language | Extensions | Extracted Symbols |
|---|---|---|
| Python | .py, .pyi |
Classes, Methods, Functions, Signatures, Docstrings |
| Rust | .rs |
Structs, Enums, Traits, Impl Methods, Functions, Doc comments |
| Go | .go |
Structs, Interfaces, Methods, Functions, Package comments |
| TypeScript | .ts, .tsx |
Classes, Interfaces, Types, Methods, Functions, JSDoc |
| JavaScript | .js, .jsx, .mjs |
Classes, Methods, Functions, JSDoc |
⚙️ Environment Configuration
| Variable | Default | Description |
|---|---|---|
KACHEDB_HOST |
127.0.0.1 |
KacheDB daemon hostname or IP |
KACHEDB_PORT |
6380 |
KacheDB daemon TCP port |
KACHEDB_WORKSPACE_ROOTS |
(empty) | Optional directory list (separated by : on Unix or ; on Windows) for multi-project discovery |
KACHEDB_AUTO_INDEX |
1 |
Enable autonomous lazy workspace indexing (1 or 0) |
KACHEDB_INDEX |
agent_semantic_memory |
Target vector index name for semantic memory |
KACHEDB_THRESHOLD |
0.80 |
Minimum cosine similarity (0.0 – 1.0) for semantic hits |
KACHEDB_TOKEN_COST_PER_MILLION |
3.0 |
Input token cost in USD per 1M tokens for telemetry accounting |
KACHEDB_DEFAULT_TTL |
86400 |
Default cache lifetime in seconds (24h) |
KACHEDB_EMBEDDER |
auto |
Embedding provider (auto, fastembed, transformers, openai, mock) |
OPENAI_API_KEY |
(optional) | API key if using KACHEDB_EMBEDDER=openai |
📄 License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Metadata
Release files for kachedb-mcp 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kachedb_mcp-0.4.0.tar.gz | 58.1 kB | With provenance | Details for kachedb_mcp-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kachedb_mcp-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for kachedb_mcp-0.4.0-py3-none-any.whl |
Total release size: 98.9 kB
Release files / kachedb_mcp-0.4.0.tar.gz
| Download URL | kachedb_mcp-0.4.0.tar.gz |
|---|---|
| Size | 58.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b303e86ca205da8670ae4434c799551d8166ff844be93fb9108a9a3a01b62e1
|
|
BLAKE2b-256 checksum How to use checksums |
b213f0f43b52d9bc579c6521a08b4d27365b01f4ea13f8c267082c62d3bcd12b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / kachedb_mcp-0.4.0-py3-none-any.whl
| Download URL | kachedb_mcp-0.4.0-py3-none-any.whl |
|---|---|
| Size | 40.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de893ab7b6e694cd42272dd46461537252d3c61605b67a17fdfa31fb41f76536
|
|
BLAKE2b-256 checksum How to use checksums |
c405f80ce1dd6790cc7978cc4d34050321254bbccd99eb251900cdceffeabd74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logSecurity for kachedb-mcp 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kachedb_mcp-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.