-
-
Notifications
You must be signed in to change notification settings - Fork 55
Claude Code
While you can use these tools alongside Claude Code and other code assistants with their own tooling, we recommend trying the Clojure MCP tools independently first to experience their full capabilities.
See the README for more details.
undefined
. To work around this, you can cherry-pick a workaround which converts tool errors to MCP exceptions and allows Claude Code to see the error messages.
# Clone the official repo
git clone https://github.com/bhauman/clojure-mcp.git
# Cherry-pick the error message workaround
cd clojure-mcp
git remote add rads https://github.com/rads/clojure-mcp.git
git fetch rads
git cherry-pick fbdcc73
The following command tells claude
to start the Clojure MCP server and connect to the nREPL that was started in the current directory. Change /path/to/clojure-mcp
to the directory where you cloned clojure-mcp
in the previous step.
claude mcp add clojure-mcp -- /bin/sh -c 'PORT=$(cat .nrepl-port); cd /path/to/clojure-mcp && clojure -X:mcp :port $PORT'
To use the Clojure MCP server, you need to start an nREPL for your project. If you don't already have a way to start an nREPL, there is an example :nrepl
alias in the README. Make sure the nREPL server is running before moving to the next step.
Run the claude
command to start Claude Code and it will start the Clojure MCP server as a subprocess. Since it may take some time to start the MCP server and connect to your nREPL, you can check the status with the /mcp
command:
> /mcp
⎿ MCP Server Status
• clojure-mcp: connected