EyeLevel RAG MCP Server

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.

Category
访问服务器

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 .md files
  • 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

  1. Clone this repository
  2. Install dependencies using uv:
    uv sync
    

Dependencies

  • sentence-transformers: For creating text embeddings
  • faiss-cpu: For efficient vector similarity search
  • numpy: For numerical operations
  • mcp[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

  1. Start the server:

    python main.py
    
  2. Ingest markdown files: Use the ingest_markdown_file tool to add your .md files to the knowledge base.

  3. Search for context: Use the search_doc_for_rag_context tool to find relevant information for your queries.

How It Works

  1. Document Processing: Markdown files are split into chunks based on paragraphs and sentence boundaries
  2. Embedding Creation: Text chunks are converted to embeddings using the all-MiniLM-L6-v2 model
  3. Vector Storage: Embeddings are stored in a FAISS index for fast similarity search
  4. Retrieval: User queries are embedded and matched against the stored vectors to find relevant content

File Structure

  • main.py: Main server implementation with RAG functionality
  • pyproject.toml: Project dependencies and configuration
  • rag_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

  1. Prepare your markdown files with the content you want to search
  2. Use ingest_markdown_file to add each file to the knowledge base
  3. Use search_doc_for_rag_context to find relevant context for your questions
  4. 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

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选