kachedb-mcp 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ name: "🐛 Bug Report"
2
+ description: "File a bug report for kachedb-mcp"
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: "Thanks for taking the time to report a bug in `kachedb-mcp`!"
8
+ - type: textarea
9
+ id: description
10
+ attributes:
11
+ label: "Describe the bug"
12
+ description: "A clear and concise description of what the bug is."
13
+ validations:
14
+ required: true
15
+ - type: textarea
16
+ id: reproduction
17
+ attributes:
18
+ label: "Steps to Reproduce"
19
+ description: "Minimal configuration or code snippet to reproduce the issue."
20
+ placeholder: |
21
+ # mcp_config.json
22
+ {
23
+ "mcpServers": {
24
+ "kachedb": {
25
+ "command": "kachedb-mcp",
26
+ "env": { "KACHEDB_HOST": "127.0.0.1", "KACHEDB_PORT": "6379" }
27
+ }
28
+ }
29
+ }
30
+ # Then I called: kache_get("my-key") and ...
31
+ validations:
32
+ required: true
33
+ - type: textarea
34
+ id: expected
35
+ attributes:
36
+ label: "Expected Behavior"
37
+ description: "What you expected to happen."
38
+ validations:
39
+ required: true
40
+ - type: dropdown
41
+ id: tool
42
+ attributes:
43
+ label: "Which MCP tool is affected?"
44
+ options:
45
+ - kache_get
46
+ - kache_set
47
+ - kache_save_context
48
+ - kache_semantic_search
49
+ - kache_delete
50
+ - kache_stats
51
+ - kache_telemetry
52
+ - Server startup / connection
53
+ - Other
54
+ validations:
55
+ required: false
56
+ - type: input
57
+ id: environment
58
+ attributes:
59
+ label: "Environment"
60
+ description: "Python version, OS, MCP client (Antigravity IDE / Claude Desktop / Cursor), kachedb-mcp version."
61
+ placeholder: "Python 3.11, macOS 14, Claude Desktop, kachedb-mcp 0.1.0"
62
+ validations:
63
+ required: false
@@ -0,0 +1,47 @@
1
+ name: "🚀 Feature Request / New MCP Tool Proposal"
2
+ description: "Suggest a new MCP tool or improvement for kachedb-mcp"
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: "Have an idea to extend `kachedb-mcp` with a new tool or capability? We'd love to hear it!"
8
+ - type: textarea
9
+ id: problem
10
+ attributes:
11
+ label: "Problem or Use Case"
12
+ description: "What problem does this solve for AI agents or coding assistants?"
13
+ placeholder: |
14
+ e.g. I want AI agents to be able to list all cached keys with a wildcard pattern,
15
+ so they can efficiently invalidate stale file summaries after a large refactor.
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: proposal
20
+ attributes:
21
+ label: "Proposed Solution"
22
+ description: "A clear description of the new tool or feature you want added."
23
+ placeholder: |
24
+ e.g. Add a `kache_keys(pattern)` MCP tool that returns all matching keys.
25
+ validations:
26
+ required: true
27
+ - type: dropdown
28
+ id: category
29
+ attributes:
30
+ label: "Category"
31
+ options:
32
+ - New MCP Tool
33
+ - Embedding Provider
34
+ - Telemetry & Observability
35
+ - Configuration & Environment
36
+ - Documentation
37
+ - Performance
38
+ - Other
39
+ validations:
40
+ required: false
41
+ - type: textarea
42
+ id: alternatives
43
+ attributes:
44
+ label: "Alternative Solutions"
45
+ description: "Any alternative tools or features you've considered."
46
+ validations:
47
+ required: false
@@ -0,0 +1,34 @@
1
+ ## 📋 Description
2
+
3
+ Provide a brief summary of the changes introduced by this Pull Request.
4
+
5
+ - What problem does this solve?
6
+ - What is the new behavior?
7
+
8
+ ---
9
+
10
+ ## 🧪 Testing Checklist
11
+
12
+ - [ ] All unit tests pass: `pytest tests/ -v`
13
+ - [ ] Linter checks pass: `ruff check src/ tests/`
14
+ - [ ] Code formatting verified: `ruff format --check src/ tests/`
15
+ - [ ] Type check passes: `mypy src/kachedb_mcp/`
16
+ - [ ] Documentation / `README.md` updated (if applicable)
17
+ - [ ] `CHANGELOG.md` updated
18
+ - [ ] KacheDB daemon is running and `kache_stats` returns `HEALTHY` (if testing live tools)
19
+
20
+ ---
21
+
22
+ ## 🤖 MCP Tool Impact
23
+
24
+ If this PR adds or modifies an MCP tool, please confirm:
25
+
26
+ - [ ] Tool is registered in `server.py` via `mcp.tool()(...)`.
27
+ - [ ] Tool has a clear docstring with `Args:` and `Returns:` sections.
28
+ - [ ] Telemetry (`tracker.record_hit()` / `tracker.record_miss()`) is updated where applicable.
29
+
30
+ ---
31
+
32
+ ## 🔗 Related Issues / PRs
33
+
34
+ Closes # (issue number)
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ env:
14
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
15
+
16
+ jobs:
17
+ lint:
18
+ name: Lint & Type Check
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install dependencies
29
+ run: pip install -e ".[dev]"
30
+
31
+ - name: Ruff check
32
+ run: ruff check src/ tests/
33
+
34
+ - name: Ruff format check
35
+ run: ruff format --check src/ tests/
36
+
37
+ - name: Mypy type check
38
+ run: mypy src/kachedb_mcp/
39
+
40
+ test:
41
+ name: Test (Python ${{ matrix.python-version }})
42
+ runs-on: ubuntu-latest
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - name: Set up Python ${{ matrix.python-version }}
52
+ uses: actions/setup-python@v5
53
+ with:
54
+ python-version: ${{ matrix.python-version }}
55
+
56
+ - name: Install package with dev dependencies
57
+ run: pip install -e ".[dev]"
58
+
59
+ - name: Run unit tests
60
+ run: pytest tests/ -v -x
@@ -0,0 +1,53 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ id-token: write # Required for Trusted Publisher (OIDC)
9
+
10
+ env:
11
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
12
+
13
+ jobs:
14
+ build:
15
+ name: Build Distribution
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - name: Install build tools
26
+ run: pip install build
27
+
28
+ - name: Build sdist and wheel
29
+ run: python -m build
30
+
31
+ - name: Upload distribution artifacts
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ publish:
38
+ name: Publish to PyPI
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ environment:
42
+ name: pypi
43
+ url: https://pypi.org/project/kachedb-mcp/
44
+
45
+ steps:
46
+ - name: Download distribution artifacts
47
+ uses: actions/download-artifact@v4
48
+ with:
49
+ name: dist
50
+ path: dist/
51
+
52
+ - name: Publish to PyPI
53
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,33 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ .Python
6
+ build/
7
+ develop-eggs/
8
+ dist/
9
+ downloads/
10
+ eggs/
11
+ .eggs/
12
+ lib/
13
+ lib64/
14
+ parts/
15
+ sdist/
16
+ var/
17
+ wheels/
18
+ *.egg-info/
19
+ .installed.cfg
20
+ *.egg
21
+
22
+ .env
23
+ .venv
24
+ env/
25
+ venv/
26
+ ENV/
27
+
28
+ .pytest_cache/
29
+ .coverage
30
+ htmlcov/
31
+ .mypy_cache/
32
+ .ruff_cache/
33
+ .DS_Store
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to **`kachedb-mcp`** will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [0.1.1] — 2026-08-28
11
+
12
+ ### Fixed
13
+ - **CI / Type Checking:** Set `warn_unused_ignores = false` in `[tool.mypy]` to prevent false `unused-ignore` errors when optional MCP imports (`mcp.server.MCPServer`, `mcp.server.fastmcp.FastMCP`) are resolvable on the CI runner.
14
+
15
+ ### Added
16
+ - **GitHub Actions CI (`ci.yml`):** Lint, format, type-check, and test matrix across Python 3.10 – 3.13 on every push to `main` and PR.
17
+ - **GitHub Actions Publish (`publish.yml`):** Trusted Publisher (OIDC) automated release to PyPI on GitHub Release publish.
18
+ - **PR Template (`.github/PULL_REQUEST_TEMPLATE.md`):** Testing checklist and MCP tool impact section.
19
+ - **Issue Templates:** Bug report (with MCP tool dropdown) and feature request forms.
20
+
21
+ ---
22
+
23
+ ## [0.1.0] — 2026-08-28
24
+
25
+ ### Initial Release
26
+ - **Model Context Protocol (MCP) Server for KacheDB:**
27
+ - Implemented FastMCP / MCPServer supporting stdio JSON-RPC transport for Antigravity IDE, Claude Desktop, and Cursor.
28
+ - **7 Native MCP Tools:**
29
+ - `kache_semantic_search`: Sub-100µs natural language concept & code retrieval via KacheDB SIMD vector kernel.
30
+ - `kache_save_context`: Save architectural patterns, bug solutions, and file digests with vector embeddings.
31
+ - `kache_get`: Sub-50µs exact key retrieval.
32
+ - `kache_set`: In-memory storage with optional TTL.
33
+ - `kache_delete`: Explicit cache invalidation.
34
+ - `kache_stats`: Real-time connection health and memory footprint.
35
+ - `kache_telemetry`: Cumulative token savings and avoided latency tracking.
36
+ - **Pluggable Embedding Providers:** Support for FastEmbed (ONNX Runtime), HuggingFace Transformers, SentenceTransformers, OpenAI, and lightweight MockEmbedder.
37
+ - **Packaging:** Added `pyproject.toml` with `kachedb-mcp` CLI command entrypoint.
38
+ - **Unit Test Suite:** 10/10 test suite covering mock clients, semantic vector searches, and MCP registration.
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vubon Roy and KacheDB Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.5
2
+ Name: kachedb-mcp
3
+ Version: 0.1.1
4
+ Summary: High-performance Model Context Protocol (MCP) server for KacheDB — in-memory cache & SIMD semantic memory for AI agents
5
+ Project-URL: Homepage, https://github.com/vubon/kachedb-mcp
6
+ Project-URL: Repository, https://github.com/vubon/kachedb-mcp
7
+ Project-URL: Documentation, https://github.com/vubon/kachedb-mcp#readme
8
+ Project-URL: Bug Tracker, https://github.com/vubon/kachedb-mcp/issues
9
+ Project-URL: KacheDB Core, https://github.com/vubon/kachedb
10
+ Author: KacheDB Core Team
11
+ License-Expression: Apache-2.0 OR MIT
12
+ License-File: LICENSE-APACHE
13
+ License-File: LICENSE-MIT
14
+ Keywords: agent-memory,antigravity,claude-desktop,cursor,kachedb,mcp,model-context-protocol,semantic-cache
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Database
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: kachedb>=0.1.0a5
32
+ Requires-Dist: mcp>=1.0.0
33
+ Requires-Dist: pydantic>=2.0
34
+ Provides-Extra: all
35
+ Requires-Dist: fastembed>=0.3.0; extra == 'all'
36
+ Requires-Dist: openai>=1.0.0; extra == 'all'
37
+ Provides-Extra: dev
38
+ Requires-Dist: mypy>=1.0; extra == 'dev'
39
+ Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
40
+ Requires-Dist: pytest>=7.0; extra == 'dev'
41
+ Requires-Dist: ruff>=0.4; extra == 'dev'
42
+ Provides-Extra: fastembed
43
+ Requires-Dist: fastembed>=0.3.0; extra == 'fastembed'
44
+ Provides-Extra: openai
45
+ Requires-Dist: openai>=1.0.0; extra == 'openai'
46
+ Description-Content-Type: text/markdown
47
+
48
+ # 🧠 KacheDB MCP Server
49
+
50
+ [![PyPI](https://img.shields.io/pypi/v/kachedb-mcp.svg)](https://pypi.org/project/kachedb-mcp/)
51
+ [![License](https://img.shields.io/badge/license-Apache--2.0%20%7C%20MIT-blue.svg)](LICENSE)
52
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
53
+
54
+ **High-Speed Model Context Protocol (MCP) server for KacheDB** — exposing sub-millisecond in-memory caching and SIMD semantic vector memory to **Antigravity IDE**, **Claude Desktop**, **Cursor**, and AI coding agents.
55
+
56
+ ---
57
+
58
+ ## ⚡ Why KacheDB for AI Agents?
59
+
60
+ AI coding assistants (like Antigravity IDE and Claude Desktop) repeatedly re-read large codebases, AST parses, and architecture plans, wasting thousands of tokens and adding hundreds of milliseconds of latency per turn.
61
+
62
+ `kachedb-mcp` connects your AI assistant directly to **KacheDB's Megaslab pure-RAM cache**:
63
+ - 🚀 **Sub-50 Microsecond Retrieval:** $< 50\ \mu\text{s}$ cache hits in memory.
64
+ - 🧠 **SIMD Semantic Vector Memory:** Natural language concept and code recall powered by ARM NEON & AVX2/FMA cosine similarity kernels.
65
+ - 🪙 **Massive Token & Cost Savings:** Saves up to 80% of repetitive prompt tokens and tracks cumulative financial savings in real time.
66
+
67
+ ---
68
+
69
+ ## 🛠️ MCP Tools Exposed
70
+
71
+ | Tool | Type | Description |
72
+ | :--- | :---: | :--- |
73
+ | `kache_semantic_search` | 🧠 *Vector* | Natural language semantic search over cached codebases, PR reviews, and past decisions (`top_k`, `threshold`). |
74
+ | `kache_save_context` | 🧠 *Vector* | Save an architectural pattern, bug solution, or file digest with SIMD vector embeddings. |
75
+ | `kache_get` | ⚡ *Exact* | Sub-millisecond exact key retrieval for code chunks, ASTs, and tool outputs. |
76
+ | `kache_set` | ⚡ *Exact* | Store string content in memory with optional TTL expiration. |
77
+ | `kache_delete` | ⚡ *Exact* | Remove a key or vector from cache. |
78
+ | `kache_stats` | 📊 *Metrics* | Real-time connection health, active vector counts, and RAM footprint. |
79
+ | `kache_telemetry` | 📊 *Metrics* | Live cumulative tokens saved, latency saved (seconds), and hit ratios. |
80
+
81
+ ---
82
+
83
+ ## 🚀 Quickstart
84
+
85
+ ### 1. Start the KacheDB Server Daemon
86
+ Ensure your KacheDB daemon is running locally:
87
+ ```bash
88
+ kachedb-server --port 6379
89
+ ```
90
+
91
+ ### 2. Configure in Antigravity IDE / Claude Desktop / Cursor
92
+
93
+ Add `kachedb` to your MCP configuration file (`mcp_config.json` or `claude_desktop_config.json`):
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "kachedb": {
99
+ "command": "uvx",
100
+ "args": ["kachedb-mcp"],
101
+ "env": {
102
+ "KACHEDB_HOST": "127.0.0.1",
103
+ "KACHEDB_PORT": "6379",
104
+ "KACHEDB_INDEX": "agent_semantic_memory",
105
+ "KACHEDB_THRESHOLD": "0.80"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ Or run via Python `pip`:
113
+ ```bash
114
+ pip install kachedb-mcp
115
+ ```
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "kachedb": {
120
+ "command": "kachedb-mcp"
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ ---
127
+
128
+ ## ⚙️ Environment Configuration
129
+
130
+ | Variable | Default | Description |
131
+ | :--- | :--- | :--- |
132
+ | `KACHEDB_HOST` | `127.0.0.1` | KacheDB daemon hostname or IP |
133
+ | `KACHEDB_PORT` | `6379` | KacheDB daemon TCP port |
134
+ | `KACHEDB_INDEX` | `agent_semantic_memory` | Target vector index name for semantic memory |
135
+ | `KACHEDB_THRESHOLD` | `0.80` | Minimum cosine similarity (0.0 – 1.0) for semantic hits |
136
+ | `KACHEDB_DEFAULT_TTL` | `86400` | Default cache lifetime in seconds (24h) |
137
+ | `KACHEDB_EMBEDDER` | `auto` | Embedding provider (`auto`, `fastembed`, `transformers`, `openai`, `mock`) |
138
+ | `OPENAI_API_KEY` | (optional) | API key if using `KACHEDB_EMBEDDER=openai` |
139
+
140
+ ---
141
+
142
+ ## 📄 License
143
+
144
+ Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT License](LICENSE-MIT) at your option.