verse-rag
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Overview
verse-rag is a production-ready Model Context Protocol (MCP) server that gives AI coding assistants the ability to crawl, index, and semantically search documentation — entirely on local infrastructure.
Originally forked from coleam00/mcp-crawl4ai-rag, this fork is a ground-up rewrite of the storage and embedding layers:
Upstream | This fork |
OpenAI embeddings | Ollama ( |
Supabase cloud | Self-hosted pgvector + PostgREST |
| Direct |
Blocking embed + store | Fire-and-forget background tasks |
The result is a stack that runs entirely offline with no external API calls, no cloud dependencies, and no API costs.
Related MCP server: quarry
Architecture
Claude Code / AI Client
│ SSE (port 8051)
▼
┌─────────────┐
│ MCP Server │ crawl4ai_mcp.py — FastMCP + Crawl4AI
└──────┬──────┘
│ httpx
▼
┌──────────────┐ ┌─────────────────┐
│ PostgREST │──────▶│ PostgreSQL 16 │
│ (REST API) │ │ + pgvector │
└──────────────┘ └─────────────────┘
│
│ /api/embed
▼
┌─────────────┐
│ Ollama │ qwen3-embedding:8b (4096 dims)
└─────────────┘Services (Docker Compose):
Container | Image | Role |
|
| Vector store |
|
| REST API over PostgreSQL |
|
| MCP server |
Ollama runs as a separate service on the host (or in another container) — this stack connects to it over the ollama Docker network.
MCP Tools
Tool | Description |
| Crawl one URL and queue it for indexing |
| Recursively crawl a site, following internal links |
| Shortcut to crawl the official Verse/UEFN documentation |
| Semantic (or hybrid) search with optional source filtering |
| List all indexed sources in the database |
All crawl tools return immediately — embedding and storage run in background tasks so the MCP call never blocks waiting for Ollama.
Prerequisites
Docker and Docker Compose
Ollama running with
qwen3-embedding:8bpulled:ollama pull qwen3-embedding:8bThree external Docker networks:
mcps,nginx,ollamadocker network create mcps docker network create nginx docker network create ollama
Quick Start
1. Clone
git clone https://github.com/berry-13/verse-rag.git
cd verse-rag2. Build the MCP image
docker build -f docker/Dockerfile -t verse-rag:latest .3. Start the stack
docker compose -f docker/compose.yml up -dThis starts:
PostgreSQL with pgvector (
verse-rag-db)PostgREST auto-REST layer (
verse-rag-postgrest)The MCP server on port
8051(verse-rag-mcp)
4. Connect your MCP client
Claude Code:
claude mcp add-json verse-rag '{"type":"sse","url":"http://localhost:8051/sse"}' --scope userAny SSE-compatible client:
{
"mcpServers": {
"verse-rag": {
"transport": "sse",
"url": "http://localhost:8051/sse"
}
}
}Configuration
All configuration is via environment variables. The defaults in docker/compose.yml are ready to use for a standard local setup.
Variable | Default | Description |
|
| Ollama endpoint |
|
| Ollama embedding model |
|
| PostgREST endpoint |
| (JWT in compose.yml) | PostgREST JWT token |
|
| Combine vector + full-text search |
|
| Cross-encoder reranking of results |
|
| MCP server bind address |
|
| MCP server port |
|
| MCP transport ( |
|
| Maximum recursive crawl depth |
|
| Parallel crawl workers |
RAG Strategies
Hybrid Search (USE_HYBRID_SEARCH=true)
Combines pgvector cosine similarity with PostgreSQL full-text search (tsvector). Results are scored as a weighted combination (0.7 vector + 0.3 text) using a FULL OUTER JOIN in the hybrid_search_crawled_pages SQL function.
Best for technical documentation where exact term matches (function names, keywords) matter alongside semantic similarity.
Reranking (USE_RERANKING=true)
After initial retrieval, applies a cross-encoder model (cross-encoder/ms-marco-MiniLM-L-6-v2) to re-score and reorder results against the original query. Runs locally on CPU with no API cost. Adds ~100–200 ms to query latency in exchange for meaningfully better result ordering.
Database Schema
The init.sql creates:
crawled_pages— main table withvector(4096)embeddings (matched toqwen3-embedding:8b), source labelling, and aUNIQUE(url, chunk_number)constraint for idempotent upsertsmatch_crawled_pages()— vector similarity search functionhybrid_search_crawled_pages()— combined vector + full-text search functionGIN index on
contentfor full-text searchB-tree index on
source_idfor source filtering
Note:
ivfflat/hnswindexes are limited to 2000 dimensions. At 4096 dims, queries use a sequential scan — acceptable for documentation-scale datasets.
Performance Notes
Batch embedding: all chunks from a page are embedded in a single
/api/embedcall to OllamaBatch upsert: all records are written in a single
POSTto PostgREST withPrefer: resolution=merge-duplicatesSemaphore: embedding requests are serialized through
asyncio.Semaphore(1)since Ollama processes one embedding job at a timeFire-and-forget: crawl tools return immediately; background
asyncio.Taskhandles embedding + storage. Monitor progress with:docker logs verse-rag-mcp -f
Development
Rebuild after code changes
Only the last Docker layer (COPY src/) is invalidated on source changes, so rebuilds are fast:
docker build -f docker/Dockerfile -t verse-rag:latest . && \
docker compose -f docker/compose.yml up -d mcpProject structure
verse-rag/
├── src/
│ ├── crawl4ai_mcp.py # MCP server, tool definitions, lifespan
│ └── utils.py # Embeddings, chunking, PostgREST client
├── docker/
│ ├── Dockerfile # Build definition
│ ├── compose.yml # Full stack definition
│ └── init.sql # PostgreSQL schema + functions
├── knowledge_graphs/ # Optional Neo4j hallucination detection
└── pyproject.tomlTroubleshooting
CUDA unavailable / Ollama SIGABRT
The GPU may be in Exclusive_Process mode. Reset it:
sudo nvidia-smi -c 0This resets on reboot and must be re-applied after driver reloads.
MCP tools hang after container restart
Claude Code caches SSE session IDs. After restarting the MCP container, restart Claude Code to clear the stale session before using any tools.
Embeddings failing silently
Check background task output:
docker logs verse-rag-mcp -f | grep -E "✅|❌"License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Private, multimodal knowledge store for agents: hybrid search with cited, provenance-backed results.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to semantically search through indexed documentation websites and local code repositories using OpenAI embeddings and ChromaDB vector storage.-
- AlicenseAqualityAmaintenanceEnables local semantic search over documents and code for Claude Code and Claude Desktop, running entirely offline with local embeddings and vector storage.14426 PyPI7MIT
- AlicenseNot gradedqualityDmaintenanceProvides local technical documentation with hybrid search (semantic + BM25) for AI agents, ensuring access to up-to-date framework docs.MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to perform private, local hybrid keyword and vector search over a bootstrapped or crawled corpus, retrieve expanded chunks and pages, and see honest coverage gaps without network access on the read path.Apache 2.0