Skip to main content

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, timestamps
  • knowledge_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

knowledge_cache-0.1.0.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knowledge_cache-0.1.0-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

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

Hashes for knowledge_cache-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3596ffc5aa36e50142f144ec2e69894379c3d954dc803745c60e787fd8449554
MD5 f52cfd312cbf5eddc3473f9fdc5538f1
BLAKE2b-256 2db944209f8a9332352217e08c03dab540891d20389e03a2905c843411b4582a

See more details on using hashes here.

File details

Details for the file knowledge_cache-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for knowledge_cache-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49c3f67564a8c6d2f3f5df6d66073d120d06fdb7dd6918700804985cc449dc0d
MD5 a6285cc1039a639a0a03ce470d4c7711
BLAKE2b-256 441d24f5bc1497b2cbc1ca81d9e155030cf28cafd61b1337890ce96d111d6391

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page