codelore-mcp
Uses git diff for incremental re-indexing, syncing only modified files after code changes.
Accepts GitHub repository URLs for cloning and ingestion, enabling analysis of remote codebases.
Generates an Obsidian vault with structured, linked markdown notes summarizing every file and directory in a codebase, enabling AI-powered navigation and exploration.
Click on "Install 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., "@codelore-mcphow does authentication work in this repo?"
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.
codelore
Turn any code repository into a searchable Obsidian vault — then let Claude Code navigate it as a set of MCP tools.
codelore runs a two-phase pipeline:
Summarise — calls
claude --printonce per file and directory to produce structured markdown documentationIndex — chunks every file at the function/class level, generates developer questions for each chunk, and stores them in a ChromaDB vector index
The result is an Obsidian vault of linked markdown notes and a semantic search index that Claude Code can query as native tools.
How it works
your-repo/
src/auth/middleware.py → AI summary + import graph
src/db/pool.py → AI summary + import graph
...
↓ codelore ingest
your-repo_vault/
INDEX.md overview + wikilinks to all modules
src/auth/middleware.md structured summary of every function
src/db/pool.md ...
your-repo_chroma/ ChromaDB: chunks indexed by developer questionsClaude Code reads INDEX.md → directory notes → file notes via the explore_repo tool, and answers "how does X work?" questions via search_code which hits the semantic index.
Related MCP server: obsidian-mcp
Prerequisites
Python 3.11+
Claude Code CLI — claude.ai/download
claude --version # must be on PATH
Install
pip install codeloreOr from source:
git clone https://github.com/yourname/codelore
pip install -e codeloreQuick start
# 1. Ingest a local repo (or pass a GitHub URL)
codelore ingest /path/to/your-repo
# Preview cost before running on a large repo
codelore ingest /path/to/your-repo --dry-run
# Re-use cached summaries from a previous run (skips claude calls)
codelore ingest /path/to/your-repo # prompted automatically if cache exists
# 2. Query from the terminal
codelore query "how does authentication work?" \
--chroma /path/to/your-repo_chroma
# 3. Print MCP setup instructions
codelore init --vault /path/to/your-repo_vault \
--chroma /path/to/your-repo_chroma \
--repo /path/to/your-repoCLI reference
codelore ingest <repo>
Flag | Description |
| Override vault output directory (default: |
| Load a pre-generated |
| Print file count and estimated Claude calls without running |
| Write structural vault (file tree + imports) without any Claude calls |
codelore query <question>
Flag | Description |
| ChromaDB directory (or set |
| Vault directory for summary snippets (or set |
| Number of results (default: 5) |
codelore init
Prints step-by-step setup instructions and a ready-to-paste MCP config block.
Flag | Description |
| Pre-fill vault path in the generated config |
| Pre-fill ChromaDB path in the generated config |
| Pre-fill repo root path in the generated config |
MCP server setup (Claude Code)
After ingesting, add codelore as an MCP server so Claude Code can call it as tools.
Add to .claude/settings.json (project) or ~/.claude/settings.json (global):
{
"mcpServers": {
"codelore": {
"command": "codelore-mcp",
"env": {
"CODELORE_VAULT_ROOT": "/path/to/your-repo_vault",
"CODELORE_CHROMA_PATH": "/path/to/your-repo_chroma",
"CODELORE_REPO_ROOT": "/path/to/your-repo"
}
}
}
}codelore init will generate this block with your actual paths filled in.
Available MCP tools
Tool | Triggers on |
| "how does X work?", "where is Y defined?" |
| "explain this codebase", "give me an overview" |
| "what's left to implement?", "show open tasks" |
| "show me the summary for src/auth" |
| architectural guidelines doc (optional) |
| "how many claude calls would this take?" |
| "ingest this repo" |
| rebuild vault from saved explanations |
| incremental re-index after code changes |
Supported languages
Language | Extensions | Chunking |
Python |
| AST (function + class level) |
JavaScript / TypeScript |
| tree-sitter |
Go |
| tree-sitter |
Java |
| tree-sitter |
Kotlin |
| tree-sitter |
Scala |
| tree-sitter |
C# |
| tree-sitter |
Haskell |
| tree-sitter |
Elixir |
| tree-sitter |
Lua |
| tree-sitter |
Shell |
| tree-sitter |
Dart |
| whole-file |
R |
| whole-file |
Non-code files (.md, .json, .yaml, .toml, .sql, .proto, .graphql) are also indexed for context.
Incremental re-indexing
After code changes, sync only the modified files instead of re-running the full pipeline:
# via MCP tool (in Claude Code):
"sync the vault for /path/to/repo" → calls sync_vault(dry_run=True) first
# or directly:
sync_vault(repo_path="/path/to/repo", explanations_json_path="..._explanations.json", dry_run=True)
sync_vault(repo_path="/path/to/repo", explanations_json_path="..._explanations.json", dry_run=False)Requires the repo to be a git repository (uses git diff against the SHA saved during ingestion).
Architecture
codelore/
main.py CLI entry point (ingest / query / init subcommands)
ingest.py build file/directory graph, write vault markdown
explain.py collect files, call Claude CLI for summaries
llm.py Claude CLI wrapper, prompt templates
nodes.py FileNode / DirectoryNode / IndexNode → markdown
generate_questions.py chunk-level question generation + ChromaDB indexing
parsers/ language-specific import graph + chunk extraction
_treesitter.py shared tree-sitter helper
python.py stdlib ast
javascript.py tree-sitter-javascript / tree-sitter-typescript
go.py tree-sitter-go
jvm.py tree-sitter-java / tree-sitter-kotlin / tree-sitter-scala
csharp.py tree-sitter-c-sharp
haskell.py tree-sitter-haskell
elixir.py tree-sitter-elixir
lua.py tree-sitter-lua
shell.py tree-sitter-bash
...
query/
retrieval.py search_chunks, bfs_vault, grep_todos, git_file_log
mcp_server.py FastMCP server exposing 9 toolsLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ayush-Sadekar/codelore-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server