mcp-rag-server

@kwanleefrmvi Claim

Basic information

Runtime
node
License
MIT
Transports
stdio
Author
kwanleefrmvi
Submitted by
Community
Quality
40
Stars
35

About mcp-rag-server

mcp-rag-server is a Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG) capabilities. It empowers Large Language Models (LLMs) to answer questions based on your document content by indexing and retrieving relevant information efficiently.

mcp-rag-server is a MCP server in the Memory & Knowledge category listed in the AddMCP.net directory, published by kwanLeeFrmVi. It exposes 5 tools, including embedding_documents, query_documents, remove_document, remove_all_documents and more. Supported transport: stdio. Runtime: node. License: MIT. The repository has 35 GitHub stars. Source code is hosted on github.com. Related topics: mcp-server, rag.

Setup

{
    "mcpServers": {
        "mcp-rag-server-kwanleefrmvi": {
            "command": "npx",
            "args": [
                "mcp-rag-server"
            ]
        }
    }
}

mcp-rag-server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mcp-rag-server-kwanleefrmvi": {
            "command": "npx",
            "args": [
                "mcp-rag-server"
            ]
        }
    }
}

mcp-rag-server tools

  • embedding_documents — Add documents from directory path or file path for RAG embedding and store to DB. Supported file types: .json, .jsonl, .txt, .md, .csv
    path:string*
  • query_documents — Query indexed documents using RAG
    query:string*, k:number
  • remove_document — Remove a specific document from the index by file path
    path:string*
  • remove_all_documents — Remove all documents from the index
    confirm:boolean*
  • list_documents — List all document paths in the index
    (no parameters)

Overview

What is mcp-rag-server?

mcp-rag-server is a Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG). It indexes local documents and serves relevant context to Large Language Models, integrating with MCP-compatible clients.

How to use mcp-rag-server?

Install globally (npm install -g mcp-rag-server) or run via npx. Set environment variables (BASE_LLM_API, EMBEDDING_MODEL, VECTOR_STORE_PATH, CHUNK_SIZE) then start the server. Use MCP tools like embedding_documents and query_documents to index and retrieve content. An example MCP client configuration is provided in the README.

Key features of mcp-rag-server

  • Index documents in .txt, .md, .json, .jsonl, and .csv formats
  • Customizable chunk size for text splitting
  • Local vector store powered by SQLite via LangChain’s LibSQLVectorStore
  • Supports multiple embedding providers (OpenAI, Ollama, Granite, Nomic)
  • Exposes MCP tools and resources over stdio for seamless integration

Use cases of mcp-rag-server

  • Build a RAG pipeline for local document corpora
  • Provide LLMs with context from private or offline files
  • Index and query large collections of markdown or code documentation
  • Enable question-answering systems over custom datasets

Frequently asked questions

1 Which embedding providers are supported?

The server supports OpenAI, Ollama, Granite, and Nomic. Ollama with the nomic-embed-text model is recommended for best performance.

2 What file formats can be indexed?

It supports .txt, .md, .json, .jsonl, and .csv files.

3 How does the server store vectors?

Vectors are stored locally in a SQLite database via LangChain’s LibSQLVectorStore. The path is configured with the VECTOR_STORE_PATH environment variable.

4 What configuration variables are required?

Key variables are BASE_LLM_API, EMBEDDING_MODEL, VECTOR_STORE_PATH, and CHUNK_SIZE. An optional LLM_API_KEY can be set for providers that require it.

5 How do I run the server?

Install globally (npm install -g mcp-rag-server) and run mcp-rag-server, or use npx mcp-rag-server. Ensure all required environment variables are set before starting.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬