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 볼트 또는 문서 폴더를 인덱싱하고, 자체 노트를 소스로 사용하여 어시스턴트의 질문에 응답하며, 사용된 각 조각의 정확한 경로를 인용합니다.

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

기능

  1. 증분 인덱싱 — mtime + md5를 통한 변경 감지, 오래된 포인트 제거(stale cleanup), 대용량 볼륨(~19 GB) 지원과 함께 디스크의 디렉터리(.md, .txt)를 스캔합니다.

  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: + mocks) + 엔드투엔드 스모크 테스트.

개발자 사용법

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 상태, 소스별 개수

로드맵

하이브리드 dense+sparse 검색(BM25 + RRF) · cross-encoder reranking · 시맨틱 캐시 · 평가 하네스(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