Logo di nREPL MCP Server

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.

Pubblicato daJohanCodinha
Repositorynrepl-mcp-server
LinguaTypeScript
Fork
7
Stelle
37
Strumenti disponibili
3
Tipo di trasportostdio
Categorie
Link
  • Collega gli strumenti ai flussi di lavoro IA

    nREPL MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 3

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 37; fork: 7 (repository collegato).

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.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

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

Strumenti disponibili

  • 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

Usa nREPL MCP Server MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso nREPL MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi nREPL MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di nREPL MCP Server.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "johancodinha-nrepl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "nrepl-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di nREPL MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di nREPL MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare nREPL MCP Server per aiutarmi con questa attività?
nREPL MCP Server
Certo. L’ho letto.
Ecco cosa ho trovato con nREPL MCP Server.

Domande frequenti

A cosa serve il server MCP nREPL MCP Server?

nREPL MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP nREPL MCP Server con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare nREPL MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP nREPL MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando nREPL MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP nREPL MCP Server a TypingMind?

nREPL MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP nREPL MCP Server in TypingMind?

Strumenti MCP disponibili per nREPL MCP Server: 3. Puoi attivarli dalla pagina Plugin di TypingMind e usarli in chat o assegnarli agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP nREPL MCP Server?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se nREPL MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

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

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇