nREPL MCP

v1.0.0Developer Toolsstable

Enables interaction with a running Clojure nREPL instance for evaluating Clojure code, inspecting namespaces, and retrieving connection statuses, compatible with MCP clients like Claude Desktop and CLine in VSCode.

nrepl-mcp-servermcpai-integration
Share:
35
Stars
0
Downloads
0
Weekly
0/5

What is nREPL MCP?

nREPL MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables interaction with a running clojure nrepl instance for evaluating clojure code, inspecting namespaces, and retrieving connection statuses, compatible with mcp clients like claude desktop and cl...

Enables interaction with a running Clojure nREPL instance for evaluating Clojure code, inspecting namespaces, and retrieving connection statuses, compatible with MCP clients like Claude Desktop and CLine in VSCode.

This server falls under the Developer Tools and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables interaction with a running Clojure nREPL instance fo

Use Cases

Evaluate Clojure code in running nREPL instances.
Inspect Clojure namespaces and explore libraries.
Debug Clojure applications interactively.
JohanCodinha

Maintainer

LicenseISC License
Languagetypescript
Versionv1.0.0
UpdatedMar 3, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx nrepl-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use nREPL MCP

The nREPL MCP Server connects AI assistants to a live running Clojure nREPL instance, enabling evaluation of Clojure expressions, namespace inspection, variable introspection, and connection status monitoring through the Model Context Protocol. It bridges MCP clients like Claude Desktop and CLine in VSCode directly into your running Clojure application, making it possible to interactively explore and debug Clojure programs without leaving the AI chat interface. It communicates over STDIO and requires a pre-running nREPL server to connect to.

Prerequisites

  • Node.js 18 or later installed
  • A running Clojure nREPL server (started via lein repl, clj -M:nrepl, or your build tool)
  • The nREPL host and port (typically localhost:7888 or as shown in your REPL output)
  • An MCP client such as Claude Desktop or CLine in VSCode
1

Start your Clojure nREPL server

Before connecting, ensure your Clojure project has a running nREPL server. Note the host and port it starts on.

# With Leiningen:
lein repl

# With Clojure CLI tools:
clj -M:nrepl
2

Add the server to your MCP client config

Add the nrepl-mcp-server entry to your Claude Desktop or CLine MCP settings file. The server is launched automatically by the MCP client.

{
  "mcpServers": {
    "nrepl-mcp-server": {
      "command": "npx",
      "args": ["nrepl-mcp-server"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
3

Restart your MCP client

Restart Claude Desktop or reload CLine in VSCode so it picks up the new MCP server configuration.

4

Connect to the running nREPL instance

Ask Claude to connect to your nREPL server by providing the host and port. The server exposes a connect tool that establishes the REPL session.

5

Evaluate Clojure code and inspect namespaces

Once connected, you can ask Claude to evaluate expressions, list project namespaces, inspect public vars, or check connection status.

nREPL MCP Examples

Client configuration

Claude Desktop or CLine JSON config for the nREPL MCP server.

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

Prompts to try

Example prompts once connected to a running Clojure nREPL session.

- "Connect to my nREPL server at localhost port 7888"
- "Evaluate (+ 1 2 3) in the default namespace"
- "List all namespaces in this Clojure project"
- "Inspect the public vars in the myapp.core namespace"
- "Evaluate (def x 42) and then show me the value of x"
- "What is the current nREPL connection status?"

Troubleshooting nREPL MCP

Connection to nREPL fails with 'connection refused'

Ensure your Clojure nREPL server is running before asking Claude to connect. Verify the host and port match the output shown when you started lein repl or clj -M:nrepl.

npx nrepl-mcp-server command not found or fails to start

Ensure Node.js 18+ is installed and npx is available. If the package fails to download, try running npm install -g nrepl-mcp-server and using command: "nrepl-mcp-server" without npx.

Namespace listing returns empty or missing namespaces

The namespace listing uses clojure.tools.namespace; ensure your project has this dependency available in the nREPL classpath. Load your project namespaces first with (require 'myapp.core) before listing.

Frequently Asked Questions about nREPL MCP

What is nREPL MCP?

nREPL MCP is a Model Context Protocol (MCP) server that enables interaction with a running clojure nrepl instance for evaluating clojure code, inspecting namespaces, and retrieving connection statuses, compatible with mcp clients like claude desktop and cline in vscode. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install nREPL MCP?

Follow the installation instructions on the nREPL MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with nREPL MCP?

nREPL MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is nREPL MCP free to use?

Yes, nREPL MCP is open source and available under the ISC License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "nrepl-mcp-server": { "command": "npx", "args": ["-y", "nrepl-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use nREPL MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides