使用说明
scc-mcp
Standalone MCP server for scc code metrics. Runs on Babashka via the modex-bb framework.
Provides 4 tools for code metrics: project analysis, complexity hotspots, per-file metrics, and directory comparison.
Requirements
Quick Start
bb --config bb.edn run server
Claude Code MCP config
Add to ~/.claude/settings.json:
{
"mcpServers": {
"scc": {
"command": "bb",
"args": ["--config", "/path/to/scc-mcp/bb.edn", "run", "server"]
}
}
}
Tools
| Tool | Description |
|---|---|
analyze |
Project metrics — LOC, complexity, language breakdown |
hotspots |
Complexity hotspots — files exceeding a threshold (default: 20) |
file |
Detailed metrics for a single file |
compare |
Compare metrics between two directories (diff LOC, code, complexity) |
IAddon Integration
scc-mcp implements the IAddon protocol for dynamic registration in hive-mcp. When loaded as an addon, its handlers override the embedded scc handlers in the consolidated analysis tool.
(require '[scc-mcp.init :as init])
(init/init-as-addon!)
;; => {:registered ["scc"] :total 1}
The addon exposes a single scc supertool with command dispatch:
(require '[scc-mcp.tools :as tools])
(tools/handle-scc {:command "analyze" :path "src/"})
Project Structure
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)
Dependencies
License
MIT
