EyeLevel RAG MCP Server
A local Retrieval-Augmented Generation system that enables users to ingest markdown files into a FAISS-powered vector knowledge base for semantic search. It provides tools for document indexing and context retrieval to support informed LLM queries without external dependencies.
README
EyeLevel RAG MCP Server
A local Retrieval-Augmented Generation (RAG) system implemented as an MCP (Model Context Protocol) server. This server allows you to ingest markdown files into a local knowledge base and perform semantic search to retrieve relevant context for LLM queries.
Features
- Local RAG Implementation: No external dependencies or paid services required
- Markdown File Support: Ingest and search through
.mdfiles - Semantic Search: Uses sentence transformers for embedding-based similarity search
- Persistent Storage: Automatically saves and loads the vector index using FAISS
- Chunk Management: Intelligently splits documents into searchable chunks
- Multiple Documents: Support for ingesting and searching across multiple markdown files
Installation
- Clone this repository
- Install dependencies using uv:
uv sync
Dependencies
sentence-transformers: For creating text embeddingsfaiss-cpu: For efficient vector similarity searchnumpy: For numerical operationsmcp[cli]: For the MCP server framework
Available Tools
1. search_doc_for_rag_context(query: str)
Searches the knowledge base for relevant context based on a user query.
Parameters:
query(str): The search query
Returns:
- Relevant text chunks with relevance scores
2. ingest_markdown_file(local_file_path: str)
Ingests a markdown file into the knowledge base.
Parameters:
local_file_path(str): Path to the markdown file to ingest
Returns:
- Status message indicating success or failure
3. list_indexed_documents()
Lists all documents currently in the knowledge base.
Returns:
- Summary of indexed files and chunk counts
4. clear_knowledge_base()
Clears all documents from the knowledge base.
Returns:
- Confirmation message
Usage
-
Start the server:
python main.py -
Ingest markdown files: Use the
ingest_markdown_filetool to add your.mdfiles to the knowledge base. -
Search for context: Use the
search_doc_for_rag_contexttool to find relevant information for your queries.
How It Works
- Document Processing: Markdown files are split into chunks based on paragraphs and sentence boundaries
- Embedding Creation: Text chunks are converted to embeddings using the
all-MiniLM-L6-v2model - Vector Storage: Embeddings are stored in a FAISS index for fast similarity search
- Retrieval: User queries are embedded and matched against the stored vectors to find relevant content
File Structure
main.py: Main server implementation with RAG functionalitypyproject.toml: Project dependencies and configurationrag_index.faiss: FAISS vector index (created automatically)rag_documents.pkl: Serialized documents and metadata (created automatically)
Configuration
The RAG system uses the all-MiniLM-L6-v2 sentence transformer model by default. This model provides a good balance between speed and quality for semantic search tasks.
Example Workflow
- Prepare your markdown files with the content you want to search
- Use
ingest_markdown_fileto add each file to the knowledge base - Use
search_doc_for_rag_contextto find relevant context for your questions - The retrieved context can be used by an LLM to provide informed answers
Notes
- The first time you run the server, it will download the sentence transformer model
- The vector index is automatically saved and loaded between sessions
- Long documents are automatically chunked to optimize search performance
- The system supports multiple markdown files and maintains source file metadata
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。