Skip to main content
Glama
Mnē-MCP
by Gatoco

Mnē-MCP — RAG-MCP-Server für opencode

Mnē-MCP (vom griechischen Mnēmosynē, Titanin der Erinnerung; das Makron in ē, U+0113, markiert den langen Vokal in der Transliteration) ist ein MCP-Server, der eine vollständige RAG-Pipeline (Retrieval-Augmented Generation) für opencode implementiert: Er indexiert ein Obsidian-Vault oder Dokumentordner und beantwortet Fragen des Assistenten unter Verwendung der eigenen Notizen als Quelle, wobei der genaue Pfad jedes verwendeten Fragments zitiert wird.

Stack: #RAG #MCP #mcp-server #opencode #Obsidian #Qdrant #Ollama #DeepSeek #bge-m3 #Python

Funktionalität

  1. Inkrementelle Indexierung — scannt Verzeichnisse (.md, .txt) von der Festplatte mit Änderungserkennung über mtime + md5, Entfernung veralteter Punkte (Stale Cleanup) und Unterstützung großer Volumes (~19 GB).

  2. Lokale Embeddings — Modell bge-m3 über lokales Ollama (/api/embed), 1024 Dimensionen, mehrsprachig (einschließlich Spanisch), L2-normalisiert für korrekte Skalierung mit Kosinus-Ähnlichkeit.

  3. Semantische Abfrage — Qdrant (Docker), einzelne Sammlung mit Filtern über Payload (source, path, mtime, md5, heading_path) und konfigurierbarem Relevanz-Schwellenwert.

  4. Fundierte Generierung — Antworten mit deepseek-v4-flash (Ollama Cloud) nur, wenn die Evidenz den Schwellenwert überschreitet; andernfalls explizite Ablehnung ("no relevant documents found"). Ohne Evidenz keine Generierung.

Related MCP server: Obsidian MCP Assistant

Architektur

MCP tools (stdio) ──┐
                    ├── RagService (core) ────▶ Qdrant (vectorial, Docker)
Admin page (:8310) ─┘       │
                            ├── OllamaEmbedder (bge-m3 local)
                            └── LLMProvider (deepseek-v4-flash, Ollama Cloud)
  • Python 3.14 · Offizielles MCP-SDK (mcp==1.12.4) · qdrant-client · httpx

  • 7 Werkzeuge: index · query · search · delete · list · stats · config

  • Lokale Verwaltungsseite (http://127.0.0.1:8310): Dashboard, indexierte Dokumente, asynchrone Indexierung mit Fortschritt und Such-Playground. Teilt denselben Kern wie die MCP-Werkzeuge (null doppelte Logik).

  • Suite von 70 Offline-Tests (Qdrant :memory: + Mocks) + End-to-End-Smoke-Test.

Verwendung für Entwickler

docker compose up -d qdrant   # Qdrant
ollama pull bge-m3            # embeddings locales
cp .env.example .env          # OLLAMA_API_KEY + VAULT_ROOT
make install                  # instala el paquete (venv)
make admin                    # panel: http://127.0.0.1:8310

Registrierung in opencode.json (Abschnitt mcp, Typ local, Befehl python3 mcp_rag/server.py oder der Entry Point mcp-rag-opencode).

Anfrage

Verhalten

index (source, path, force_rescan, max_files)

Inkrementeller Scan, überspringt unveränderte Dateien, lädt Vektoren in Stapeln hoch

query (question, top_k ≤ 8, source, path_prefix, score_threshold)

Abruf → Reranker/LLM → Antwort mit Zitaten (path + heading_path)

search

Rohe Treffer mit score, ohne Generierung

stats

Gesundheit von Qdrant/Ollama, LLM-Status, Zählungen nach Quelle

Roadmap

Hybride Suche dicht+spärlich (BM25 + RRF) · Cross-Encoder-Reranking · semantischer Cache · Evaluierungs-Harness (recall@k, MRR, nDCG) — geplant in openspec/specs/mnemos-differentiators/.

Akademisch

Integriertes Projekt · Prof. Christian Pérez · Student: Gat · 2026

Available Tools

7 tools
configC

Get the full config, or set one persisted field.

Inputs: key, value, action.

deleteA

Delete indexed docs by exact path or by source.

Inputs: path, source.

indexB

Index the vault (source root or sub-path) into Qdrant.

Inputs: path, source, max_files, force_rescan.

listA

List indexed documents (paginated, filter by source/path prefix).

Inputs: limit, offset, source, path_prefix.

queryC

Retrieve context and answer the question with the LLM.

Inputs: question (required), top_k, source, path_prefix, +1 more.

statsB

Return collection stats and provider health.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a distinct role: indexing, LLM-based querying, raw vector search, deletion, listing, stats, and config. Query and search are clearly separated by whether the LLM is involved.

    Naming Consistency5/5

    All tool names are lowercase, single-word commands that follow a consistent imperative/noun style. The set is uniform and predictable despite not using a verb_noun pattern.

    Tool Count5/5

    Seven tools is well-scoped for a focused memory/RAG server. Each tool covers a necessary operation without redundancy or bloat.

    Completeness5/5

    The toolset covers the full indexed-document lifecycle: add via index, retrieve via search/query, remove via delete, inspect via list and stats, and configure via config. No critical missing operation is apparent.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables indexing local documents (PDF, Markdown, text, code) into a knowledge base and querying them via semantic search using local embeddings, all running privately on your machine.
      4
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to search, read, create, update, and delete notes in a local Obsidian vault through hybrid semantic and lexical retrieval, with all embedding and vector storage running locally.
      1
      MIT