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
Config files for my GitHub profile.
AWS DynamoDB Read-Only MCP Server
Last9 MCP Server
This project demonstrates how to use Cloudflare Browser Rendering to extract web content for LLM context. It includes...
webhook forwarder and inspector by manus
Высокопроизводительный API wrapper для Питона для быстрого массового обмена данными с Битрикс24 через REST API
MCP Server to interact with Kanka Campaign