RAG-MCP Server
A general-purpose Retrieval-Augmented Generation (RAG) server using the Model Control Protocol (MCP), designed to be tested with RISC Zero’s Bonsai documentation.
Overview
This project implements a RAG server that:
- Uses MCP (Model Control Protocol) for standardized communication
- Implements RAG (Retrieval-Augmented Generation) workflow for document querying
- Can be tested with RISC Zero’s Bonsai documentation
- Supports local LLM integration through Ollama
Features
- Document ingestion and indexing
- Semantic search capabilities
- Local LLM integration
- MCP protocol compliance
- RISC Zero Bonsai documentation support
Prerequisites
- Python 3.12+
- Ollama (for local LLM support)
- Poetry (for dependency management)
Installation
- Install Python dependencies:
poetry install
- Install and start Ollama:
# Install Ollama
brew install ollama # for macOS
# or
curl -fsSL https://ollama.com/install.sh | sh # for Linux
# Start Ollama service
ollama serve
- Pull the required model:
ollama pull llama2
Usage
- Start the MCP server:
poetry run python mcp_server.py
The server will:
- Initialize the LLM and embedding model
- Ingest documents from the data directory
- Process queries using the RAG workflow
Test with RISC Zero Bonsai docs:
- Place RISC Zero Bonsai documentation in the
data/
directory - Query the server about Bonsai features and implementation
- Place RISC Zero Bonsai documentation in the
Project Structure
mcp_server.py
: Main server implementationrag.py
: RAG workflow implementationdata/
: Directory for document ingestionstorage/
: Vector store and document storagestart_ollama.sh
: Script to start Ollama service
Testing with RISC Zero Bonsai
The server is configured to work with RISC Zero’s Bonsai documentation. You can:
- Add Bonsai documentation to the
data/
directory - Query about Bonsai features, implementation details, and usage
- Test the RAG workflow with Bonsai-specific questions
Made with
by proofofsid
RAG MCP server
Project Details
- proofofsid/rag-mcp
- Last Updated: 4/5/2025
Recomended MCP Servers
A Model Context Protocol (MCP) server for cryptocurrency trading that provides a unified interface for trading and market...
A bridge between Unity and AI assistants using the Model Context Protocol (MCP)
An MCP server that integrates with the MCP protocol. https://modelcontextprotocol.io/introduction
Playwright MCP server
MCP server helping models to understand your Vite/Nuxt app better.
MCP Memory Server with PostgreSQL and pgvector for long-term memory capabilities