codemunch-pro
CodeMunch Pro
インテリジェントなコードインデックスMCPサーバー。15ツール、10言語、tree-sitter AST抽出、ハイブリッド検索(FTS5 + ベクター)、コールグラフ、リモートリポジトリのインデックス化、インクリメンタルインデックス化。
トークンを99%節約 — ファイル全体を読む代わりに、バイトオフセットシークで正確な関数ソースを取得できます。
インストール
pip install codemunch-proRelated MCP server: CodeIntel MCP Server
クイックスタート
Claude Desktop / Cline
MCPクライアント設定に追加します:
{
"mcpServers": {
"codemunch-pro": {
"command": "codemunch-pro"
}
}
}HTTPサーバー
codemunch-pro --transport streamable-http --port 500215のMCPツール
ツール | 説明 |
| ローカルディレクトリをインデックス化(インクリメンタル、SHA-256ベース) |
| GitHub/GitLabリポジトリをインデックス化(tarballダウンロード、git不要) |
| インデックス化された全リポジトリを統計付きで一覧表示 |
| リポジトリを強制的に再インデックス化 |
| ファイル数付きのディレクトリツリーを取得 |
| 単一ファイル内のシンボルを一覧表示 |
| リポジトリ内の全シンボルを一覧表示(概要) |
| 1つのシンボルの完全なソースを取得(O(1)バイトシーク) |
| 複数のシンボルを一括取得 |
| ハイブリッド検索(FTS5 + ベクターRRF) |
| ファイル内容の全文検索 |
| この関数は何を呼び出すか? |
| 誰がこの関数を呼び出すか? |
| 前回のインデックスから何が変わったか?(PRレビュー) |
| このファイルは何に依存しているか?何がこれに依存しているか? |
10言語
Python、JavaScript、TypeScript、Go、Rust、Java、C、C++、C#、Ruby
すべて tree-sitter-language-pack 経由 — コンパイル不要、プリビルドバイナリ。
主な機能
O(1)シンボル取得
すべてのシンボルはバイトオフセットと長さを保存します。get_symbol は関数ソースに直接シークします — ファイル全体を読みません。40KBファイルから200バイトの関数を取得 = 99.5%のトークン節約。
インクリメンタルインデックス化
ファイルはハッシュ化(SHA-256)されます。変更されたファイルのみが再解析されます。1つのファイルを変更した後に10Kファイルのリポジトリを再インデックス化するのはミリ秒単位です。
ハイブリッド検索(FTS5 + ベクター)
Reciprocal Rank Fusionを使用してBM25キーワードマッチングとセマンティックベクター類似度を組み合わせます。「authentication middleware」を検索すると、auth_middleware、verify_token、login_handler が見つかります。
コールグラフ
ASTを通じて関数呼び出しを追跡します。get_callees("main") は main が呼び出すものを表示します。get_callers("authenticate") は authenticate を呼び出すものを表示します。深さトラバーサルに対応。
リモートリポジトリのインデックス化(v1.1)
URLで任意の公開GitHubまたはGitLabリポジトリをインデックス化 — gitバイナリ不要。API経由でtarballをダウンロードし、展開してインデックス化します。SHAベースの鮮度チェックでローカルにキャッシュされます。認証トークンとスパースパスによるプライベートリポジトリに対応。
全文コンテンツ検索
生のファイル内容を検索 — 文字列リテラル、TODOコメント、設定値、エラーメッセージ。シンボル名だけでなく。
仕組み
解析 — tree-sitterが各ソースファイルのASTを構築
抽出 — ASTを走査して関数、クラス、メソッド、型、インターフェースを検出
保存 — FTS5仮想テーブル付きのリポジトリごとのSQLiteデータベース
埋め込み — FastEmbed(ONNX、CPUのみ)がセマンティック検索用の384次元ベクターを生成
グラフ — 関数本体から呼び出し式を抽出し、エッジを保存・解決
提供 — FastMCPがstdioまたはHTTP経由で13のツールを公開
アーキテクチャ
~/.codemunch-pro/
├── myproject_a1b2c3d4e5f6.db # Per-repo SQLite database
├── otherproject_7890abcdef.db
└── ...
Each DB contains:
├── files # Indexed files with SHA-256 hashes
├── symbols # Functions, classes, methods, types
├── symbols_fts # FTS5 full-text search index
├── symbols_vec # sqlite-vec 384-dim vector index
├── call_edges # Call graph (caller → callee)
└── file_content_fts # Raw file content searchユースケース
AIコーディングエージェント: コンテキストを消費せずにコードベースへの外科的アクセスをエージェントに提供
コードレビュー: シグネチャを変更する前に関数のすべての呼び出し元を確認
オンボーディング: セマンティックにシンボルを検索 — 「エラーハンドリングはどこ?」で関連コードを発見
リファクタリング: モジュール間で関数を移動する前にコールグラフをマッピング
ドキュメント: シグネチャとdocstring付きのすべての公開APIを抽出
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform hybrid code search, get explanations, analyze relations and impacts, retrieve context packs, and generate documentation across ~45 languages via 17 MCP tools, all powered by a local vector database and LLM.2Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query code structure efficiently through 16 MCP tools, including symbol lookup, full-text search, dependency analysis, and refactor planning, powered by tree-sitter parsing and index-backed code intelligence.3MIT
- AlicenseBqualityCmaintenanceIndexes a Python/JS/TS repository into a local SQLite knowledge graph so agents can trace callers, callees, imports, subclasses and covering tests, measure impact radius, rank diff risk, and summarize architecture without grepping files. Exposes these queries as MCP tools alongside an equivalent CLI, with no daemon, embeddings, or network access.10MIT