Answer
Bottom line
There is no perfect clone; there is a clear best stack.
The closest OSS/self-hosted replacement for Devin's DeepWiki is OpenDeepWiki. If the job is a private repo wiki with diagrams and MCP, start there. If the job is broader codebase intelligence, the stronger answer is a stack: OpenDeepWiki or Kodit for generated docs, Sourcebot for shared search/navigation/Q&A/MCP, and Serena or Narsil for local agent code intelligence.
Baseline
What Devin DeepWiki is actually doing
| Capability | Devin / DeepWiki baseline | Replacement implication |
|---|---|---|
| Repository indexing | Indexing enables Ask Devin and DeepWiki and is separate from Devin's dev-environment setup. | A replacement needs a durable repo index, not just one prompt with repo text. |
| Generated wiki | DeepWiki produces architecture diagrams, docs, source links, and codebase summaries. | A plain semantic-search MCP server is not enough. |
| Q&A | Ask Devin uses DeepWiki plus advanced code search for cited answers. | The search/Q&A layer and generated docs layer can be separate tools. |
| Public repo MCP | Public DeepWiki MCP exposes read_wiki_structure, read_wiki_contents, and ask_question for public repos. | A self-hosted private-repo replacement should expose MCP, not only a web UI. |
| Steering | .devin/wiki.json can steer docs with notes and explicit page plans. | The best replacements need explicit page planning or repeatable prompt/config control. |
| Limits | Standard DeepWiki steering supports 30 explicit pages; enterprise supports 80. | Large repos need intentional page selection and coverage validation. |
Shortlist
Best candidates by fit score
| Rank | Tool | Fit score | Use it for | Why it ranks here | Main catch |
|---|---|---|---|---|---|
| 1 | OpenDeepWiki | 82 / 100 | Self-hosted DeepWiki-like generated wiki plus MCP | Best single-package clone shape: generated docs, diagrams, multi-code-host ingest, local/ZIP support, database options, user management, and MCP. | Smaller ecosystem than deepwiki-open; .NET/Semantic Kernel stack; quality still depends on LLM prompts/models. |
| 2 | Sourcebot | 80 / 100 | Shared code search, Ask-style Q&A, code navigation, MCP context | Best lightweight product for ask/search every repo with citations and agent MCP access. | Fair-source, not OSI OSS; no durable generated wiki; permission syncing and OAuth MCP are Enterprise-gated. |
| 3 | Kodit | 78 / 100 | OSS MCP/REST code and document intelligence server | Apache-2.0, no-key startup, built-in embeddings, SQLite default, BM25 + semantic + grep + visual document search, wiki/enrichment MCP tools. | Young project with lower adoption; generated docs require LLM enrichment configuration. |
| 4 | SourceBridge | 76 / 100 | Ambitious field-guide/context layer pilot | Conceptually closest to better-than-DeepWiki: field guides, code tours, diagrams, requirements traceability, MCP, GraphQL, CLI, VS Code. | Very young by public repo signals; treat as a pilot, not the default platform. |
| 5 | deepwiki-open | 70 / 100 | Popular OSS DeepWiki-style web app | Strong adoption, private repo token support, diagrams, RAG Ask, DeepResearch, local Ollama support. | No obvious MCP in the README; less useful as an agent context service unless wrapped. |
| 6 | CodeWiki | 68 / 100 | Static repo documentation generation | Research-backed structured docs with Mermaid architecture/data-flow/dependency/sequence diagrams and GitHub Pages output. | More CLI/static-docs than always-on shared code intelligence. |
| 7 | Serena | 64 / 100 | Local MCP navigation and editing | Excellent agent-side symbol retrieval/editing through LSP across 40+ languages. | Not a wiki generator or shared web knowledge base. |
| 8 | Narsil MCP | 62 / 100 | Local MCP code intelligence and security context | 90 tools, 32 languages, call graphs, taint analysis, SBOM, license checks, optional neural search. | Young; high tool count needs careful client/tool budgeting; not reader-facing wiki output. |
Matrix
Feature comparison
| Tool | License posture | Self-host | Generated wiki/docs | Diagrams | MCP | Search/Q&A | Code nav/graph | Private repo story |
|---|---|---|---|---|---|---|---|---|
| OpenDeepWiki | MIT | Yes | Strong | Mermaid | Built in | Chat/Q&A | Basic graph/code analysis | Git hosts, ZIP/local upload |
| deepwiki-open | MIT | Yes | Strong | Mermaid | Not obvious | RAG Ask, DeepResearch | Light | GitHub/GitLab token support |
| CodeWiki | MIT in README | Local/self-host | Strong static docs | Mermaid plus visual artifacts | Docs linked | Not primary | Architecture-aware docs | Local repo |
| SourceBridge | AGPL-3.0 | Yes | Strong | Mermaid | Built in | Code discussion | Tree-sitter graph/impact | Any local/server repo |
| Sourcebot | Fair-source / FSL | Yes | No | No | Built in | Strong Ask with citations | Strong search/nav | Enterprise permission sync |
| Kodit | Apache-2.0 | Yes | Optional enrichment | Optional enrichment | Built in | Strong search, enrichment tools | Search/snippet layer | Any Git URL with PAT/SSH |
| Sourcegraph Enterprise | Commercial self-host | Yes, Enterprise | No | No | Built in | Strong Deep Search/Cody | Strongest mature nav/permissions | Enterprise permission sync |
| Onyx CE/EE | MIT CE, EE add-ons | Yes | Not code-wiki-specific | No | Built in | Strong workplace RAG | No real code navigation | GitHub connector focuses PRs/issues; permission sync EE/Cloud |
| Serena | MIT | Local | No | No | Built in | Retrieval/memory | Strong LSP symbolic editing | Local checkout |
| Narsil MCP | Apache-2.0 | Local | No | Graph/security reports | Built in | Hybrid/neural search | Call graphs/security/SBOM | Local repos, optional remote |
Architectures
Recommended stacks
| Need | Recommended stack | Why |
|---|---|---|
| One OSS/self-hosted DeepWiki clone | OpenDeepWiki | Best single-tool balance of wiki generation, diagrams, repository ingest, and MCP. |
| Best internal private codebase intelligence | Sourcebot + OpenDeepWiki | Sourcebot handles search/navigation/Q&A/MCP; OpenDeepWiki handles durable generated wiki pages. |
| Strict OSI OSS and agent MCP | Kodit + OpenDeepWiki + Serena | Avoids fair-source/commercial layers while covering wiki, MCP search, and local symbolic work. |
| Best experimental better-than-DeepWiki pilot | SourceBridge | Most ambitious field-guide/code-tour/requirements-traceability product shape, but high maturity risk. |
| Enterprise scale with budget | Sourcegraph Enterprise | Best mature code navigation, permissions, search, and MCP controls; not OSS. |
| Broader engineering knowledge base | Onyx + Sourcebot or Kodit | Onyx is strong for docs/tickets/Slack/Drive RAG, but should not be the sole source-code intelligence layer. |
| Per-developer local agent improvement | Serena + Narsil + Repomix | Gives coding agents symbol operations, search/security context, and portable repo packing. |
| AI agent planning or writing code | Sourcebot + Serena; Kodit + Serena + Repomix if strict OSS | Agents need precise file/symbol retrieval and editable local context first; generated wiki pages are useful background, not the primary tool surface. |
Agent audience
Best choices when the reader is Claude, Codex, Pi, or another coding agent
If the consumer is an AI agent planning or writing code, the ranking changes. Human-readable architecture pages help orientation, but an agent usually needs narrow, current, source-linked retrieval: file reads, grep, symbol definitions, references, call graphs, dependency context, and compact Markdown or MCP tool output it can cite in a plan.
| Agent job | Best pick | Why it helps an agent | Do not use as the only layer |
|---|---|---|---|
| Claude/Codex/Cursor-style local coding loop | Serena | LSP-backed symbol retrieval, references, memories, and editing tools map directly to how an agent plans and changes code in a checkout. | Generated wiki pages; they are too coarse for safe edits. |
| Shared multi-repo agent questions | Sourcebot | MCP tools for grep, file reads, tree/glob, commits, symbol definitions/references, model listing, and ask_codebase give agents live cited context across repositories. | A static wiki; it will drift and may miss the exact file path. |
| Strict OSS shared agent context | Kodit + Serena + Repomix | Kodit supplies permissive MCP/REST search and enrichment, Serena supplies local symbolic operations, and Repomix gives portable snapshots when the agent cannot call the live index. | Sourcebot if OSI licensing is mandatory. |
| Planning before a larger change | Sourcebot or Kodit + OpenDeepWiki | Use search/Q&A for current files and citations, then use generated wiki/docs for architecture hypotheses and subsystem maps. | OpenDeepWiki alone; planning needs exact file evidence. |
| Security, dependency, or impact analysis | Narsil MCP, then Serena | Narsil adds call graphs, taint analysis, SBOM, license, and dependency context; Serena can then inspect and edit the relevant symbols. | Plain semantic search; it misses graph and supply-chain structure. |
| Agent-readable onboarding for a new repo | OpenDeepWiki or CodeWiki + Sourcebot/Kodit | Generated docs are useful as a first-pass map, but the agent still needs live search and file access to verify every plan. | deepwiki-open unless wrapped with MCP or another file/symbol tool. |
Layers
What each layer does
| Layer | Best tools | What it contributes | What it does not solve |
|---|---|---|---|
| Generated wiki | OpenDeepWiki, deepwiki-open, CodeWiki, SourceBridge | Human-readable pages, diagrams, architecture overviews, onboarding docs. | Precise code navigation and live agent context by itself. |
| Shared code search/Q&A | Sourcebot, Sourcegraph, Kodit | Multi-repo search, citations, file reads, branch/ref awareness, MCP/API access. | Durable wiki pages unless enrichment is configured. |
| Agent-side code intelligence | Serena, Narsil, CodeGraphContext, Blarify | Symbol definitions/references, call graphs, impact analysis, local editing, security context. | Shared reader-facing product surface. |
| General knowledge RAG | Onyx | GitHub PRs/issues plus docs, tickets, Slack, Drive, Confluence-style knowledge and MCP. | Real source-code navigation or generated repo wiki. |
| Execution agent | OpenHands | Devin-like task execution foundation and self-hosted agent runtime. | Standing codebase wiki/search layer. |
Repo health
GitHub signals as of May 4, 2026
| Tool | Repo | Stars | Forks | Latest observed push | Public signal |
|---|---|---|---|---|---|
| deepwiki-open | AsyncFuncAI/deepwiki-open | 16,082 | 1,796 | 2026-04-21 | Very high adoption for wiki clone, but MCP gap. |
| OpenDeepWiki | AIDotNet/OpenDeepWiki | 3,147 | 412 | 2026-04-11 | Smaller but more complete single-tool feature shape. |
| CodeWiki | FSoft-AI4Code/CodeWiki | 928 | 148 | 2026-04-04 | Research-backed and focused on docs generation. |
| SourceBridge | sourcebridge-ai/sourcebridge | 10 | 1 | 2026-05-04 | Very young despite strong concept fit. |
| Sourcebot | sourcebot-dev/sourcebot | 3,319 | 264 | 2026-05-02 | Productized and current, but fair-source. |
| Kodit | helixml/kodit | 118 | 15 | 2026-05-01 | Early but technically well-shaped. |
| Serena | oraios/serena | 23,809 | 1,596 | 2026-05-04 | Strong local MCP adoption signal. |
| Narsil MCP | postrv/narsil-mcp | 144 | 19 | 2026-02-25 | Powerful but still early. |
| CodeGraphContext | CodeGraphContext/CodeGraphContext | 3,142 | 563 | 2026-05-03 | Popular graph-first MCP option, still young. |
| Repomix | yamadashy/repomix | 24,322 | 1,205 | 2026-05-04 | Excellent packing/snapshot utility, not a wiki. |
| OpenHands | OpenHands/OpenHands | 72,603 | 9,180 | 2026-05-04 | Best OSS execution-agent signal, not a standing code index. |
Picks
Best picks by job
| Job | Pick | Reason |
|---|---|---|
| Replace DeepWiki pages for private repos | OpenDeepWiki | Built-in wiki generation, diagrams, MCP, and self-hosting. |
| Ask questions across all company repos | Sourcebot | Best lightweight self-hosted Ask/search/navigation product with MCP. |
| Stay strictly OSS and avoid fair-source | OpenDeepWiki + Kodit | Covers generated docs plus MCP/REST code search with permissive licenses. |
| Give Claude/Codex/Cursor better local repo tools | Serena | LSP-backed symbol retrieval and editing is more precise than wiki text. |
| Give Claude, Codex, Pi, or a custom MCP client shared repo context | Sourcebot + Serena | Sourcebot handles shared search/Q&A/file/symbol context; Serena handles local symbol-aware edits. |
| Keep the agent stack strictly OSS | Kodit + Serena + Repomix | Permissive search/enrichment, local LSP operations, and portable context packing without a fair-source shared search layer. |
| Add security and supply-chain intelligence to agent context | Narsil MCP | Taint analysis, SBOM, license, dependency, and call-graph tools. |
| Generate static architecture docs for a repo | CodeWiki | Strong static-doc and visual artifact generator. |
| Build an internal codebase field guide product | SourceBridge pilot | Most aligned product vocabulary and feature ambition; maturity risk is the reason to pilot. |
| Enterprise search with serious ACLs | Sourcegraph Enterprise | Mature permissions and code-intelligence controls, but commercial. |
| Broader company knowledge, not just code | Onyx | Good RAG/MCP layer for docs and work systems; pair it with a code tool. |
Caveats
Where these tools can mislead you
- Self-hosted does not mean no external model calls. Many tools need OpenAI, Anthropic, Gemini, Voyage, OpenRouter, or another provider unless configured with Ollama/local embeddings.
- MCP support varies a lot. Some tools expose search and file reads; others expose generated wiki pages, graph traversal, or agentic Q&A.
- For agent audiences, generated wiki quality matters less than tool granularity. A coding agent will usually make better plans with exact file reads, references, call graphs, and snippets than with polished prose.
- GitHub star counts are adoption signals, not correctness. Kodit and SourceBridge are low-star but strategically interesting; deepwiki-open is popular but lacks obvious MCP.
- Generated wikis need coverage testing. Large repos can produce attractive but incomplete pages unless you steer page structure and verify missing subsystems.
- Permission sync is the hidden enterprise boundary. Sourcebot and Sourcegraph have the clearest stories; many OSS tools have no real multi-user ACL model.
- Onyx is better treated as a companion workplace knowledge layer than a codebase wiki replacement because its GitHub connector docs emphasize PRs and issues rather than source-code navigation.
Receipts
Claim table
| Where | Claim | Confidence | Source | Caveat |
|---|---|---|---|---|
| Baseline | Devin's repository indexing enables Ask Devin and DeepWiki and is separate from environment setup. | High | Devin Docs | Devin docs can change quickly. |
| Baseline | DeepWiki generates codebase wikis with architecture diagrams, source links, and summaries; Ask Devin uses DeepWiki plus code search. | High | Devin Docs | Product quality is not independently benchmarked here. |
| Baseline | DeepWiki MCP exposes public-repo wiki structure, wiki contents, and Q&A tools, while private repo use points to Devin. | High | Devin Docs | Public DeepWiki MCP is not a private self-hosted option. |
| Shortlist | OpenDeepWiki is the closest single OSS/self-hosted DeepWiki replacement because it combines generated docs, diagrams, repo ingest, and MCP. | High | AIDotNet | Maturity and generated-doc quality need a live pilot. |
| Shortlist | deepwiki-open has strong wiki generation and adoption but no obvious MCP support in its README. | Medium | AsyncFuncAI | MCP may exist outside the README or be added later. |
| Shortlist | Kodit exposes MCP/REST, BM25, semantic search, grep, visual document search, and optional wiki/enrichment tools. | High | HelixML | Adoption is still early. |
| Shortlist | Sourcebot is the best lightweight shared search/Q&A/MCP layer, but core licensing is fair-source and permission syncing is Enterprise-gated. | High | Sourcebot | Fair-source may be acceptable for self-hosting but is not OSI OSS. |
| Decision matrix | Sourcebot MCP includes grep, list/read file tools, tree/glob, commits, symbol definitions/references, model listing, and ask_codebase. | High | Sourcebot | OAuth and permission behavior depend on license and instance configuration. |
| Architectures | Sourcegraph Enterprise has the strongest mature MCP/code-intelligence and permission story, but is commercial. | High | Sourcegraph | Public Sourcegraph repo metrics are not representative because the main repo is no longer public in the same way. |
| Layers | Serena is best treated as local agent code intelligence, not a generated wiki. | High | Oraios | Some deeper refactors require the paid JetBrains backend. |
| Layers | Narsil MCP provides local code-intelligence/security tools across 32 languages, including call graphs, taint analysis, SBOM, and optional neural search. | High | postrv | Young project and high tool count may require MCP tool filtering. |
| Agent audience | For Claude, Codex, Pi, Cursor, or a custom MCP coding agent, Sourcebot plus Serena is the best default stack when fair-source licensing is acceptable. | Medium | Sourcebot | This is a fit judgment from the available MCP/search and local-symbol tool surfaces, not a benchmark. |
| Agent audience | Kodit plus Serena plus Repomix is the best strict-OSS agent-context stack among the surveyed tools. | Medium | HelixML | Repomix packing helps snapshot-based planning, but live edits still need file/symbol tools. |
| Agent audience | Generated wiki pages are useful agent background but should not be the only layer for agents that will plan or edit code. | High | Oraios | A high-quality wiki can still help orientation when paired with exact code retrieval. |
| Caveats | Onyx is strong for workplace RAG/MCP but not a source-code navigation replacement. | High | Onyx | Onyx can still ingest code-like documents through other paths. |
Sources
How this was built
| Publisher | Source | Type | Accessed |
|---|---|---|---|
| Devin Docs | Index a Repository | Official | 2026-05-04 |
| Devin Docs | DeepWiki | Official | 2026-05-04 |
| Devin Docs | Ask Devin | Official | 2026-05-04 |
| Devin Docs | DeepWiki MCP | Official | 2026-05-04 |
| AIDotNet | OpenDeepWiki | Official | 2026-05-04 |
| AsyncFuncAI | deepwiki-open | Official | 2026-05-04 |
| FSoft-AI4Code | CodeWiki | Official | 2026-05-04 |
| SourceBridge.ai | SourceBridge | Official | 2026-05-04 |
| Sourcebot | Sourcebot Overview | Official | 2026-05-04 |
| Sourcebot | Sourcebot MCP Server | Official | 2026-05-04 |
| Sourcebot | Sourcebot Permission Syncing | Official | 2026-05-04 |
| HelixML | Kodit README | Official | 2026-05-04 |
| Sourcegraph | Sourcegraph MCP Server | Official | 2026-05-04 |
| Sourcegraph | Sourcegraph Repository Permissions | Official | 2026-05-04 |
| Oraios | Serena | Official | 2026-05-04 |
| postrv | Narsil MCP | Official | 2026-05-04 |
| CodeGraphContext | CodeGraphContext | Official | 2026-05-04 |
| blarApp | Blarify | Official | 2026-05-04 |
| yamadashy | Repomix | Official | 2026-05-04 |
| Onyx | Onyx GitHub Connector | Official | 2026-05-04 |
| Onyx | Onyx MCP Server | Official | 2026-05-04 |
| OpenHands | OpenHands | Official | 2026-05-04 |