mcp-rag-server
by kwanLeeFrmVi
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.
Last updated: N/A
What is mcp-rag-server?
mcp-rag-server is a server that allows you to seamlessly integrate RAG functionalities into your applications. It indexes documents, generates vector embeddings, and matches query embeddings with stored document chunks to retrieve context for downstream LLMs.
How to use mcp-rag-server?
- Install the package using
npm install -g mcp-rag-server
. 2. Set the required environment variables such asBASE_LLM_API
andEMBEDDING_MODEL
. 3. Start the server usingmcp-rag-server
. 4. Integrate the server with your MCP client by adding the server configuration to your client's configuration file.
Key features of mcp-rag-server
Document indexing for various file formats (TXT, MD, JSON, CSV)
Customizable chunk sizes for document processing
Support for multiple embedding providers (Ollama, OpenAI, etc.)
Local vector store for efficient retrieval
MCP protocol integration for seamless AI agent usage
Use cases of mcp-rag-server
Answering questions based on document content
Providing contextually relevant responses from LLMs
Integrating RAG functionalities into applications
Enriching conversational interfaces with document-based knowledge
FAQ from mcp-rag-server
What file types are supported for document indexing?
What file types are supported for document indexing?
The server supports .json, .jsonl, .txt, .md, and .csv file types.
How do I configure the embedding model?
How do I configure the embedding model?
Set the EMBEDDING_MODEL
environment variable to the desired model name and ensure the BASE_LLM_API
points to the correct endpoint.
Where are the vector embeddings stored?
Where are the vector embeddings stored?
The embeddings are stored in a local vector database at the path specified by the VECTOR_STORE_PATH
environment variable (default is ./vector_store
).
How can I remove documents from the index?
How can I remove documents from the index?
Use the remove_document
tool, providing the path to the document you want to remove, or use the remove_all_documents
tool to clear the entire index (requires confirmation).
What is the default chunk size for document processing?
What is the default chunk size for document processing?
The default chunk size is 500 characters, but you can configure it using the CHUNK_SIZE
environment variable.