nREPL MCP Server logo

nREPL MCP Server

Community
JohanCodinha

nRepl mcp server for clojure. Enables interaction with a running Clojure nREPL instance, allowing evaluation of Clojure code, namespace inspection, and other utilities via MCP.

PublisherJohanCodinha
Repositorynrepl-mcp-server
LanguageTypeScript
Forks
7
Stars
37
Available tools
3
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    nREPL MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 3 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    37 stars and 7 forks from the linked repository.

nREPL MCP Server

A Model Context Protocol (MCP) server designed for MCP clients, such as Claude Desktop or CLine in VSCode. This server can be used with any LLM when used with CLine. This server enables interaction with a running Clojure nREPL instance, allowing evaluation of Clojure code, namespace inspection, and other utilities via MCP.


Features

  • Connect to a running nREPL server by specifying host and port.
  • Evaluate Clojure code in a given namespace or the current one.
  • List project namespaces using tools.namespace.
  • Retrieve nREPL connection status, including host, port, and session details.
  • Inspect public vars in any Clojure namespace, displaying metadata such as docstrings and values.

Installation & Setup

Installing in CLine (VSCode) or Claude Desktop

To use this server with CLine or Claude Desktop, follow these steps:

  1. Open CLine in VSCode or Claude Desktop.
  2. Navigate to the MCP Settings.
  3. Add a new MCP server with the following configuration:
    json
    {
      "mcpServers": {
        "nrepl-mcp-server": {
          "command": "npx",
          "args": [
            "nrepl-mcp-server"
          ],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
  4. Save and restart the client to apply changes.

This will allow the client to communicate with the nREPL MCP server via standard input/output.

Install via npx

To quickly run the server without cloning the repository:

bash
npx nrepl-mcp-server

Manual Installation

  1. Clone the repository

  2. Install dependencies

    bash
    npm install
  3. Build the project (transpiles TypeScript to JavaScript)

    bash
    npm run build
  4. Run the server

    • Production Mode: Runs from compiled output.
      bash
      npm start
    • Development Mode: Uses ts-node for live changes.
      bash
      npm run dev

This starts the server, listening on STDIO for MCP requests. Mcp client will start the server for you.


Actions

Connecting to nREPL

Allows establishing a connection to an nREPL server by specifying a host and port.

Evaluating Clojure Code

Executes arbitrary Clojure expressions in either the default namespace or a specified namespace.

Retrieving Namespace Information

Lists all namespaces in the current project directory using tools.namespace.

Inspecting Public Vars

Fetches metadata and current values for all public vars in a specified namespace.

Fetching nREPL Connection Status

Provides details on the current nREPL connection, including host, port, session ID, and last error (if any).


Resources

nrepl://status

Provides information about the current nREPL connection, including:

  • Host and port
  • Connection status
  • Active session ID

nrepl://namespaces

Lists all namespaces detected in the project directory.


Contributing

Contributions are welcome! If you have feature suggestions or bug reports, please open an issue or pull request.

License

This project is licensed under the MIT License. Feel free to modify and distribute according to its terms.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • connect

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

  • eval_form

    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"}
  • get_ns_vars

    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

Use nREPL MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once nREPL MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add nREPL MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the nREPL MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "johancodinha-nrepl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "nrepl-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the nREPL MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the nREPL MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use nREPL MCP Server to help me with this task?
nREPL MCP Server
Sure. I read it.
Here is what I found using nREPL MCP Server.

Frequently asked questions

What is the nREPL MCP Server MCP server used for?

nREPL MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use nREPL MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use nREPL MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use nREPL MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With nREPL MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect nREPL MCP Server MCP to TypingMind?

nREPL MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does nREPL MCP Server MCP provide in TypingMind?

nREPL MCP Server exposes 3 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use nREPL MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If nREPL MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

nREPL Connection Status

Returns the current nREPL connection status including port and session information

Project Namespaces

Returns a list of all namespaces in the current project

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇