EyeLevel RAG MCP Server

$git clone https://github.com/wannabidr/test-for-MCP && cd test-for-MCP && uv sync
README.md

A local Retrieval-Augmented Generation system for markdown files

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

Tools (4)

search_doc_for_rag_contextSearches the knowledge base for relevant context based on a user query.
ingest_markdown_fileIngests a markdown file into the knowledge base.
list_indexed_documentsLists all documents currently in the knowledge base.
clear_knowledge_baseClears all documents from the knowledge base.

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "eyelevel-rag": {
      "command": "python",
      "args": ["/path/to/main.py"]
    }
  }
}

Try it

Ingest the file 'project_notes.md' into my local knowledge base.
Search my indexed documents for information regarding the system architecture.
List all the markdown files that have been indexed so far.
Clear the knowledge base so I can start a fresh index.
Find relevant context in my documents about the API authentication process.

Frequently Asked Questions

What are the key features of EyeLevel RAG?

Local RAG Implementation with no external dependencies or paid services. Semantic Search using sentence transformers for embedding-based similarity. Persistent Storage that automatically saves and loads the vector index using FAISS. Intelligent Chunk Management that splits documents into searchable segments. Support for ingesting and searching across multiple markdown files.

What can I use EyeLevel RAG for?

Building a private knowledge base from local markdown notes for LLM querying. Retrieving specific context from technical documentation without uploading data to the cloud. Performing semantic searches across a collection of research papers or project logs. Enhancing LLM responses with factual data stored in local .md files.

How do I install EyeLevel RAG?

Install EyeLevel RAG by running: git clone https://github.com/wannabidr/test-for-MCP && cd test-for-MCP && uv sync

What MCP clients work with EyeLevel RAG?

EyeLevel RAG works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use EyeLevel RAG with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free