Skip to main content
Glama

nREPL MCP Server

by JohanCodinha

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:
    { "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:

npx nrepl-mcp-server

Manual Installation

  1. Clone the repository
  2. Install dependencies
    npm install
  3. Build the project (transpiles TypeScript to JavaScript)
    npm run build
  4. Run the server
    • Production Mode: Runs from compiled output.
      npm start
    • Development Mode: Uses ts-node for live changes.
      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.

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

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.

  1. Features
    1. Installation & Setup
      1. Installing in CLine (VSCode) or Claude Desktop
      2. Install via npx
      3. Manual Installation
    2. Actions
      1. Connecting to nREPL
      2. Evaluating Clojure Code
      3. Retrieving Namespace Information
      4. Inspecting Public Vars
      5. Fetching nREPL Connection Status
    3. Resources
      1. nrepl://status
      2. nrepl://namespaces
    4. Contributing
      1. License

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
          Last updated -
          18
          1,398
          699
          TypeScript
          MIT License
        • -
          security
          A
          license
          -
          quality
          Connects Reaper projects to an MCP client like Claude Desktop, allowing users to ask questions and retrieve parsed information about the projects using natural language.
          Last updated -
          11
          Python
          MIT License
        • -
          security
          F
          license
          -
          quality
          An MCP server that connects to your Notion knowledge base, allowing you to query and retrieve information directly from VSCode using the Cline extension.
          Last updated -
          Python
          • Apple
        • -
          security
          A
          license
          -
          quality
          An MCP server that provides seamless integration with the Neo N3 blockchain, allowing Claude to interact with blockchain data, manage wallets, transfer assets, and invoke smart contracts.
          Last updated -
          22
          3
          MIT License
          • Linux
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/JohanCodinha/nrepl-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server