clojure-mcp  by bhauman

Clojure REPL and coding assistant

Created 5 months ago
568 stars

Top 56.6% on SourcePulse

GitHubView on GitHub
Project Summary

Clojure MCP provides a REPL-driven development experience for Clojure projects, integrating Large Language Models (LLMs) as coding assistants. It aims to transform LLMs into powerful Clojure REPLs and intelligent coding partners, enhancing code editing with syntax-aware patching and linting. The target audience includes Clojure developers seeking to leverage AI for faster iteration, debugging, and code quality improvements.

How It Works

Clojure MCP acts as a Model Context Protocol (MCP) server, connecting AI models to a Clojure nREPL. It offers specialized Clojure editing tools that go beyond basic text manipulation, employing tools like clj-kondo, parinfer, cljfmt, and clj-rewrite for syntax-aware editing, parenthesis balancing, and formatting. This cohesive system provides a "superset" of features found in tools like Claude Code, enabling stateful file tracking and optimized tool interactions for a seamless AI-assisted development workflow.

Quick Start & Requirements

  • Install/Run: Configure an nREPL server in your project (e.g., clojure -M:nrepl) and run the MCP server separately (clojure -X:mcp :port 7888).
  • Prerequisites: Clojure (1.11+), Java (JDK 11+). Recommended: Claude Desktop for best experience.
  • Setup: Installation is described as challenging and alpha-stage. Configuration involves setting up nREPL, installing the MCP server via deps.edn, and configuring an MCP client like Claude Desktop.
  • Links: GitHub Commits, Wiki for other clients.

Highlighted Details

  • REPL-Driven Development: LLMs excel at iterating, validating, and debugging code within the Clojure REPL.
  • Clojure-Aware Editing: Utilizes a pipeline of linters and formatters for significantly improved Clojure code editing acceptance rates.
  • Cohesive Toolset: Designed as an integrated "action space" for AI, not just independent utilities.
  • Stateful File Tracking: Prevents editing conflicts by monitoring file read/write states.

Maintenance & Community

The project is marked as "Alpha Software - Work in Progress" and actively seeks contributions. Links to community resources like Discord/Slack are not explicitly provided in the README.

Licensing & Compatibility

  • License: GNU Affero General Public License v3.0 (AGPL-3.0).
  • Compatibility: Permissive for personal and internal business use. Modifications must be shared under AGPL-3.0. Offering it as a service requires opening the entire service stack.

Limitations & Caveats

The project is in alpha, with expected breaking changes and incomplete documentation. Setup is described as challenging. Agent tools require API keys (OpenAI, Gemini, Anthropic) and incur charges. The Emacs integration is noted as experimental.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
8
Issues (30d)
13
Star History
23 stars in the last 30 days

Explore Similar Projects

Starred by Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
30 more.

developer by smol-ai

0.1%
12k
Agent for embedding a developer in your app
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.