Liking cljdoc? Tell your friends :D

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

ToolDescription
analyzeProject metrics — LOC, complexity, language breakdown
hotspotsComplexity hotspots — files exceeding a threshold (default: 20)
fileDetailed metrics for a single file
compareCompare 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

  • modex-bb — MCP server framework
  • scc — external binary (not bundled)

License

MIT

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close