Skip to main content
Glama
nREPL MCP Server

nREPL MCP Server

by JohanCodinha

nREPL MCP サーバー

Claude DesktopやVSCodeのCLineなどのMCPクライアント向けに設計されたモデルコンテキストプロトコル(MCP)サーバーです。このサーバーは、CLineと併用することで、任意のLLMで使用できます。このサーバーは、実行中のClojure nREPLインスタンスとのインタラクションを可能にし、MCP経由でClojureコードの評価、名前空間の検査、その他のユーティリティを実行できます。


特徴

  • ホストとポートを指定して、実行中の nREPL サーバーに接続します。

  • 指定された名前空間または現在の名前空間内のClojure コードを評価します。

  • tools.namespaceを使用してプロジェクトの名前空間を一覧表示します。

  • ホスト、ポート、セッションの詳細を含むnREPL 接続ステータスを取得します。

  • 任意の Clojure 名前空間内のパブリック変数を検査し、docstring や値などのメタデータを表示します。


Related MCP server: Claude Code Manager WAN

インストールとセットアップ

CLine (VSCode) または Claude Desktop へのインストール

このサーバーをCLineまたはClaude Desktopで使用するには、次の手順に従います。

  1. VSCode またはClaude DesktopでCLineを開きます。

  2. MCP 設定に移動します。

  3. 次の構成で新しい MCP サーバーを追加します。

    {
      "mcpServers": {
        "nrepl-mcp-server": {
          "command": "npx",
          "args": [
            "nrepl-mcp-server"
          ],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
  4. 変更を適用するには、保存してクライアントを再起動します。

これにより、クライアントは標準入出力を介して nREPL MCP サーバーと通信できるようになります。

npx経由でインストール

リポジトリを複製せずにサーバーをすばやく実行するには:

npx nrepl-mcp-server

手動インストール

  1. リポジトリをクローンする

  2. 依存関係をインストールする

    npm install
  3. プロジェクトをビルドする(TypeScriptをJavaScriptに変換する)

    npm run build
  4. サーバーを実行する

    • プロダクション モード: コンパイルされた出力から実行します。

      npm start
    • 開発モード: ライブ変更に ts-node を使用します。

      npm run dev

これによりサーバーが起動し、 STDIOでMCPリクエストをリッスンします。Mcpクライアントが自動的にサーバーを起動します。


アクション

nREPLへの接続

ホストとポートを指定して nREPL サーバーへの接続を確立できるようにします。

Clojureコードの評価

デフォルトの名前空間または指定された名前空間のいずれかで任意の Clojure 式を実行します。

名前空間情報の取得

tools.namespaceを使用して、現在のプロジェクト ディレクトリ内のすべての名前空間を一覧表示します。

パブリック変数の検査

指定された名前空間内のすべてのパブリック変数のメタデータと現在の値を取得します。

nREPL接続ステータスの取得

ホスト、ポート、セッション ID、最後のエラー (ある場合) など、現在の nREPL 接続の詳細を提供します。


リソース

nrepl://status

現在の nREPL 接続に関する次のような情報を提供します:

  • ホストとポート

  • 接続ステータス

  • アクティブセッションID

nrepl://namespaces

プロジェクト ディレクトリで検出されたすべての名前空間を一覧表示します。


貢献

貢献を歓迎します!機能の提案やバグ報告がある場合は、問題を開くか、プルリクエストを送信してください。

ライセンス

このプロジェクトはMITライセンスに基づいてライセンスされています。その条件に従って自由に改変および配布してください。

Available Tools

3 tools
connectB

Connect to an nREPL server. Example: (connect {:host "localhost" :port 1234})

Inputs: host (required), port (required).

eval_formA

Evaluate Clojure code in a specific namespace or the current one. Examples:

  • Define and call a function: {"code": "(defn greet [name] (str "Hello, " name "!"))(greet "World"))"}

  • Reload code: {"code": "(clj-reload.core/reload)"}

  • Evaluate in a specific namespace: {"code": "(clojure.repl.deps/sync-deps)", "ns": "user"}

Inputs: code (required), ns.

get_ns_varsB

Get all public vars (functions, values) in a namespace with their metadata and current values. Example:

  • List main namespace vars: (get_ns_vars {:ns "main"}) Returns a map where keys are var names and values contain:

  • :meta - Metadata including :doc string, :line number, :file path

  • :value - Current value of the var

Inputs: ns (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: connect establishes a connection, eval_form evaluates code, and get_ns_vars inspects namespace variables. There is no overlap or ambiguity between these three functions.

    Naming Consistency4/5

    The naming follows a consistent snake_case pattern (connect, eval_form, get_ns_vars), with all tools using descriptive verb-noun combinations. The minor deviation is that 'connect' is a single verb while others are compound, but this is reasonable given its action.

    Tool Count3/5

    With only 3 tools, the set feels thin for an nREPL server, which typically involves more operations like disconnecting, listing sessions, or handling side effects. However, it covers basic connectivity, evaluation, and inspection, which are core functions.

    Completeness2/5

    The tool surface has significant gaps for an nREPL server: there is no way to disconnect or manage sessions, handle errors or interrupts, load files, or perform other common REPL operations. This limits agents to basic tasks and may cause failures in more complex workflows.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables ISLI agents and MCP clients to dispatch natural-language coding and terminal tasks to a locally-installed Claude Code CLI, supporting both one-shot execution and persistent sessions with workspace and security controls.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Delegates coding tasks to the local Claude Code CLI via MCP, offering run, review, and status tools for MCP-compatible agents.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables voice assistants to start, monitor, message, and approve local Claude Code sessions on your computer, including sessions already open in a terminal. It exposes session management, recaps, approvals, and history search as MCP tools.
      8
      GPL 3.0