Mnē-MCP
Mnē-MCP — 面向 opencode 的 RAG MCP 服务器
Mnē-MCP(源自希腊语 Mnēmosynē,记忆女神提坦;ē 中的长音符号 U+0113 标记了音译中的长元音)是一个为 opencode 实现完整 RAG(检索增强生成)管道的 MCP 服务器:它索引 Obsidian 仓库或文档文件夹,并使用用户自己的笔记作为来源回答助手的问题,同时引用每个使用片段的精确路径。
技术栈:#RAG #MCP #mcp-server #opencode #Obsidian #Qdrant #Ollama #DeepSeek #bge-m3 #Python
功能
增量索引 — 从磁盘扫描目录(
.md、.txt),通过mtime+md5检测变更,清理过时点(stale cleanup),并支持大容量卷(约 19 GB)。本地嵌入 — 通过本地 Ollama(
/api/embed)使用bge-m3模型,1024 维,多语言(含西班牙语),L2 归一化以正确适配余弦相似度。语义检索 — Qdrant(Docker),单一集合,通过 payload 过滤(
source、path、mtime、md5、heading_path),可配置相关性阈值。有据生成 — 仅当证据超过阈值时,才使用
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·httpx7 个工具:
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)。
请求 | 行为 |
| 增量扫描,跳过未变更文件,批量上传向量 |
| 检索 → 重排序器/LLM → 带引用的回答( |
| 带 |
| Qdrant/Ollama 健康状态、LLM 状态、按来源计数 |
路线图
密集+稀疏混合搜索(BM25 + RRF)· cross-encoder 重排序 · 语义缓存 · 评估框架(recall@k、MRR、nDCG)— 计划在 openspec/specs/mnemos-differentiators/ 中。
学术
综合项目 · 教授 Christian Pérez · 学生:Gat · 2026
Available Tools
7 toolsconfigC
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.
searchB
Raw vector retrieval without the LLM.
Inputs: text (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
Scored across 7 tools
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.
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.
Seven tools is well-scoped for a focused memory/RAG server. Each tool covers a necessary operation without redundancy or bloat.
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
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Open-source Obsidian for MDX - edit local docs with agent assistance
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables 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-
- FlicenseNot gradedqualityCmaintenanceEnables AI-powered chat and file operations on Obsidian vaults with local indexing, hybrid search, and MCP access.-
- AlicenseNot gradedqualityBmaintenanceEnables 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.1MIT
- AlicenseAqualityBmaintenanceEnables natural-language and keyword search across Obsidian notes, returning reranked passages with provenance, and supports reading notes and incremental indexing.31MIT