Skip to main content
Glama
Mnē-MCP
by Gatoco

Mnē-MCP — opencode 向け RAG MCP サーバー

Mnē-MCP (ギリシャ語の Mnēmosynē、記憶の女神に由来。ē U+0113 のマクロンは翻字における長母音を示す) は、MCP サーバーで、opencode 向けに完全な RAG (Retrieval-Augmented Generation) パイプラインを実装します: Obsidian の vault またはドキュメントフォルダーをインデックスし、アシスタントの質問に対して自身のノートを情報源として回答し、使用された各フラグメントの正確なパスを引用します。

スタック: #RAG #MCP #mcp-server #opencode #Obsidian #Qdrant #Ollama #DeepSeek #bge-m3 #Python

機能

  1. インクリメンタルインデックス — ディスク上のディレクトリ (.md, .txt) をスキャンし、mtime + md5 による変更検出、古くなったポイントの削除 (stale cleanup)、大容量ボリューム (約19GB) をサポート。

  2. ローカル埋め込み — ローカルの Ollama (/api/embed) 経由の bge-m3 モデル。1024次元、多言語 (スペイン語を含む)、コサイン類似度で正しくスケールするよう L2 正規化済み。

  3. 意味検索 — Qdrant (Docker)、ペイロードフィルター (source, path, mtime, md5, heading_path) 付きの単一コレクション、調整可能な関連性しきい値。

  4. 根拠付き生成 — エビデンスがしきい値を超えた場合のみ deepseek-v4-flash (Ollama Cloud) で回答。それ以外の場合は明示的な拒否 ("no relevant documents found") を返します。エビデンスがなければ生成しません。

Related MCP server: Obsidian MCP Assistant

アーキテクチャ

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

  • 7つのツール: index · query · search · delete · list · stats · config

  • ローカル管理ページ (http://127.0.0.1:8310): ダッシュボード、インデックス済みドキュメント、進捗付き非同期インデックス、検索プレイグラウンド。MCP ツールと同じコアを共有 (重複ロジックはゼロ)。

  • 70件のオフラインテストスイート (Qdrant :memory: + モック) + エンドツーエンドのスモークテスト。

開発者向け利用

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

opencode.json に登録します (mcp セクション、local タイプ、コマンド python3 mcp_rag/server.py、またはエントリポイント mcp-rag-opencode)。

リクエスト

動作

index (source, path, force_rescan, max_files)

インクリメンタルスキャン、変更のないファイルをスキップ、ベクトルをバッチでアップロード

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

検索 → reranker/LLM → 引用付き回答 (path + heading_path)

search

score 付きの生のヒット、生成なし

stats

Qdrant/Ollama の健全性、LLM の状態、ソース別カウント

ロードマップ

デンス+スパースのハイブリッド検索 (BM25 + RRF) · cross-encoder リランキング · セマンティックキャッシュ · 評価ハーネス (recall@k, MRR, nDCG) — openspec/specs/mnemos-differentiators/ に計画中。

学術

統合プロジェクト · 教授 Christian Pérez · 学生: 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