knowledge-cache
MCP server for caching technical documentation, API references, and code patterns in SQLite + FTS5. Reduces repeated web lookups by storing knowledge locally with tag-based categorization and full-text search.
How it works
Agent -> knowledge_find("navmesh setdestination", ["unity"])
├── hit → returns cached content (avoids web fetch)
└── miss → fetch via context7 → knowledge_store(content, tags, url)
Tools
| Tool | Args | Description |
|---|---|---|
knowledge_find |
query: str, tags?: str[], limit?: int |
FTS5 full-text search with optional tag filter |
knowledge_store |
content: str, tags: str[], source_url?: str |
Store and index a knowledge entry |
knowledge_stats |
— | Cache statistics: total entries, top tags, date range |
knowledge_forget |
id: int |
Remove a stale entry |
Storage
SQLite with FTS5 for full-text search. Schema:
knowledge— entries with content, source URL, timestampsknowledge_fts— FTS5 virtual table (porter stemmer, prefix matching)knowledge_tags— category tags per entry (NOCASE, multi-tag filter)
Default database path: ./.knowledge/knowledge.db (configurable via --db-path).
Setup
Install
cd knowledge-cache
uv add mcp
MCP config (per project .mcp.json)
{
"mcpServers": {
"knowledge-cache": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/knowledge-cache",
"server.py",
"--db-path", "/path/to/project/.knowledge/knowledge.db"
]
}
}
}
Dependencies
Zero (stdlib: sqlite3, os, argparse). Requires mcp package for the MCP server transport. FTS5 is built into Python's SQLite on Windows.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file knowledge_cache-0.1.0.tar.gz.
File metadata
- Download URL: knowledge_cache-0.1.0.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3596ffc5aa36e50142f144ec2e69894379c3d954dc803745c60e787fd8449554
|
|
| MD5 |
f52cfd312cbf5eddc3473f9fdc5538f1
|
|
| BLAKE2b-256 |
2db944209f8a9332352217e08c03dab540891d20389e03a2905c843411b4582a
|
File details
Details for the file knowledge_cache-0.1.0-py3-none-any.whl.
File metadata
- Download URL: knowledge_cache-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49c3f67564a8c6d2f3f5df6d66073d120d06fdb7dd6918700804985cc449dc0d
|
|
| MD5 |
a6285cc1039a639a0a03ce470d4c7711
|
|
| BLAKE2b-256 |
441d24f5bc1497b2cbc1ca81d9e155030cf28cafd61b1337890ce96d111d6391
|