You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-62Lines changed: 33 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,11 @@ powered by large language models (LLMs).
6
6
7
7
## IMPORTANT UPDATE
8
8
9
-
**Status Update (November 14 2025)**: Recent improvements in Claude Code with Sonnet 4.5 have significantly changed the landscape for AI-assisted Clojure development. This model makes far fewer editing errors and coding logic errors than previous models, reducing the need for specialized clj-rewrite-based editing tools and REPL validation that ClojureMCP was designed to provide.
9
+
**Status Update (November 14 2025)**: Recent improvements in Claude Code with Sonnet 4.5 have reduced it's need for structural editing.
10
10
11
-
**Recommended Starting Point**
11
+
If your are using [Claude Code](https://www.claude.com/product/claude-code) (and I highly recommend that you do), you should start with [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light)
12
12
13
-
**For new users**: I recommend starting with [Claude Code](https://www.claude.com/product/claude-code) paired with [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light), which provides:
14
-
- Automatic correction of occasional delimiter errors
15
-
- nREPL CLI connection script
16
-
- Performance statistics tracking
17
-
18
-
This is my current daily driver and has significantly improved my productivity compared to using Claude Desktop with the full ClojureMCP toolset.
19
-
20
-
**When to Use Full ClojureMCP**
21
-
22
-
ClojureMCP remains valuable for:
23
-
-**Other LLM models** - Models with weaker editing capabilities benefit from the advanced tooling
24
-
-**Desktop environments** - Use with Claude Desktop to see visible tool execution chains and reasoning
25
-
-**Custom assistants** - Building your own code assistance tools
26
-
-**Complete control** - When you need the full suite of Clojure-aware tools
27
-
-**Portable LLM tooling configuration** ClojureMCP provides a portable
28
-
toolset include custom agents, prompts, etc that you can use with any LLM that supports MCP
29
-
30
-
**Future Direction**
31
-
32
-
I'll continue developing ClojureMCP, but will be using Claude Code with clojure-mcp-light for the development work itself. ClojureMCP remains the comprehensive toolkit for Clojure AI assistance across any LLM.
13
+
If your not using Claude Code I still highly recommend you use ClojureMCP.
33
14
34
15
## 🚀 Quick Overview
35
16
@@ -144,26 +125,23 @@ This project implements an MCP server that connects AI models to a
144
125
Clojure nREPL, and specialized Clojure editing tools enabling a unique
145
126
Clojure development experience.
146
127
147
-
Clojure MCP provides a superset of the tools that Claude Code uses,
148
-
so you can use it to work on Clojure **without any other tools**.
149
-
150
-
If using the full ClojureMCP toolset (see [IMPORTANT UPDATE](#important-update) for when this is recommended), I recommend starting with Claude Desktop rather than Claude Code. Claude Desktop lets you see the complete reasoning and tool
151
-
execution chain which is very helpful for understanding how the LLM
152
-
interacts with the tools. Seeing the explicit reasoning and actions is
153
-
invaluable for learning how to work with LLMs as coding assistants.
128
+
Clojure MCP provides a set of tools similar to the tools that Claude
129
+
Code uses, so you can use it to work on Clojure **without any other
130
+
tools**. Just add an LLM loop or client and ClojureMCP provides a set
131
+
of tools that let's you work effectively on Clojure code.
154
132
155
133
## Main Features
156
134
157
135
-**Clojure REPL Connection** - which lints the eval and auto-balances parens
158
-
-**Clojure Aware editing** - Using clj-kondo, parinfer, cljfmt, and clj-rewrite
136
+
-**Clojure Aware editing** - Using parinfer, cljfmt, and clj-rewrite
159
137
-**Optimized set of tools for Clojure Development** superset of Claude Code tools
160
138
161
139
### Why REPL-Driven Development with AI?
162
140
163
141
For Clojurists an LLM assisted REPL is the killer application.
164
142
165
143
With a REPL LLMs can:
166
-
***Iterate** on code in the REPL and when finished present the findings before adding them to your code
144
+
***Iterate** on code in the REPL and then present the findings before adding them to your code
167
145
***Validate** and probe your code for errors
168
146
***Debug** your code in the REPL
169
147
* and much more
@@ -183,28 +161,25 @@ These tools are designed to work with the latest LLM models. For the best experi
183
161
-**Google Gemini** (latest models)
184
162
-**OpenAI** (latest GPT and o-series models)
185
163
186
-
> **Note**: Recent models like Claude Sonnet 4.5 have significantly improved editing capabilities, reducing the need for specialized tooling. See the [IMPORTANT UPDATE](#important-update) section for current recommendations.
187
-
188
-
ClojureMCP's structural editing tools require high model performance,
189
-
so using one of the latest models will significantly improve
190
-
your experience.
191
-
192
-
I personally use the latest Claude models for almost everything,
193
-
and I'm subscribed to Anthropic's professional plan. The value
194
-
I get out of it is far more than what I'm paying.
164
+
I personally use the latest Claude models for almost everything, and
165
+
I'm subscribed to Anthropic's Max. The value I get out of it is far
166
+
more than what I'm paying.
195
167
196
168
### Using with Claude Code and Other Code Assistants
197
169
198
170
ClojureMCP can be used with almost any LLM client like Claude Desktop,
199
171
Claude Code and many many more.
200
172
201
-
**For Claude Code users**: See the [IMPORTANT UPDATE](#important-update) section for the recommended [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light) approach, which provides minimal integration optimized for Claude Code's improved editing capabilities with Sonnet 4.5.
173
+
**For Claude Code users**: I recommended [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light) approach, which provides minimal integration optimized for Claude Code.
202
174
203
175
**For Claude Desktop users**: ClojureMCP works excellently with Claude Desktop, where you can read the tool outputs more clearly and understand how well the tools are performing and working together to enable an LLM to behave as an effective Clojure coding assistant.
204
176
205
177
**For other LLM clients**: The full ClojureMCP toolset described in this document is particularly beneficial when using other LLM models or clients that can benefit from the specialized editing tools.
206
178
207
-
I recommend **trying the recommended approach for your client first** (clojure-mcp-light for Claude Code, or full ClojureMCP for Claude Desktop/other models) to understand the capabilities. Once you're comfortable, you can make informed decisions about whether to customize your toolset based on your specific workflow needs.
179
+
I still recommend **trying Claude Desktop** first if you are new to
180
+
working with LLMs as code assitants. Claude Desktop provides a
181
+
transparent LLM tool loop where you can see what the LLM is doing and
182
+
nothing is hidden.
208
183
209
184
## Help and Community Resources
210
185
@@ -223,9 +198,7 @@ I recommend **trying the recommended approach for your client first** (clojure-m
223
198
224
199
# Setting up ClojureMCP
225
200
226
-
> **⚠️ For New Users**: Before proceeding with this installation, please review the [IMPORTANT UPDATE](#important-update) section. If you're using Claude Code with Sonnet 4.5, you may want to start with [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light) instead, which provides a simpler setup optimized for modern models. The instructions below are for the full ClojureMCP toolkit.
227
-
228
-
Setting up ClojureMCP can be challenging as it is currently in alpha and not optimized for quick installation. This guide will walk you through the process step by step.
201
+
This guide will walk you through the process step by step.
229
202
230
203
## Installation Overview
231
204
@@ -252,8 +225,6 @@ Add an `:nrepl` alias to your project's `deps.edn`:
252
225
;; Include all paths you want available for development
253
226
:nrepl {:extra-paths ["test"]
254
227
:extra-deps {nrepl/nrepl {:mvn/version"1.3.1"}}
255
-
;; this allows nrepl to interrupt runaway repl evals
256
-
:jvm-opts ["-Djdk.attach.allowAttachSelf"]
257
228
:main-opts ["-m""nrepl.cmdline""--port""7888"]}}}
258
229
```
259
230
@@ -492,15 +463,24 @@ If you need to source environment variables (like API keys see [LLM API Keys](#l
492
463
}
493
464
```
494
465
466
+
## Turn Claude Desktop Capabilities off
467
+
468
+
**Code Execution and file creation**: `off`
469
+
470
+
Code execution and file creation provides tools that compete with
471
+
ClojureMCP and its best to turn them off.
472
+
473
+
Go to settings > Capabilities > Code Execution and file creation and toggle it off.
474
+
475
+
You may also want to trun **Artifacts** off as well.
476
+
495
477
### Other Clients besides Claude Desktop
496
478
497
479
See the [Wiki](https://github.com/bhauman/clojure-mcp/wiki) for
498
480
information on setting up other MCP clients.
499
481
500
482
## Starting a new conversation
501
483
502
-
> **Note**: This section applies when using the full ClojureMCP toolset. If you're using clojure-mcp-light with Claude Code, refer to the [clojure-mcp-light documentation](https://github.com/bhauman/clojure-mcp-light) instead.
503
-
504
484
Once everything is set up I'd suggest starting a new chat in Claude.
505
485
506
486
The first thing you are going to want to do is initialize context
@@ -515,8 +495,7 @@ In Claude Desktop click the `+` tools and optionally add
515
495
Then start the chat.
516
496
517
497
I would start by stating a problem and then chatting with the LLM to
518
-
interactively design a solution. You can ask Claude to "propose" a
519
-
solution to a problem.
498
+
interactively design a solution. You can ask Claude to "present a solution for my review".
520
499
521
500
Iterate on that a bit then have it either:
522
501
@@ -534,7 +513,7 @@ D. ask to commit the changes.
534
513
535
514
## 📜 Development Practices
536
515
537
-
### Recommended Workflow
516
+
### A Workflow
538
517
539
518
1.**Express the problem** - Clearly state what you want to solve
540
519
2.**Develop in the REPL** - Work through solutions incrementally
@@ -741,8 +720,6 @@ Success!
741
720
742
721
> This is NOT required to use the Clojure MCP server.
743
722
744
-
> **Note**: These agent tools were designed for older models with weaker capabilities. With modern models like Sonnet 4.5, you may find less need for them. See [IMPORTANT UPDATE](#important-update).
745
-
746
723
> IMPORTANT: if you have the following API keys set in your
747
724
> environment, then ClojureMCP will make calls to them when you use
748
725
> the `dispatch_agent`,`architect` and `code_critique` tools. These
@@ -806,17 +783,12 @@ Personally I `source` them right in bash command:
806
783
807
784
## Learning Curve
808
785
809
-
> **Note**: The learning curve described below is most relevant for older LLM models or when using ClojureMCP with Claude Desktop. With modern models like Sonnet 4.5 and clojure-mcp-light, the experience is more straightforward. See [IMPORTANT UPDATE](#important-update).
810
-
811
-
> This tool has a learning curve. You may in practice have to remind
812
-
> the LLM to develop in the REPL. You may also have to remind the LLM
786
+
> This tool has a learning curve. You may also have to remind the LLM
813
787
> to use the `clojure_edit` family of tools which have linters build
814
788
> in to prevent unbalanced parens and the like.
815
789
816
790
## 🧰 Available Tools
817
791
818
-
> **Note**: The full ClojureMCP toolkit includes many specialized tools. **If you're using Claude Code with Sonnet 4.5**, you may only need the lightweight tools from [clojure-mcp-light](https://github.com/bhauman/clojure-mcp-light). The tools below represent the complete suite for use with Claude Desktop or other LLM models.
819
-
820
792
The default tools included in `main.clj` are organized by category to support different workflows:
821
793
822
794
### Read-Only Tools
@@ -827,7 +799,6 @@ The default tools included in `main.clj` are organized by category to support di
827
799
|`read_file`| Smart file reader with pattern-based exploration for Clojure files | Reading files with collapsed view, pattern matching |
828
800
|`grep`| Fast content search using regular expressions | Finding files containing specific patterns |
829
801
|`glob_files`| Pattern-based file finding | Finding files by name patterns like `*.clj`|
830
-
|`think`| Log thoughts for complex reasoning and brainstorming | Planning approaches, organizing thoughts |
831
802
832
803
### Code Evaluation
833
804
@@ -842,7 +813,7 @@ The default tools included in `main.clj` are organized by category to support di
842
813
|-----------|-------------|---------------|
843
814
|`clojure_edit`| Structure-aware editing of Clojure forms | Replacing/inserting functions, handling defmethod |
844
815
|`clojure_edit_replace_sexp`| Modify expressions within functions | Changing specific s-expressions |
845
-
|`file_edit`| Edit files by replacing text strings |Simple text replacements|
816
+
|`file_edit`| Edit files by replacing text strings |parinfer repair after edit if needed|
846
817
|`file_write`| Write complete files with safety checks | Creating new files, overwriting with validation |
0 commit comments