Codemunch Pro

io.github.BigJai由 GitHub 账号 BigJai 发布v1.2.0更新于 Oct 24, 2026

Code indexing MCP: 15 tools, 10 languages, hybrid search, call graphs, O(1) retrieval.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

本地代码索引 MCP 服务器,让助手索引代码库并高效检索函数、符号、调用图和文本匹配。

可以做什么
索引本地目录或公开的 GitHub/GitLab 仓库,列出已索引仓库并强制重建索引,查看文件树以及单文件或整仓库的符号大纲。按字节偏移获取单个或多个符号的完整源码,并进行关键词加语义的混合符号搜索或原始全文内容搜索。追踪调用图,查看某函数调用了谁、又被谁调用,并与上次索引比较符号变化。双向梳理文件依赖关系。
适用场景
适合助手在代码库上工作、需要精确到函数级别的上下文而不必读取整个文件的场景,例如代码审查、重构、上手新项目和生成 API 文档。对支持语言的多文件项目、且关注 token 预算时最有用。
运行要求
作为本地进程运行,从 PyPI 安装(pip install codemunch-pro),在 MCP 客户端中以 codemunch-pro 命令配置;也可通过 streamable HTTP 端口运行。索引数据保存在本地按仓库划分的 SQLite 数据库中。索引远程仓库需要网络访问;私有仓库需要认证令牌。
安装前请注意
索引远程仓库会下载其压缩包并在本地保存副本;私有仓库需要认证令牌,属于需妥善保管的凭据。索引会在用户主目录下写入本地数据库。清单中未声明任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Codemunch Pro,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

CodeMunch Pro

Intelligent code indexing MCP server. 15 tools, 10 languages, tree-sitter AST extraction, hybrid search (FTS5 + vector), call graphs, remote repo indexing, incremental indexing.

Save 99% of tokens — get exact function source via byte-offset seek instead of reading entire files.

Install

bash
pip install codemunch-pro

Quick Start

Claude Desktop / Cline

Add to your MCP client config:

json
{  "mcpServers": {    "codemunch-pro": {      "command": "codemunch-pro"    }  }}

HTTP Server

bash
codemunch-pro --transport streamable-http --port 5002

15 MCP Tools

ToolDescription
index_folderIndex a local directory (incremental, SHA-256 based)
index_repoIndex a GitHub/GitLab repo (tarball download, no git needed)
list_reposList all indexed repositories with stats
invalidate_cacheForce re-index a repository
file_treeGet directory tree with file counts
file_outlineList symbols in a single file
repo_outlineList all symbols in repo (summary)
get_symbolGet full source of one symbol (O(1) byte seek)
get_symbolsBatch get multiple symbols
search_symbolsHybrid search (FTS5 + vector RRF)
search_textFull-text search in file contents
get_calleesWhat does this function call?
get_callersWho calls this function?
diff_symbolsWhat changed since last index? (PR review)
dependency_mapWhat does this file depend on? What depends on it?

10 Languages

Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, Ruby

All via tree-sitter-language-pack — zero compilation, pre-built binaries.

Key Features

O(1) Symbol Retrieval

Every symbol stores its byte offset and length. get_symbol seeks directly to the function source — no reading entire files. A 200-byte function from a 40KB file = 99.5% token savings.

Incremental Indexing

Files are hashed (SHA-256). Only changed files are re-parsed. Re-indexing a 10K file repo after changing one file takes milliseconds.

Hybrid Search (FTS5 + Vector)

Combines BM25 keyword matching with semantic vector similarity using Reciprocal Rank Fusion. Search "authentication middleware" and find auth_middleware, verify_token, and login_handler.

Call Graphs

Traces function calls through the AST. get_callees("main") shows what main calls. get_callers("authenticate") shows who calls authenticate. Supports depth traversal.

Remote Repo Indexing (v1.1)

Index any public GitHub or GitLab repo by URL — no git binary needed. Downloads the tarball via API, extracts, and indexes. Cached locally with SHA-based freshness checks. Supports private repos with auth tokens and sparse paths.

Full-Text Content Search

Search raw file contents — string literals, TODO comments, config values, error messages. Not just symbol names.

How It Works

  1. Parse — tree-sitter builds an AST for each source file
  2. Extract — Walk AST to find functions, classes, methods, types, interfaces
  3. Store — SQLite database per repo with FTS5 virtual tables
  4. Embed — FastEmbed (ONNX, CPU-only) generates 384-dim vectors for semantic search
  5. Graph — Call expressions extracted from function bodies, edges stored and resolved
  6. Serve — FastMCP exposes 13 tools via stdio or HTTP

Architecture

~/.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

Use Cases

  • AI Coding Agents: Give your agent surgical access to codebases without burning context
  • Code Review: Find all callers of a function before changing its signature
  • Onboarding: Search symbols semantically — "where is error handling?" finds relevant code
  • Refactoring: Map call graphs before moving functions between modules
  • Documentation: Extract all public APIs with signatures and docstrings

License

MIT

来源:README.md,提交 29b689a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分