Skip to content

Clojure Setup

Practicalli Clojure includes a complete description of a Clojure setup, which installs:

  • Java Virtual Machine
  • Clojure CLI
  • Practicalli Clojure CLI Config

Clojure MCP

https://github.com/bhauman/clojure-mcp and/or https://github.com/bhauman/clojure-mcp-light

Install ClojureMCP

Use an alias (something like this?)

  :ai/clojure-mcp
  {:replace-deps {io.github.bhauman/clojure-mcp
                  {:git/tag "v0.5.1" :git/sha "c9cdd6b"}}
   :exec-fn clojure-mcp.main/start}

TODO: add ai/clojure-mcp alias to Practicalli Clojure CLI Config

Install as a tool

clojure -Ttools install-latest

clojure -Ttools install-latest :lib io.github.bhauman/clojure-mcp :as mcp

CLI tools

Install ripgrep

Register it as an MCP server in your LLM client.

Additional tools

Clojure connected editor

A Clojure connected editor provides the most effective way to write and maintain Clojure projects. The editor connects to (or starts) a Clojure REPL and code can be evaluated as its typed, showing the results instantly in line with the code.

Clojure LSP server generates static analysis of code which editors can surface as code diagnostics. Analysis supports effective code navigate and refactor tools. Practicalli Clojure LSP config configures

Data Inspectors

Data inspectors visualize results of Clojure code evaluation and allow navigation of nested data or paging through large data sets.

Portal is highly recommended data inspector and included in projects generated with Practicalli Project Templates.

Alternative development tools

Leiningen is the long-standing development tool for Clojure. All the code examples in this book should work with Leiningen when a correctly configured project.clj file is created which includes all the necessary library dependencies. Libraries included via aliases should be added as either :dev-dependencies or :aliases in the Leiningen project.clj file.