CoreRag
Exports documents as markdown with LLM-generated tags and summaries to the Obsidian vault, enabling seamless knowledge management within Obsidian.
Uses Ollama with local models (e.g., qwen3:32b) for document analysis, tagging, summarization, and quality assessment, ensuring privacy through local LLM processing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CoreRagsearch for recent articles about quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CoreRag

A local-first, privacy-preserving knowledge engine with semantic search, exposed via MCP (Claude Desktop) and REST API. Optimized for Apple Silicon.
Features
Search
Hybrid Search: Vector (BAAI/bge-m3, 1024d) + BM25 full-text with RRF fusion
Cross-Encoder Reranking: ms-marco-MiniLM-L-6-v2
HyDE Expansion: Hypothetical document embeddings for better recall
Multi-Query Fusion: Parallel query variants merged via RRF
Time-Decay Scoring: Recent documents weighted higher
Collection Tags: Filter searches by tagged document groups
Ingestion Pipeline
Inbox Workflow: Drop files, auto-process via watchdog or dashboard batch
Human-in-the-Loop: Web dashboard with skip/error management, quality report banner, per-detection redaction editor
Dual RAG Databases: Main (redacted for cloud-safe search) + Restricted (unredacted for local-only access)
Document Catalog: SQLite catalog tracking every file across all destinations (RAG, Obsidian, archive)
Three-Layer PII Detection: Presidio NER + custom dictionary + LLM advisory, with per-detection Keep/Redact toggles
Smart Filing: Archive to
~/Documents/PKM/, export markdown with LLM tags + summaries to Obsidian vaultPer-Agent Access Control: Settings tab with per-action permission toggles per agent, API key management
Archive Manager: Browse, search, filter cataloged documents; cold storage migration with folder structure replication
Parent-Child Chunking: Context-preserving hierarchical chunks with quality scoring
Corrective RAG: Post-retrieval relevance filtering (correct/ambiguous/incorrect)
Multi-Format Support
Documents: PDF (with OCR fallback), DOCX, TXT, Markdown, JSON, YAML, CSV
Spreadsheets: XLSX, XLS, XLSM (markdown table output per sheet)
Code: Python, JavaScript, TypeScript, JSX, TSX, Go, Rust, Java, Ruby (AST + line-based chunking)
Images: PNG, JPG, WebP, HEIC (Vision.framework OCR + VLM captioning)
Audio: MP3, WAV, M4A (mlx-whisper transcription + topic segmentation)
Video: MP4, MOV (keyframe extraction + scene detection + audio)
Quality Assurance
LLM-Powered Tagging: Purpose-driven collection tags (replaces keyword auto-tagger), year as tag
Duplicate Detection: Content hash + MinHash/LSH + semantic similarity
Link Checker: Async URL validation with caching
Freshness Indicators: Age classification + staleness warnings
Conflict Detection: Find contradictions across documents
Advanced
GraphRAG: Bitemporal knowledge graph with confidence decay
Episodic Memory: User context and search pattern tracking
Rate-Limited REST API: Authenticated v1 endpoints with slowapi
MCP Server: Full tool suite for Claude Desktop integration
Memory Safety: Auto-pause at high RAM usage, GC between files
Security Hardening: CSRF protection, XSS escaping, PII redaction fail-safe, asyncio.to_thread for blocking I/O, LanceDB connection caching, thread-safe embedding singleton, OrderedDict LRU cache
Related MCP server: Claude RAG MCP Pipeline
Quick Start
# Clone and setup
git clone https://github.com/TJ-Neary/CoreRag.git
cd CoreRag
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -m spacy download en_core_web_lg
# Copy and configure environment
cp .env.example .env
# Edit .env with your paths
# Install menu bar app (auto-starts server at login)
./scripts/install_menubar.sh
# Or start manually
./scripts/run_system.shSee StartHere.md for detailed setup instructions.
Usage
CLI
python -m src.cli.main status # System status
python -m src.cli.main search "your query" # Search knowledge base
python -m src.cli.main ingest /path/to/folder -r -t mytag # Ingest with tags
python -m src.cli.main health # System health checks
python -m src.cli.main check-links /path # Find broken links
python -m src.cli.main duplicates /path # Find duplicates
python -m src.cli.main stale /path --days 365 # Find stale content
python -m src.cli.main tag /path # Auto-tag files
python -m src.cli.main pii list # Manage PII dictionary
python -m src.cli.main optimize-db # Optimize LanceDB
python -m src.cli.main backup create # Create backup
python -m src.cli.main graph stats # Knowledge graph stats
python -m src.cli.main memory list # Episodic memoryREST API (v1)
# Capability manifest (no auth required)
curl http://localhost:8000/api/v1/manifest
# Search (with optional tag filtering)
curl -X POST http://localhost:8000/api/v1/search \
-H "Content-Type: application/json" \
-H "X-API-Key: $CORERAG_API_KEY" \
-d '{"query": "authentication setup", "k": 5, "tags": ["sphr-study"]}'
# Ingest content
curl -X POST http://localhost:8000/api/v1/ingest \
-H "Content-Type: application/json" \
-H "X-API-Key: $CORERAG_API_KEY" \
-d '{"content": "...", "source": "my-app", "metadata": {}}'
# Stats and deletion
curl -H "X-API-Key: $CORERAG_API_KEY" http://localhost:8000/api/v1/stats
curl -X DELETE -H "X-API-Key: $CORERAG_API_KEY" http://localhost:8000/api/v1/documents/{id}MCP (Claude Desktop)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"corerag": {
"command": "/path/to/CoreRag/venv/bin/python",
"args": ["-m", "src.mcp_server.server"],
"cwd": "/path/to/CoreRag"
}
}
}Dashboard
python -m src.server # http://localhost:8000Web UI for reviewing AI-proposed metadata, editing tags, marking sensitivity, and committing documents through the pipeline.
Configuration
Create .env from the example:
cp .env.example .envKey variables:
Variable | Default | Purpose |
|
| Watched folder for new documents |
|
| Obsidian vault for markdown exports |
|
| Long-term storage for originals |
|
| LanceDB vector database |
| (unset) | API key for v1 endpoints (omit for open access) |
|
| Local LLM for document analysis |
|
| Embedding model (1024d) |
Technology Stack
Component | Technology |
Vector Database | LanceDB (embedded, Lance format) |
Embeddings | BAAI/bge-m3 (1024d, MPS-optimized) |
Reranker | cross-encoder/ms-marco-MiniLM-L-6-v2 |
LLM | Ollama (qwen3:32b, local) |
Audio | mlx-whisper (Apple Silicon) |
Video | OpenCV (keyframe + scene detection) |
OCR | Vision.framework (native macOS) |
VLM | LLaVA (optional image captioning) |
PII | Presidio + spaCy + custom dictionary |
MCP | FastMCP (stdio transport) |
Web | FastAPI + Jinja2 |
Rate Limiting | slowapi |
Testing
pytest # Full suite with coverage
pytest -m "not slow" # Skip slow tests
pytest -m "not integration" # Skip integration tests
pytest -k "test_name" # Single testDevelopment
black src/ tests/ --line-length 100 # Format
ruff check src/ tests/ # Lint
mypy src/ # Type check
./scripts/security_scan.sh --staged # Security scan before commitSee CONVENTIONS.md for coding standards and CLAUDE.md for AI agent instructions.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Connect Claude, Cursor, or ChatGPT to your business data. Ask questions, get answers.
Search your knowledge bases from any AI assistant using hybrid RAG.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceTurns Claude Desktop into a personal document question-answering system using local vector search. Index PDF, TXT, and Markdown documents into collections and get answers based strictly on your documents with zero hallucination.6 npm-
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to search and query personal document collections (PDF, Word, Markdown, text) using semantic search and conversational AI with full context preservation across exchanges.MIT
- AlicenseAqualityAmaintenanceEnables local semantic search over documents and code for Claude Code and Claude Desktop, running entirely offline with local embeddings and vector storage.1282 PyPI3MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying enterprise documents (DOCX, PDF, PPTX) using natural language, with hybrid search and MCP integration for Claude Desktop and other agents.MIT