-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I’m seeing a crash in clojure-mcp when connecting to an nREPL that was started with CIDER middleware enabled.
The MCP server throws ex-info "No project directory!!" and kills the REPL process.
The same setup works correctly if CIDER middleware is removed.
This looks like an incompatibility between clojure-mcp’s project directory detection and cider.nrepl/cider-middleware.
Version used:
v0.1.12
Reproduction Steps
1. deps.edn (project directory)
{:aliases
{:nrepl
{:extra-deps
{nrepl/nrepl {:mvn/version "1.5.1"}
cider/cider-nrepl {:mvn/version "0.58.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.11.0"}}
:main-opts
["-m" "nrepl.cmdline"
"--middleware" "[refactor-nrepl.middleware/wrap-refactor]"
"--middleware" "[cider.nrepl/cider-middleware]" ;; the issue disappears when this middleware is commented out
"--port" "7888"]}}}2. Start nREPL (this works by itself)
clojure -M:nrepl --port 78883. Start clojure-mcp
clojure -X:mcp4. Result
The MCP server fails with:
ex-info: No project directory!!and the REPL process is terminated.
Expected behavior
Clojure-mcp should correctly determine the project directory.
coderabbitai
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working