BC

bartolli/codanna

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

762 stars 69 forks 质量 82 趋势 20Apache-2.0

本地代码智能MCP服务器和AI编码代理的CLI

概览

文档 ·报告错误 ·讨论 让代码助手能够洞察你的代码库——理解函数、追踪关系,并以外科手术般的精准度找到实现。以上下文为先的编码。没有重复和希望循环。没有无休止的来回沟通。只需更聪明的工程,只需更少的按键操作。 专为快速研发和配对编程打造——当LSP速度过慢时,能即时解决问题。了解更多 请参阅货物及其他选项安装指南。 你的AI助手将获得对你代码的结构化了解: - - 即时调用图,而非grep结果 - - 语义搜索匹配意图,而不仅仅是关键词 - - 跨文件的完整依赖分析 区别在于:Codanna 理解代码结构。它知道 parseConfig 是一个调用 validSchema 的函数,而不仅仅是字符串匹配。 查找次数低于10毫秒,75,000+符号/秒解析。

概述(AI 翻译)

科丹娜

文献资料 · 报告错误 · 讨论

本地代码智能MCP服务器和用于AI编码代理的CLI。

给你的特工做X光视力。

Codanna 是一款本地代码智能和语义代码搜索 MCP 服务器,专为 AI 编码代理服务。一次 MCP 调用返回符号上下文、调用图和影响分析,预相关——即代理当前运行的 grep-and read 循环,合并为其可执行的单一响应。

它为你的磁盘仓库提供索引,并为 Claude Code、Cursor、Windsurf、Codex、Gemini 以及任何兼容 MCP 的客户端提供符号搜索、语义搜索、调用图、依赖追踪、文档 RAG 和影响分析——作为持久的 MCP 服务器,用于会话长处理,或作为一次性 CLI,在 LSP 太慢时提供即时答案。用 Rust 编写。15 种语言。你的机器不会流失源代码。

两种操作模式

Codanna的MCP工具集支持两条方式。同样的工具,相同的表面——选择适合工作流程的模式。

持久MCP服务器——用于会话长代理工作流。

一次性CLI——用于斩击命令、击打钩子、脚本、CI。不需要守护进程。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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