Mcp Rag Assistant — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Rag Assistant (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Privacy-first document intelligence: all models run locally via Ollama — no data leaves your machine.
Model Context Protocol (MCP) is an open standard (by Anthropic) that defines how AI models discover and invoke tools at runtime. Think of it as a "USB-C port for AI" — any MCP-compatible client (Claude Desktop, your own agent, etc.) can connect to any MCP server and immediately use its tools.
| Dimension | Advanced RAG | MCP |
|---|---|---|
| Purpose | Improve retrieval accuracy | Standardise tool/capability exposure |
| Core idea | Better chunking, re-ranking, hybrid search | JSON-RPC tool registry with discovery |
| What the LLM gets | Retrieved context injected into prompt | A menu of callable functions with schemas |
| Execution | Single pipeline (query → retrieve → generate) | Multi-step agent loop (plan → pick tool → call → observe → repeat) |
| Tools | Retrieval only | Any function: retrieval, APIs, databases, code |
| State | Stateless per query | Stateful agent sessions possible |
| This project | RAG is one tool inside the MCP server | MCP wraps 8 RAG tools, discoverable at runtime |
In short: Advanced RAG makes retrieval smarter. MCP makes the entire AI system composable and interoperable.
mcp_rag_assistant/
├── config.py ← Central config (LLM, embed, chunking, server)
├── rag_engine.py ← LlamaIndex: load docs → build index → query engine
├── main.py ← CLI entrypoint (serve / index / query / demo)
├── mcp_client.py ← Example client that calls server tools
│
├── mcp_server/
│ └── server.py ← HTTP JSON-RPC server exposing all tools
│
├── tools/
│ └── rag_tools.py ← 8 MCP tool implementations
│
├── utils/
│ └── logger.py ← Structured logging
│
├── my_data/ ← ⬅ DROP YOUR FILES HERE (PDF, DOCX, XLSX, CSV)
├── storage/ ← ChromaDB persistence (auto-created)
├── logs/ ← Log files (auto-created)
│
├── requirements.txt
├── .env.example
├── .gitignore
└── README.mdUser Query
│
▼
MCP Client (mcp_client.py or Claude Desktop or your agent)
│ JSON-RPC POST /mcp {"method": "tools/call", "params": {...}}
▼
MCP Server (mcp_server/server.py)
│ dispatches to matching tool function
▼
Tool Function (tools/rag_tools.py)
│ calls get_query_engine().query(...)
▼
LlamaIndex Query Engine (rag_engine.py)
│ embeds query with qwen3-embedding:0.6b via Ollama
▼
ChromaDB Vector Store
│ returns top-K similar chunks
▼
Ollama LLM (llama3 or mistral)
│ synthesises answer from retrieved context
▼
JSON response back through MCP → Client| Tool | Description |
|---|---|
query_documents | General Q&A over all indexed documents |
list_indexed_files | Show files in my_data/ |
rebuild_index | Re-index after adding/removing files |
summarize_document | Summarise a specific file by name |
analyze_data | Plain-English data analysis (CSV/XLSX) |
generate_report | Generate summary / detailed / executive report |
compare_documents | Compare two documents on a given aspect |
extract_entities | Extract people, orgs, dates, numbers |
llama3:latestmistral:latestqwen3-embedding:0.6b# 1. Clone / unzip the project
cd mcp_rag_assistant
# 2. Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure (optional — defaults work out of the box)
cp .env.example .env
# Edit .env to change models, ports, chunk sizes etc.
# 5. Add your documents
# Copy PDFs, DOCX, XLSX, CSV files into:
# my_data/
# 6. Build the index
python main.py index
# 7. Start the MCP server
python main.py servepython main.py serve
# MCP server listening on http://0.0.0.0:8080python main.py query "What are the key findings in the Q1 report?"# In a second terminal:
python main.py demopython main.py index
# or via MCP tool:
# call rebuild_index tool from any clientGET http://localhost:8080/health
GET http://localhost:8080/toolsEdit config.py or your .env:
# Use mistral instead of llama3
LLM_MODEL=mistral:latest
# Use nomic-embed-text for embeddings
EMBED_MODEL=nomic-embed-text:latestIn config.py or .env:
| Setting | Default | Notes | ||
|---|---|---|---|---|
CHUNK_SIZE | 256 | Tokens per chunk. Smaller = more precise retrieval | ||
CHUNK_OVERLAP | 25 | Overlap between chunks. Helps preserve context at boundaries | ||
SIMILARITY_TOP_K | 5 | Chunks retrieved per query | ||
RESPONSE_MODE | compact | compact \ | tree_summarize \ | refine |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.