
zackriya-solutions/mcp-markdown-rag 是从 https://github.com/zackriya-solutions/mcp-markdown-rag. 导入的 MCP 服务器候选
概览
zackriya-solutions/mcp-markdown-rag 是从 https://github.com/zackriya-solutions/mcp-markdown-rag. 导入的 MCP 服务器候选
概述(AI 翻译)
MCP-Markdown-RAG
一个模型上下文协议(MCP)服务器,为你的markdown文档提供本地优先的RAG引擎。该服务器使用基于文件的Milvus向量数据库来索引你的笔记,使大型语言模型(LLMs)能够进行语义搜索并从本地文件中检索相关内容。
[!注] 该项目正在积极开发中。API 和实现可能会发生变化。我们正在探索未来的改进,包括可能移植到 Obsidian 插件以实现无缝 Vault 集成。
🎯 主要特色
✅ 本地优先且私密:所有数据都处理并存储在本地。不会发送给第三方服务进行索引。
✅ Markdown 语义搜索:超越简单的关键词搜索。根据概念意义查找文档部分。
✅ ** MCP 兼容**:可集成任何支持 MCP 的主机应用程序,如 Claude Desktop、Windsurf 或 Cursor。
✅ 简单工具:提供两个直观的工具(index_documents 和 search)用于管理和查询你的知识库。
⚙️ 工作原理
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
A Model Context Protocol (MCP) server that provides a local-first RAG engine for your markdown documents. This server uses a file-based Milvus vector database to index your notes, enabling Large Language Models (LLMs) to perform semantic search and retrieve relevant content from your local files.
[!NOTE] This project is in active development. The API and implementation are subject to change. We are exploring future enhancements, including a potential port to an Obsidian plugin for seamless vault integration.
🎯 Key Features
✅ Local-First & Private: All your data is processed and stored locally. Nothing is sent to a third-party service for indexing.
✅ Semantic Search for Markdown: Go beyond simple keyword search. Find document sections based on conceptual meaning.
✅ MCP Compatible: Integrates with any MCP-supported host application like Claude Desktop, Windsurf, or Cursor.
✅ Simple Tooling: Provides two straightforward tools (index_documents and search) for managing and querying your knowledge base.
⚙️ How It Works
The server operates in two main phases, exposing its functionality through MCP tools.
-
Indexing:
- The
index_documentstool is called with a path to your markdown files. - The server reads the documents, splits them into logical chunks (e.g., by headings), and converts each chunk into a vector embedding.
- These embeddings, along with their metadata (original text, file path), are stored in a local Milvus vector database.
- You can run it in two modes:
- Full Reindex (force_reindex=True): Clears and rebuilds the entire index from scratch.
- Incremental Update (force_reindex=False, default): Automatically detects and re-indexes only changed files by comparing them against a tracking log. Deleted or modified chunks are pruned and replaced to keep the index up-to-date.
- Recursive Indexing (recursive=False, default): Recursively indexes all subdirectories.
- The
-
Searching:
- When you ask a question in a host application, it uses the
searchtool. - The server converts your query into a vector embedding.
- It then performs a similarity search against the Milvus database to find the most semantically relevant document chunks.
- When you ask a question in a host application, it uses the
安装
npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/MCP-Markdown-RAG run server.py配置
{
"mcpServers": {
"markdown_rag": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/MCP-Markdown-RAG",
"run",
"server.py"
]
}
}
}