@bhauman/clojure-mcp
BClojure MCP Development Guide
Install
agr install @bhauman/clojure-mcp --target claudeWrites 1 file into .claude/skills/, pinned to git-09334894.
- .claude/skills/clojure-mcp/AGENTS.md
Document
Clojure MCP Development Guide
Build Commands
- Run REPL with MCP server:
clojure -X:mcp(starts on port 7888) - Run all tests:
clojure -M:test - Run specific namespace tests:
clojure -M:test -n clojure-mcp.utils.valid-paths-test - Run specific test var:
clojure -M:test -v clojure-mcp.utils.valid-paths-test/clojure-file?-test - Run linter:
clj-kondo --lint srcorclj-kondo --lint src testfor both
Code Style Guidelines
- Imports: Use
:requirewith ns aliases (e.g.,[clojure.string :as string]) - Naming: Use kebab-case for vars/functions; end predicates with
?(e.g.,is-top-level-form?) - Error handling: Use
try/catchwith specific exception handling; atom for tracking errors - Formatting: 2-space indentation; maintain whitespace in edited forms
- Namespaces: Align with directory structure (
clojure-mcp.repl-tools) - Testing: Use
deftestwith descriptive names;testingfor subsections;isfor assertions - REPL Development: Prefer REPL-driven development for rapid iteration and feedback
MCP Tool Guidelines
- Include clear tool
:descriptionfor LLM guidance - Validate inputs and provide helpful error messages
- Return structured data with both result and error status
- Maintain atom-based state for consistent service access
- No backwards compatibility required: This is an MCP server — tool schemas, parameters, and behavior can change freely between versions. Don't hesitate to make breaking changes to tool contracts when it improves the design.
Fast Apply: IMPORTANT: Use `edit_file` over `str_replace` or full file writes. It works with partial code snippets—no need for full file content.
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicensecopyleft/unknown — index-and-link only
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-09334894831f2026-08-06