codanna

作者 bartolli已验证

Local code intelligence MCP server and CLI for AI coding agents

726
Stars
68
Forks
Rust
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/bartolli/codanna

快速入门

使用 codanna 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Codanna

Claude Google Gemini OpenAI Codex Rust Crates.io Total Downloads

Documentation · Report Bug · Discussions

Local code intelligence MCP server and CLI for AI coding agents.

X-ray vision for your agent.

Codanna is a local code intelligence and semantic code search MCP server for AI coding agents. One MCP call returns symbol context, call graph, and impact analysis, pre-correlated — the grep-and-read loop your agent runs today, collapsed into a single response it can act on.

It indexes your repository on disk and serves symbol search, semantic search, call graphs, dependency tracking, document RAG, and impact analysis to Claude Code, Cursor, Windsurf, Codex, Gemini, and any MCP-compatible client — as a persistent MCP server for session-long work, or a one-shot CLI for instant answers when LSP is too slow. Written in Rust. 15 languages. No source code leaves your machine.

Two operational modes

Codanna's MCP toolset is reachable two ways. Same tools, same surface — pick the mode that fits the workflow.

Persistent MCP server — for session-long agent workflows.

codanna serve                # stdio
codanna serve --http         # HTTP
codanna serve --https        # HTTPS

One-shot CLI — for slash-commands, bash hooks, scripts, CI. No daemon required.

codanna mcp find_symbol name:"my_function"
codanna mcp analyze_impact symbol_name:"my_function"
codanna mcp semantic_search_with_context query:"recursively extract function calls"

codanna mcp semantic_search_with_context is the headline command: it returns N semantic matches, and for each match the symbol identity, signature, docstring, callees, callers, and recursive impact analysis — five MCP tools fused into one query.

The one-shot CLI is also what makes codanna skill-friendly: an Agent Skill can wrap codanna mcp commands directly in Claude Code, Cursor, Windsurf, Codex, Gemini, or any harness that runs shell commands — no MCP plumbing required.

What one call returns

The headline command, run against codanna's own source tree. One call, and the agent has the symbol, its documentation, signature, callees with exact call sites, callers, and blast radius:

$ codanna mcp semantic_search_with_context query:"recursively extract function calls" limit:1

Found 1 results for query: 'recursively extract function calls'

1. extract_calls_recursive - Method at src/parsing/cpp/parser.rs:1002-1047 [symbol_id:1477]
   Similarity Score: 0.833
   Documentation:
     Recursively extract function calls with context tracking
   Signature: fn extract_calls_recursive<'a>(
        node: Node,
        code: &'a str,
        current_function: Option<&'a str>,
        calls: &mut Vec<(&'a str, &'a str, Range)>,
    )

   extract_calls_recursive calls 3 function(s):
     -> Method extract_calls_recursive at src/parsing/cpp/parser.rs:1002 [symbol_id:1477] (called at src/parsing/cpp/parser.rs:1045)
     -> Method function_name_at_def at src/parsing/cpp/parser.rs:377 [symbol_id:1451] (called at src/parsing/cpp/parser.rs:1008)
     -> Method new at src/types/mod.rs:112 [symbol_id:7388] (called at src/parsing/cpp/parser.rs:1028)

   2 function(s) call extract_calls_recursive:
     <- Method extract_calls_recursive at src/parsing/cpp/parser.rs:1045 [symbol_id:1477]
     <- Method find_calls at src/parsing/cpp/parser.rs:885 [symbol_id:1467]

   Changing extract_calls_recursive would impact 1 symbol(s) (max depth: 2):

     methods (1):
       - find_calls [symbol_id:1467]

Guidance: Found one match with full context. Review the relationships to understand how this fits into the codebase.

Every result carries file:line coordinates the agent can open directly, symbol_ids it can reuse to disambiguate name collisions, and a guidance hint it can chain on. Add --json for the structured envelope.

Local-first

Codanna runs on your machine. The repository index lives on disk under .codanna/. The embedding model downloads once on first use, then runs locally. No source code, symbols, or queries are sent to a remote API by default. Remote OpenAI-compatible embeddings are opt-in: remote_url under [semantic_search] in settings.toml, or CODANNA_EMBED_* environment variables; the API key is environment-only.

Quick Start

Install (macOS, Linux, WSL)

curl -fsSL --proto '=https' --tlsv1.2 https://install.codanna.sh | sh

Or via Homebrew

brew install codanna

Or via Nix

nix run github:bartolli/codanna

Windows (PowerShell)

irm https://raw.githubusercontent.com/bartolli/codanna/main/scripts/install.ps1 | iex

See Installation Guide for Cargo and other options.

Initialize and index

codanna init
codanna index src

Search code

codanna mcp semantic_search_with_context query:"where do we handle errors" limit:3

Search documentation (RAG)

codanna documents add-collection docs ./docs
codanna documents index
codanna mcp search_documents query:"authentication flow"

What It Does

Your AI assistant gains structured knowledge of your code:

  • "Where's this function called?" - Instant call graph, not grep results
  • "Find authentication logic" - Semantic search matches intent, not just keywords
  • "What breaks if I change this?" - Full dependency analysis across files

The difference: Codanna understands code structure. It knows parseConfig is a function that calls validateSchema, not just a string match.

Features

FeatureDescription
Semantic SearchNatural language queries against code and documentation. Finds functions by what they do, not just their names.
Relationship TrackingCall graphs, implementations, and dependencies. Trace how code connects across files.
Document SearchIndex markdown and text files for RAG workflows. Query project docs alongside code.
MCP ProtocolNative integration with Claude, Gemini, Codex, and other AI assistants.
ProfilesPackage hooks, commands, and agents for different project types.

Performance: parser throughput 76,000-249,000 symbols/second depending on language; warm-server lookups under 10 ms (0.3 ms exact, ~3 ms semantic). Parsing is the fast layer; embedding generation during indexing takes longer and scales with your cores. Measured numbers, machine spec, and reproduction commands: Benchmarks.

Languages: Rust, Python, JavaScript, TypeScript, Java, Kotlin, Go, PHP, C, C++, C#, Clojure, Lua, Swift, GDScript.

Integration

Add codanna to any MCP-compatible client. Project-scoped .mcp.json (Claude Code, Cursor, Windsurf):

{
  "mcpServers": {
    "codanna": {
      "command": "codanna",
      "args": ["--config", ".codanna/settings.toml", "serve", "--watch"]
    }
  }
}

--watch keeps the index hot as files change. Transports: stdio, HTTP, HTTPS. See Integration Guides for Claude Desktop, Gemini, Codex, and network setups.

Requirements

  • ~150MB for embedding model (downloaded on first use)
  • Build from source: Rust 1.85+, Linux needs pkg-config libssl-dev
  • Windows support is experimental

Contributing

Contributions welcome. See CONTRIBUTING.md.

License

Apache License 2.0 - See LICENSE.

Attribution required. See NOTICE.


Built with Rust.

常见问题

What is codanna?

codanna is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by bartolli. Local code intelligence MCP server and CLI for AI coding agents. It has 726 GitHub stars.

Is codanna safe to use?

Yes. codanna passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install codanna?

Clone the repository with "git clone https://github.com/bartolli/codanna" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is codanna written in?

codanna is primarily written in Rust. It is open-source under bartolli on GitHub, so you can review or fork the full source.

Are there alternatives to codanna?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codanna against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情