scc-mcp
提供4种代码度量工具:项目分析、复杂性热点、每个文件度量和目录比较。
需求
快速开始
bb --config bb.edn run server克劳德代码MCP配置
增添 ~/.claude/settings.json:
{
"mcpServers": {
"scc": {
"command": "bb",
"args": ["--config", "/path/to/scc-mcp/bb.edn", "run", "server"]
}
}
}工具
| 工具 | 说明 |
|---|---|
analyze | 项目指标——LOC、复杂性、语言细分 |
hotspots | 复杂性热点--文件超过阈值(默认值:20) |
file | 单个文件的详细指标 |
compare | 比较两个目录之间的指标(差异LOC、代码、复杂性) |
IAddon集成
scc-mcp实现了 IAddon 动态注册协议 蜂巢mcp。当作为加载项加载时,其处理程序会覆盖合并中的嵌入式scc处理程序 analysis 工具。
(require '[scc-mcp.init :as init])
(init/init-as-addon!)
;; => {:registered ["scc"] :total 1}该插件公开了一个 scc 带命令调度的超级工具:
(require '[scc-mcp.tools :as tools])
(tools/handle-scc {:command "analyze" :path "src/"})项目结构
src/scc_mcp/
core.clj — Shell wrapper for scc binary, JSON parsing, hotspot extraction
tools.clj — Command handlers + MCP tool schema (IAddon interface)
init.clj — IAddon reify + nil-railway registration pipeline
server.clj — modex-bb standalone MCP server (4 tools)
log.clj — Logging shim (timbre on JVM, stderr on bb)依赖项
许可证
麻省理工学院
