clj-kondo MCP Server logo

clj-kondo MCP Server

by Bigsy

A Model Context Protocol (MCP) server that provides clj-kondo linting capabilities for Clojure/ClojureScript/EDN files. It's useful for environments like Claude code and desktop where built-in linting is unavailable.

View on GitHub

Last updated: N/A

What is clj-kondo MCP Server?

clj-kondo MCP Server is a server that exposes clj-kondo's linting capabilities through the Model Context Protocol (MCP). This allows tools and IDEs that support MCP to leverage clj-kondo for linting Clojure, ClojureScript, and EDN files.

How to use clj-kondo MCP Server?

  1. Install clj-kondo and ensure it's on your system PATH. 2. Install the server using npx clj-kondo-mcp or manually by cloning the repository, installing dependencies (npm install), and building the server (npm run build). 3. Configure your MCP client (e.g., Cline) to use the server by specifying the command and arguments. 4. Use the lint_clojure tool call with the file path, optional config directory, and optional level.

Key features of clj-kondo MCP Server

  • Lint Clojure files via MCP tool calls

  • Supports all clj-kondo analysis capabilities

  • Optional explicit configuration directory support

  • Supports linting single files, directories, and classpath strings

  • Uses clj-kondo for configuration and linting rules

Use cases of clj-kondo MCP Server

  • Linting Clojure code in Claude code editor

  • Integrating clj-kondo linting into desktop applications

  • Providing linting capabilities in environments without built-in support

  • Enforcing code style and best practices in Clojure projects

FAQ from clj-kondo MCP Server

What is clj-kondo?

clj-kondo is a fast and dependency-free static analyzer and linter for Clojure code.

What is MCP?

Model Context Protocol (MCP) is a protocol that allows tools to communicate and share information about code.

How do I install clj-kondo?

Refer to the clj-kondo installation instructions at https://github.com/clj-kondo/clj-kondo/blob/master/doc/install.md.

What parameters does the lint_clojure tool call accept?

The lint_clojure tool call accepts file (required), configDir (optional), and level (optional) parameters.

Where can I find more information about clj-kondo configuration?

See the official clj-kondo documentation at https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md.