18 ms·
Clojure MCP
- fjalahdbtnt 1y agoWhat the hell is the point of a desktop app for a chatbot? I thought there were apis for this sort of thing. If you need to run code locally, why bother paying google to run claude? > I highly recommend using it with Claude Desktop to start. It's prettier and there are no api charges! ???? How does this make sense to anyone
- didibus 1y agoI'm not sure what you are asking exactly? Say you have a Clojure project, it's in a folder on your computer where you likely cloned or initialized a git repo. Now you want to leverage an agentic LLM that can connect to clojure-mcp so you can prompt the LLM to make real edits to your project source files, folder structure, resources, documentation, etc. Your options are kind of limited: - Amazon Q CLI - Claude Code CLI - OpenAI Codex CLI Those are the best. Then you have the IDE based ones, like Cursor, Windsurf, Copilot agent mode (in public preview currently), and so on. What they are saying though is that Claude Desktop also support MCP, and can be used without incurring API charges. Honestly, the in-IDE ones, for me, are not very good, you really don't need this stuff tied up inside an editor. I prefer the CLIs personally, but can see how you can also just as easily run Claude Desktop as a side-bar than need something inside your editor.
- roenxi 1y agoAnd present state isn't even that important. In 2-4 years we'll be 2 hardware generations in the future, people can buy hardware tailored to 2024-25 models and VRAM will be creeping up (or mitigations for low VRAM found). The models something uses today don't tell us much about what a project will look like in 3 years. None of the current crop of leading models are going to last that long. A project might easily be looking at the medium term not the present.
- throwaway314155 1y ago> Your options are kind of limited: - Amazon Q CLI - Claude Code CLI - OpenAI Codex CLI Out of curiosity, which option do you go for?
- didibus 1y agoFor clojure-mcp, you really should try just Claude Desktop. That's because clojure-mcp provides all the tools you need already, reading files, running shell commands, running code in the REPL, running tests, listing directories, linting code, etc. The others I listed above come with a lot of tools baked in, and I'm not sure if they could interfere, like the LLM might prefer one that's bundled to using the clojure-mcp ones. Otherwise I use Amazon Q CLI, because it is the cheapest of the bunch. I'd say Claude Code CLI is the other I'd use personally.
- dotemacs 1y ago> Your options are kind of limited: - Amazon Q CLI - Claude Code CLI - OpenAI Codex CLI Ampcode have a CLI, which is their agent using Claude 4. Google also came out with Jules a few days ago. There's aider, with which you can use whichever LLM you'd like. I'm pretty sure that there are others...
- didibus 1y agoAider does not have MCP support yet. Neither does Jules I believe. Ampcode I heard of, but I also heard it's very expensive, same for Devin. I also don't know if either of them support MCP. I'm sure there are others, of varying quality, but realistically, the options you'd want to use are the ones I listed I think. P.S.: I'd been looking for alternatives by the way, something that lets me use OpenAI models, I've yet to try it but heard good things about: https://block.github.io/goose/ https://block.github.io/goose/
- deleted 1y ago[deleted]
- ihodes 1y agoIf there were an MCP to connect to, say, a running Chrome tab with your frontend running on it, that would allow an agent to both visually inspect and interact with the webpage as well as look at the network and console tabs, etc. That would be hugely helpful. Is there something like that today?
- chrismustcode 1y agoThe playwright MCP
- ihodes 1y agoVery cool—It seems to allow access to the page itself, not to the network or console tabs, correct?
- tosh 1y agoREPL-driven development seems like a natural fit with current agent concepts nb: Bruce also did figwheel, a hot/live reloading tool for Clojurescript https://figwheel.org https://figwheel.org
- pona-a 1y agoI'm no sure, if you mean having the LLM interact with the REPL. REPL requires a lot of discipline from the developer to keep track of its state. LLMs seem to be far worse at this sort of long-term state tracking than most humans. It would likely keep forgetting things, calling undefined functions, or mistaking its own interfaces.
- tosh 1y agoI agree, it’s tricky, but agents are also great at inspecting stuff right now the advice in the readme makes a lot of sense: use git (or similar) for checkpointing a bit like climbing with ropes and anchors
- diggan 1y ago> REPL requires a lot of discipline from the developer to keep track of its state More discipline than what is required when trying to keep track of all of that in your head? Personally I use a REPL because I'm lazy and dumb, and the REPL helps me keep track and makes sure I don't do stupid mistakes. If I wanna know what value a thing has, I just ask the REPL, instead of trying to retrace some logic by reading the code again.
- dkarl 1y agoWhat I don't like about building systems at the REPL is that when I investigate a possibility and it works out, I have to identify the code that's actually needed, clean it up, and turn my ad-hoc tests in the REPL into unit tests. There's a trade-off between quick experimentation and the mess I create in search of immediate feedback. I think an LLM could help with that. Ideally, I could say, "Please add the widget-muckle-frobnicate function from the current REPL session to the codebase. Fix or flag any shortcuts I took in its implementation, such as hardcoding configuration and naming functions 'foo' or 'bar', and add unit tests that include the examples I tried in the REPL as well as property-based tests to exercise edge cases."
- danw1979 1y agoThe point in the readme about using this with Claude Desktop to avoid API charges is a top tip for any coding-through-MCP setup with Claude. I’m not a Clojure user but I’ve set up the Jetbrains MCP server and Claude Desktop has been working really well with it. I added a system prompt telling Claude to inspect the CLAUDE.md (used with Claude Code normally) whenever using Jetbrains to get project context, which is also working out really well.
- rads 1y agoYou might see this and think, "great, another hyped up vibe coding tool". If Clojure is about simplicity and understanding your code deeply (with the end goals of long-term maintenance and reliability), why would you need this? When working with Clojure, I've been using LLMs primarily for two use cases: 1. Search 2. Design feedback The first case is obvious to anyone who's used an LLM chat interface: it's often easier to ask an LLM for the answer than a traditional search engine. The second case is more interesting. I believe the design of a system is more important than the language being used. I'd rather inherit a well-designed codebase in some other language over a poorly designed Clojure codebase any day. Due to the values of Clojure embedded in the language itself and the community that surrounds it, Clojure programmers are naturally encouraged to think first, code second. The problem I've run into with the second case is that it often takes too much effort for me to get the context into the LLM for it to answer my questions in detail. As a result, I tend to reach for LLMs when I have a general design question that I can then translate into Clojure. Asking it specific questions about my existing Clojure code has felt like more effort than it's worth, so I've actually trained myself to make things more generic when I talk to the LLM. This MCP with Claude Code seems like the tipping point where I can start asking questions about my code, not just asking for general design feedback. I hooked this up to a project of mine where I recently added multi-tenancy support (via an :app-id key), which required low-level changes across the codebase. I asked the following question with Claude Code and the Clojure MCP linked here: > given that :app-id is required after setup, are there any places where :app-id should be checked that is missing? It actually gave me some good feedback on specific files and locations in my code for about 10 seconds of effort. That said, it also cost me $0.48. This might be the thing that gets me to subscribe to a Claude Max plan...
- ransom1538 1y agoThis right here. There is a large segment of developers that have not hooked up indexed code, eg: "where I can start asking questions about my code". They treat it like a search engine. What you want is the LLM to INDEX your code. Then you can see the real power of LLMs. Spoiler alert: it is amazing.
- 1y ago
- mark_l_watson 1y agoLooks good and fills a useful niche. Unfortunately for me, I only use Gemini, OpenAI, and local models and this is configured for Claude. I set a calendar reminder to see if other platforms are supported in the future. Off topic, but I have found Google Jules to be useful for Clojure development.
- whalesalad 1y agoIt appears to have support for Gemini and OpenAI, https://github.com/bhauman/clojure-mcp?tab=readme-ov-file#llm-api-keys https://github.com/bhauman/clojure-mcp?tab=readme-ov-file#ll...
- tosh 1y agoI don't think the MCP is inherently tied to Claude, afaiu it should work with any agent/client that has MCP support. Bruce recommends/mentions Claude Desktop specifically because it makes it easy to try out Clojure MCP without having to worry about token cost.
- deleted 1y ago[deleted]
- brucehauman 1y agoUntil you've tried using an LLM assistant fully hooked into a stateful REPL, you can't speculate. The experience is fantastic as the feedback for the code being developed is earlier and tighter. The LLM agent will often write the code for a function and immediately follow that code up with several smoke testing expressions and the eval the whole thing in one go, function and tests. It will creatively setup test harnesses to enable it to exercise code while it's being developed. (think html endpoints, starting and stopping servers, mocking) And it goes on from there. Its an experience, and I submit to the reader that they experience it sooner than later bc its an extremely effective workflow and its AWESOME!
- cldwalker 1y agohttps://www.youtube.com/watch?v=F61YWNapxJg https://www.youtube.com/watch?v=F61YWNapxJg is a cool demo of this. I'm curious how well this repl assistant approach will work with larger codebases
- makizar 1y agoHere's a video with a demo: https://www.youtube.com/watch?v=F61YWNapxJg https://www.youtube.com/watch?v=F61YWNapxJg