codemunch-pro
CodeMunch Pro
智能代码索引 MCP 服务器。15 个工具,10 种语言,tree-sitter AST 提取,混合搜索(FTS5 + 向量),调用图,远程仓库索引,增量索引。
节省 99% 的 token — 通过字节偏移定位直接获取精确的函数源码,无需读取整个文件。
安装
pip install codemunch-proRelated MCP server: RTFM
快速开始
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) |
| 列出所有已索引的仓库及统计信息 |
| 强制重新索引仓库 |
| 获取目录树及文件计数 |
| 列出单个文件中的符号 |
| 列出仓库中的所有符号(摘要) |
| 获取单个符号的完整源码(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% 的 token。
增量索引
文件经过哈希(SHA-256)。仅重新解析更改的文件。更改一个文件后重新索引包含 10K 文件的仓库只需毫秒级时间。
混合搜索(FTS5 + 向量)
使用倒数排名融合(RRF)结合 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 以查找函数、类、方法、类型、接口
存储 — 每个仓库一个 SQLite 数据库,包含 FTS5 虚拟表
嵌入 — 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 编码代理:让您的代理以精准的方式访问代码库,而不消耗上下文
代码审查:在更改函数签名之前找到所有调用者
入职培训:语义搜索符号 — “错误处理在哪里?” 找到相关代码
重构:在模块间移动函数之前绘制调用图
文档:提取所有公共 API 及其签名和文档字符串
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceA local-first codebase intelligence tool that enables AI assistants to research codebases using semantic search, multi-hop relationship discovery, and structural parsing. It allows users to extract architectural patterns and institutional knowledge across 30+ programming languages through an MCP-compatible interface.21,415MIT
- AlicenseNot gradedqualityBmaintenanceThe open retrieval layer for AI agents. Index your entire project — code, docs, legal, research, data — and serve surgical context via MCP. FTS5 full-text search, optional semantic search (FastEmbed/ONNX), 10 built-in parsers, incremental auto-sync.22MIT
- AlicenseNot gradedqualityAmaintenanceProvides 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
- AlicenseBqualityBmaintenanceLocal repo-intelligence MCP for coding agents: indexes source, symbols, call graphs, git/GitHub history, and source-bound repo memories into local database.4715MIT
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BigJai/codemunch-pro'
If you have feedback or need assistance with the MCP directory API, please join our Discord server