Lumora: Local Semantic Code Graph + MCP Server for AI Coding Agents
Lumora is a local-first semantic code search and code graph engine built for AI-assisted software development. It runs as a CLI and an MCP server, so coding agents can fetch precise repository context instead of reading large file chunks blindly.
If you use tools like Codex, Claude Code, Cline, Cursor, Roo, or custom MCP clients, Lumora improves context quality, reduces noisy retrieval, and helps agents make safer edits.
Why Lumora
- Semantic over text-only search: definitions, references, callers, dependency paths, and minimal graph slices.
- Better context for AI agents: bounded results with ranking, deduplication, paging, diagnostics, and freshness metadata.
- Local and offline: SQLite-backed index under
.lumora/in your repo. - Fast incremental indexing: re-index only what changed.
- MCP-native: easy to plug into Codex and other MCP-compatible coding tools.
Where It Helps (Compared to Standard Tools)
1) "Where is this actually used?"
Text search:
Semantic query:
Why it helps: ranked and deduped call/reference results, plus file-level summary for faster triage.
2) "What calls this function?"
Text search:
Semantic query:
Why it helps: direct call edges, optional filters, and paging metadata.
3) "How does A depend on B?"
Manual trace:
- inspect imports
- follow call chains by hand
Semantic dependency path:
Why it helps: explicit graph path instead of manual reconstruction.
4) "Give the agent only relevant context for this line"
Manual approach:
- copy large file snippets
Graph slice:
Why it helps: small, high-signal context windows for agent prompts.
Install
Quickstart
MCP Setup
Codex (recommended)
This registers Lumora with --auto-index false for fast MCP startup.
If codex is not on PATH:
Manual Codex registration
# macOS/Linux
# Windows (absolute binary path)
Then launch Codex from the target repo directory.
Other MCP clients
MCP Tools
lumora.index_repositorylumora.symbol_definitionslumora.symbol_referenceslumora.symbol_callerslumora.dependency_pathlumora.minimal_slicelumora.clone_matcheslumora.selector_discover
Query Capabilities for AI-Agent Context
High-volume endpoints support:
limit,offset,order(score_desc,line_asc, plusasc/desccompatibility aliases)- dedup and summary modes
file_glob,language, andmax_age_hoursfilters (references/callers)- verbosity levels (
compact,normal,debug) - pagination metadata (
total,has_more,next_offset) - optional freshness metadata (
include_freshness: true)
minimal_slice defaults prioritize signal:
max_neighbors=40dedup=truesuppress_low_signal_repeats=truelow_signal_name_cap=1prefer_project_symbols=true
clone_matches supports:
mode=matchesandmode=hotspots- actionable
analysisfields (candidate counts, threshold fallout, suggested threshold) - pagination metadata
selector_discover supports:
- fuzzy discovery (
fuzzy=trueby default) - scope hints:
file_glob,entity_type - ranked results with score/explanation metadata
Dependency Path Semantics
- File-to-file selectors (
file:src/a.rs->file:src/b.rs) are best for module/file impact analysis. - Symbol-based selectors can be less intuitive when names are overloaded.
- For predictable paths, prefer explicit selectors:
file:<path>symbol_name:<lang>:<name>symbol:<name>
Current Scope
- Language parsing: Rust (
.rs) and Python (.py) - Config/entrypoint signals include:
Cargo.toml,pyproject.toml,setup.cfg,package.json - Storage: SQLite
State Layout
By default Lumora stores generated state under:
.lumora/graph.db- future state/index files under
.lumora/
Common Commands
# Index
# Watcher daemon
# Query examples
# MCP server mode
For CLI dependency queries, plain file selectors like src/main.rs are often easiest in shells.
Troubleshooting MCP Startup
If needed, increase startup timeout in ~/.codex/config.toml:
[]
= 30
Platform Support
Lumora targets Linux, macOS, and Windows.
Prerequisite on all platforms: a working C toolchain (required by tree-sitter and bundled sqlite).
- Linux:
build-essential(or GCC/Clang equivalent) - macOS: Xcode Command Line Tools (
xcode-select --install) - Windows: Visual Studio C++ Build Tools
Cross-platform CI runs on Ubuntu, macOS, and Windows via .github/workflows/ci.yml.
Maintainer Release Workflow
Then tag and publish.
Documentation and Project Links
- Changelog:
CHANGELOG.md - Contributing:
CONTRIBUTING.md - Security policy:
SECURITY.md
License
Dual licensed under either:
- MIT license (
LICENSE-MIT) - Apache License 2.0 (
LICENSE-APACHE)
at your option.