Skip to main content

MCP server for Mnemosyne -- semantic code retrieval with 6-signal hybrid search and AST-aware compression

Project description

mnemosyne-mcp

MCP server for Mnemosyne -- a 6-signal hybrid retrieval engine for code, documents, and database schemas. Reduces LLM context waste by 73%.

For the full reference, see MCP.md in the repository root.

Install

pip install mnemosyne-mcp

Register with Claude Code

claude mcp add mnemosyne -- mnemosyne-mcp

Or add to your project's .mcp.json:

{
  "mcpServers": {
    "mnemosyne": {
      "command": "mnemosyne-mcp",
      "args": []
    }
  }
}

Tools

search

Federated search across code and document partitions. Code results use 6-signal hybrid retrieval (BM25, TF-IDF, symbol matching, usage frequency, predictive prefetch, optional dense embeddings) fused via Reciprocal Rank Fusion. Document results use BM25 + TF-IDF with isolated vocabulary. Returns labeled sections so the LLM can perform cross-type ranking.

Parameters:

  • query (string, required) -- natural language or keyword query
  • budget (integer, default 8000) -- maximum token budget
  • project_root (string, optional) -- path to project root

search_docs

Search the document partition only (PDFs, DOCX, CSVs, logs, and other non-code files). Uses BM25 and TF-IDF with an isolated vocabulary tuned for prose retrieval.

Parameters:

  • query (string, required) -- natural language query
  • budget (integer, default 8000) -- maximum token budget
  • project_root (string, optional) -- path to project root

index

Index or re-index a codebase. Incremental by default (only processes changed files). Indexes both code and document partitions.

Parameters:

  • project_root (string, optional) -- path to project root
  • full (boolean, default false) -- force full re-index

stats

Show index statistics: file count, chunk count, tokens, language breakdown, chunk types.

Parameters:

  • project_root (string, optional) -- path to project root

schema_ingest

Ingest database schema into the index. Accepts DDL files (.sql), JSON/YAML schema snapshots, or SQLite database paths for live introspection.

Parameters:

  • source_path (string, required) -- path to schema source
  • environment (string, optional) -- tag for the schema source (e.g., "production", "staging")
  • project_root (string, optional) -- path to project root

schema_stats

Report indexed schema sources and statistics.

Parameters:

  • project_root (string, optional) -- path to project root

How it works

Mnemosyne indexes your codebase and documents into local SQLite, scoring every chunk with retrieval signals fused through Reciprocal Rank Fusion. Code gets 6-signal hybrid search; documents get BM25 + TF-IDF with isolated vocabulary. AST-aware compression strips boilerplate while preserving function signatures, control flow, and documentation.

Zero runtime dependencies beyond Python 3.11+. No API keys. No cloud services. Everything runs locally.

License

AGPL-3.0 -- commercial licensing available from Cast Net Technology.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemosyne_mcp-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

mnemosyne_mcp-0.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file mnemosyne_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: mnemosyne_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mnemosyne_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b06b6cc333d6b88a893210789fa3347599076bcc3a53ac500aee026917fcd8ee
MD5 df6d96b28e4314d11930915aa6cac837
BLAKE2b-256 14a4122a860af6c4de90e964d363afbaba6cd8867fd53458152f90156b72270f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnemosyne_mcp-0.2.0.tar.gz:

Publisher: publish-mcp.yml on castnettech/mnemosyne

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnemosyne_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mnemosyne_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mnemosyne_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5233cc452727d690db9d7f47d5ad4dadfbd57209b447e58925d679a637b719a2
MD5 f1944654a0c5f8eaa629da222dad232a
BLAKE2b-256 71527b40696b62f37ee7e31d690b6ef95101236730c3ad9af05c8e60b311939c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnemosyne_mcp-0.2.0-py3-none-any.whl:

Publisher: publish-mcp.yml on castnettech/mnemosyne

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page