Standalone MCP server for clj-kondo static analysis. Runs on Babashka via the modex-bb framework.
Provides 7 tools for Clojure code analysis: linting, call graph traversal, var lookup, namespace dependency graphs, and dead code detection.
bb --config bb.edn run server
Add to ~/.claude/settings.json:
{
"mcpServers": {
"clj-kondo": {
"command": "bb",
"args": ["--config", "/path/to/clj-kondo-mcp/bb.edn", "run", "server"]
}
}
}
| Tool | Description |
|---|---|
analyze | Project analysis — var definitions, usages, namespaces, findings summary |
lint | Lint with severity filtering (error, warning, info) |
find_callers | Find all call sites of a specific var |
find_calls | Find all vars that a function calls |
find_var | Find definition(s) of a var by name |
namespace_graph | Namespace dependency graph — nodes and edges |
unused_vars | Dead code detection — unused private vars |
clj-kondo-mcp implements the IAddon protocol for dynamic registration in hive-mcp. When loaded as an addon, its handlers override the embedded kondo handlers in the consolidated analysis tool via last-write-wins in the extension registry.
(require '[clj-kondo-mcp.init :as init])
(init/init-as-addon!)
;; => {:registered ["kondo"] :total 1}
The addon exposes a single kondo supertool with command dispatch:
;; Direct handler usage
(require '[clj-kondo-mcp.tools :as tools])
(tools/handle-kondo {:command "lint" :path "src/" :level "warning"})
src/clj_kondo_mcp/
core.clj — clj-kondo pod wrapper (analysis, linting, call graphs)
tools.clj — Command handlers + MCP tool schema (IAddon interface)
init.clj — IAddon reify + nil-railway registration pipeline
server.clj — modex-bb standalone MCP server (7 tools)
log.clj — Logging shim (timbre on JVM, stderr on bb)
MIT
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |