connect
Connect to an nREPL server. Example: (connect {:host "localhost" :port 1234})
Attach to a running nREPL by host and port, evaluate Clojure inside it — including reloads — and read a namespace's public vars back with their doc strings, file and line, and current values.
LABSCO SUMMARY
This is a live connection, not a sandbox: eval_form runs inside the process holding your application's state, which is what separates it from asking a model to reason about the source. get_ns_vars is the read side and it is unusually complete — doc string, file, line and the value a var holds right now, which is the question normally answered by adding a println and restarting. The surface is three tools, so the boundaries are clear: nothing here edits files or manages a project.
A three-tool bridge to an already-running nREPL server: connect, evaluate, inspect a namespace.
A running nREPL server, and its host and port.
One command — npx nrepl-mcp-server
USE CASES
The session attaches to the REPL you have open, and a form is evaluated in the namespace it belongs to, so a change is tested against live state instead of a restart.
Public vars come back with their docstrings, line numbers and file paths alongside the value each one holds at that moment, which is state the source file cannot tell you.
Reload and dependency-sync calls are evaluated in the REPL like any other form, so changed code and newly added dependencies land in the process that is already running.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
connectConnect to an nREPL server. Example: (connect {:host "localhost" :port 1234})
eval_formEvaluate Clojure code in a specific namespace or the current one. Examples:
get_ns_varsGet all public vars (functions, values) in a namespace with their metadata and current values. Example:
Returns a map where keys are var names and values contain:
BEFORE YOU INSTALL
3 tools when we connected.
npx on PATH
CONTEXT COST
Rated by the size of the 3 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"nrepl-mcp-server": {
"command": "npx",
"args": [
"nrepl-mcp-server"
]
}
}
}npx nrepl-mcp-server