Skip to main content
Glama
Bigsy

clj-kondo MCP Server

by Bigsy

clj-kondo MCP サーバーnpmバージョン

Clojure/ClojureScript/EDNファイル用のclj-kondoリンティング機能を提供するモデルコンテキストプロトコル(MCP)サーバーです。Claudeコードやデスクトップ版で、組み込みのリンティング機能がない環境で便利です。CLAUDE.mdを編集後、リンティングを実行するように設定することを検討してください。

特徴

  • MCPツール呼び出しによるClojureファイルのLint

  • すべてのclj-kondo分析機能をサポート

  • オプションの明示的な構成ディレクトリのサポート

Related MCP server: shadow-cljs-mcp

インストール

クイックインストール

npx clj-kondo-mcp

またはIDE設定

{
  "mcpServers": {
    "clj-kondo": {
      "command": "npx",
      "args": ["clj-kondo-mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

手動インストール

  1. clj-kondo をインストールしてください。clj -kondoがインストールされ、システム PATH 上で利用可能になっていることを確認してください。お使いのプラットフォームのインストール手順をご覧ください。

  2. 依存関係をインストールします:

npm install
  1. サーバーを構築します。

npm run build

使用法

サーバーの実行

node build/index.js

MCPツール呼び出し

サーバーは次のツールを 1 つ提供します。

lint_clojure - Clojure/ClojureScript/EDN コンテンツをリントする

パラメータ:

{
  "file": "/absolute/path/to/file.clj", // Must be absolute path - can be a file, directory, or classpath
  "configDir": "/absolute/path/to/config/dir", // Optional, must be absolute path if provided
  "level": "warning" // Optional, defaults to error level
}

fileパラメータは以下を受け入れます:

  • 単一のファイルパス(例: "/path/to/src/my_file.clj")

  • ディレクトリパス(例:"/path/to/src") - すべての.clj、.cljs、.cljcファイルを再帰的にlintします。

  • クラスパス文字列 - クラスパス内のすべての Clojure ファイルを lint します

    • Leiningenプロジェクトの場合: lein classpathの出力を使用する

    • deps.ednプロジェクトの場合: clojure -Spathの出力を使用します

注意:MCPサーバーは別プロセスとして実行されるため、fileパラメータとconfigDirパラメータはどちらも絶対パスで指定する必要があります。相対パスは正しく動作しません。

デフォルトでは、clj-kondo は現在のディレクトリと親ディレクトリの.clj-kondoディレクトリから設定を自動的に検索します。configDir configDirで特定の設定ディレクトリを指定することで、この動作をオーバーライドできます。

clj-kondo の設定の詳細については、公式ドキュメントを参照してください。

構成

MCP 設定ファイル (Cline の場合は~/Library/Application Support/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonにあります) に追加します。

{
  "mcpServers": {
    "clj-kondo": {
      "command": "npx",
      "args": ["clj-kondo-mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

手動ビルドの場合は以下を使用します。

{
  "mcpServers": {
    "clj-kondo": {
      "command": "node",
      "args": ["build/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

建てる

npm run build

ウォッチモード

npm run dev

Available Tools

1 tool
lint_clojureA

Lint Clojure/ClojureScript/EDN content using clj-kondo

ParametersJSON Schema
NameRequiredDescriptionDefault
configDirNoOptional absolute path to .clj-kondo config directory (e.g. /Users/name/project/.clj-kondo). If not provided, clj-kondo will look for .clj-kondo directory in the current and parent directories.
fileYesCan be: 1) Absolute path to a file, 2) Directory path (will lint all .clj/.cljs/.cljc files recursively), or 3) Classpath string (obtained via `lein classpath` or `clojure -Spath`)
levelNoOptional linting level. By default all lints are errors. Set to "warning" to use warning level instead.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It specifies what gets processed (Clojure/ClojureScript/EDN content) and the tool used, but doesn't describe output format, error handling, performance characteristics, or what constitutes successful linting. The description adds some value but leaves significant behavioral aspects undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the essential purpose without any wasted words. It's front-loaded with the core functionality and uses precise terminology. Every element of the description earns its place by adding meaningful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 3 parameters with good schema coverage, the description provides adequate basic context but leaves gaps. It explains what the tool does but doesn't describe what users can expect as results, how to interpret linting output, or any limitations of the clj-kondo approach. For a tool with no structured output documentation, more guidance would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds value by providing context about what 'lint' means in this context and specifying the exact tool being used (clj-kondo), which helps users understand the linting approach and standards being applied beyond what the parameter descriptions provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verb ('lint') and target resources ('Clojure/ClojureScript/EDN content'), and specifies the implementation method ('using clj-kondo'). It distinguishes itself by naming the exact linter being used, which is helpful even without sibling tools for comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage context by specifying what types of content can be linted and the tool being used, but offers no explicit guidance on when to use this tool versus alternatives (though no sibling tools exist). It doesn't mention prerequisites, typical workflows, or integration scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedlint_clojure

TDQS

A3.8/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clear purpose that is distinct by default.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The naming follows a clear verb_noun pattern (lint_clojure).

Tool Count2/5

A single tool is too few for a server's purpose, as it limits functionality and suggests an incomplete or overly narrow scope. Typically, servers benefit from multiple tools to cover various operations within their domain.

Completeness2/5

The server only provides linting, which is a significant gap for a tool named after clj-kondo, as it might be expected to support other related operations like configuration management or analysis. The surface is severely incomplete for a comprehensive Clojure tooling server.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.
    23
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that monitors shadow-cljs builds and provides real-time build status updates for ClojureScript projects, allowing LLMs to verify build status after making code changes.
    1
    26 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A production-ready Model Context Protocol server that provides comprehensive file system management capabilities for seamless integration with Claude Desktop.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that analyzes application codebases with real-time file watching, providing AI assistants like Claude with deep insights into project structure, code patterns, and architecture.
    MIT