bartolli/codanna
Local Rust MCP server and CLI for semantic code search and call-graph analysis
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Codanna is a Rust code-intelligence service and CLI built around a persistent on-disk project index under .codanna/. Tree-sitter provides source parsing, Tantivy backs the search index, and fastembed runs local embeddings through ONNX Runtime. Separating indexing from querying lets an agent retrieve symbols and their relationships without reparsing the repository for every question.
The same tool surface is exposed through persistent codanna serve sessions over stdio, HTTP, or HTTPS and through one-shot codanna mcp invocations. serve --watch tracks file changes during editing. The Claude Code plugin adds scoped symbol and impact views through x-ray and broader codebase visualizations through graph; neither skill is required for a standard MCP client.
Key Capabilities & Differentiators
Codanna indexes symbols and relationships across 15 languages, including Rust, Python, JavaScript, TypeScript, Java, Kotlin, Go, C, and C++. Its most useful agent-facing operation, semantic_search_with_context, combines semantic matches with symbol identities, signatures, docstrings, callers, callees, and recursive change-impact results. File-and-line coordinates let the agent open the code directly, while symbol IDs help it distinguish same-named definitions. --json makes the result suitable for scripts or other tools.
It also indexes Markdown and plain text in named collections, so agents can retrieve design notes or project guides alongside implementation details. Local embeddings are the default. An OpenAI-compatible remote embedding endpoint can be configured explicitly through remote_url in [semantic_search] or CODANNA_EMBED_* environment variables; the API key is supplied only through the environment.
Trade-offs & Limitations
Compared with grep, Codanna requires an initial indexing pass and ongoing freshness management. In return it can rank code by intent and provide relationships that text search alone cannot resolve. Treat its impact results as leads for review, not proof that every runtime dependency has been captured. Use an LSP, compiler, or tests where correctness depends on language-specific resolution or build behavior.
The local default avoids sending source, symbols, or queries to a remote embedding API, but shifts model storage and indexing work to the host. Remote embeddings change the data boundary, as can the agent client consuming MCP results. Apache-2.0 supports commercial self-hosting; redistribution still carries applicable license and notice obligations. For agents running on the same machine, stdio avoids opening a network listener. Review access controls before choosing a network transport for a private index.
Hardware & Deployment Guide
Install via Homebrew, Nix, or the project installer on supported macOS, Linux, or WSL setups, then run codanna init and index the intended source paths. Source builds for v0.18.0 require Rust 1.95+ and pkg-config. The Linux cargo install path requires glibc 2.38+ and GCC 13+ libstdc++; published Linux binaries are built on Ubuntu 24.04 with glibc 2.39. Current macOS releases target Apple Silicon; v0.17.0 was the last Intel Mac release. Windows support is experimental.
First use downloads an approximately 150 MB embedding model, after which the default embedding path runs locally. Plan for separate disk space for the index and test memory and CPU usage under the intended indexing and query load. v0.17.0 triggered a one-time rebuild when it introduced emission semantics v4. v0.17.1 moved to ONNX Runtime 1.28 and removed OpenSSL from the dependency graph; v0.18.0 moved to ONNX Runtime 1.31 and updated Tree-sitter, Tantivy, and reqwest without requiring another index rebuild.
semantic_search_with_context returns signatures, docstrings, callers, callees, and recursive impact in one result.--json supports programmatic consumption..codanna/; serve --watch updates it as files change.codanna mcp.Teams using coding agents on private or multilingual repositories that need semantic discovery, cross-file call tracing, and a first pass at refactor impact.
You only need exact text search, require compiler-grade guarantees from the index, or must run a current release on Intel macOS or an incompatible Linux baseline.
Quick Start & Installation
curl -fsSL --proto '=https' --tlsv1.2 https://install.codanna.sh | sh
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| codanna ★ | 765 | +3 | Rust | Apache-2.0 | Local Rust MCP server and CLI for semantic code search and call-graph analysis |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| context7 | 65.8k | +333 | TypeScript | MIT | A hosted documentation index with MCP and CLI access for coding agents |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/bartolli/codanna.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about codanna
How do I connect Codanna to an agent and keep the index current?
codanna init and index the intended source paths, for example with codanna index src. Point the MCP client at codanna --config .codanna/settings.toml serve --watch for a project-scoped stdio session that tracks edits. For scripts or CI, use the same tool surface via codanna mcp without a daemon; add --json when another program needs to parse the result.What hardware and storage should I budget for?
Can we use it commercially on private repositories?
Does it replace grep or a language server?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy