
Deeprepo
io.github.abhishek2432001Published by GitHub account abhishek2432001v1.0.0Updated Oct 24, 2026
Productivity-boosting RAG engine for codebases with multi-provider AI support and semantic search.
Overview
Local RAG engine that indexes a codebase so an AI assistant can look up symbols, explain files, assess change impact and answer code questions.
- What you can do
- Index a repository directory, building a code graph, embeddings and a generated wiki in a local SQLite file, with incremental re-ingestion of changed files only. Look up where a class or function is defined and list a file's structure or API. Explain what a file does and assess what breaks if it is changed. Answer open-ended questions about the codebase and give a project overview, with source file paths returned.
- When to use it
- Useful when an assistant works on a local codebase and you want cheaper, more targeted context than reading raw files, especially for symbol lookup, file explanations and change-impact checks before editing. It suits Cursor, Claude Desktop or other MCP clients on a desktop machine.
- Requirements
- Runs as a local Python process installed from the deeprepo package with the mcp extra; desktop only. Needs an AI provider: Ollama running locally (recommended, free) or a cloud provider configured through LLM_PROVIDER and EMBEDDING_PROVIDER, with keys such as OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY or HUGGINGFACE_API_KEY/HF_TOKEN. The codebase must be ingested first.
Installation
In SourceWeft
- Open Deeprepo in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
DeepRepo — Local RAG Engine for Codebases
A production-grade Python library for performing RAG (Retrieval Augmented Generation) on local codebases. No heavy frameworks, no external vector DBs, no cloud required.
What It Does
DeepRepo ingests a codebase and builds three things simultaneously:
A smart query router classifies every question and picks the cheapest context strategy, reducing LLM token usage by 5–50x compared to naive RAG.
Features
- Zero dependencies on heavy frameworks — pure Python, SQLite-backed
- Multiple AI providers — Ollama (free/local), OpenAI, Anthropic, Gemini, HuggingFace
- CLI-first —
deeprepo ingest ./deeprepo serve/deeprepo query "…" - Wiki viewer — browsable, searchable HTML wiki with in-page chat (
deeprepo serve) - 7 focused MCP tools — drop DeepRepo into Cursor / Claude Desktop as an MCP server
- Branch isolation — per-branch SQLite databases with copy-on-write from base branches
- 3-tier retrieval — Embeddings → FTS → Graph fallback for resilient search
- Incremental ingestion — unchanged files are skipped; only deltas re-processed
Quick Start
1. Install
For MCP server support:
2. Install Ollama (free, local — recommended)
3. Ingest your codebase
4. Browse the wiki
5. Ask questions
CLI Reference
Common flags (all commands)
ingest flags
serve flags
Examples
Python API
query() return shape
Supported AI Providers
Note: Anthropic has no embeddings API. Pair it with another provider:
Architecture
Storage
Everything lives in a single SQLite file per branch — no Redis, no Postgres, no Chroma.
Design Patterns
- Facade —
DeepRepoClientis the single entry point; internals are hidden - Strategy —
LLMProvider/EmbeddingProviderabstract interfaces; providers are swappable - Registry —
@register_llm("ollama")decorator auto-registers providers at import time - Bottom-up synthesis — wiki pages generated leaves-first; parent pages consume child summaries
- 3-tier fallback — Embeddings → FTS → Graph; queries work even when embeddings are cold
- Copy-on-write branching — feature branches start from base-branch cache, then delta-update
MCP Server (AI Assistant Integration)
Connect DeepRepo as an MCP server so Cursor, Claude Desktop, or any MCP-compatible AI assistant can call it directly — without ever reading raw files.
Setup
Cursor — create ~/.cursor/mcp.json:
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Available MCP Tools (7 tools)
Token Reduction vs Naive RAG
CLAUDE.md tip
Add this to your project's CLAUDE.md so Claude automatically uses DeepRepo:
Configuration
Environment Variables
Testing
The test_deeprepo_flow.py script tests all 7 sections end-to-end:
- Client initialisation & branch flags
- Ingest (graph + embeddings + wiki)
- WikiEngine — page generation, caching, repo overview
- Graph API — skeleton, blast-radius, symbol lookup
- RAG / Router — intent classification, query execution
- CLI commands — all subcommands + help
- Branch isolation flag combinations
Adding a New Provider
- Create
src/deeprepo/providers/myprovider.py - Implement
EmbeddingProviderand/orLLMProviderinterfaces - Decorate with
@register_embedding("myprovider")/@register_llm("myprovider") - Auto-discovered at import time — no other changes needed
Documentation
- DEVELOPER_WORKFLOW_GUIDE.md — daily dev workflows and automation recipes
- deeprepo_core/README.md — package README (PyPI)
- docs/high-level-design.excalidraw — process flow diagram
- docs/class-interaction-design.excalidraw — class diagram
License
MIT License — see LICENSE file for details.
Built for developers who want full control over their RAG pipelines.
Source: README.md at commit 1dcac5d
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts