ClojureMCP allows fine-grained control over which tools, prompts, and resources are exposed to AI assistants through configuration options in .clojure-mcp/config.edn. This is useful for creating focused MCP servers with only the components you need.
Component filtering uses an allow/deny list pattern:
- Enable lists (
enable-*) - When specified, ONLY these items are enabled - Disable lists (
disable-*) - Applied after enable filtering to remove specific items - Default behavior - When no filtering is specified, all components are enabled
The filtering logic follows this order:
- If an enable list is provided and empty (
[]), nothing is enabled - If an enable list is provided with items, only those items are enabled
- If no enable list is provided (
nil), all items start enabled - The disable list is then applied to remove items from the enabled set
Control which tools are available to the AI assistant.
{:enable-tools [:clojure_eval :read_file :file_write] ; Only these tools
:disable-tools [:dispatch_agent :architect]} ; Remove these toolsTools can be specified using keywords or strings:
:clojure_evalor"clojure_eval":read_fileor"read_file":file_writeor"file_write"
Common tool IDs include:
:clojure_eval- Evaluate Clojure code:read_file- Read file contents:file_edit- Edit files:file_write- Write files:bash- Execute shell commands:grep- Search file contents:glob_files- Find files by pattern:dispatch_agent- Launch sub-agents:architect- Technical planning:code_critique- Code review:scratch_pad- Persistent storage
Minimal REPL-only server:
{:enable-tools [:clojure_eval]}Read-only exploration server:
{:enable-tools [:read_file :grep :glob_files :LS :clojure_inspect_project]}Full access except agents:
{:disable-tools [:dispatch_agent :architect :code_critique]}Control which system prompts are provided to the AI assistant.
{:enable-prompts ["clojure_repl_system_prompt" "chat-session-summarize"]
:disable-prompts ["scratch-pad-save-as"]}Prompts are identified by their string names (not keywords):
"clojure_repl_system_prompt"- Main REPL interaction prompt"chat-session-summarize"- Session summarization"scratch-pad-load"- Loading scratch pad data"scratch-pad-save-as"- Saving scratch pad snapshots
Essential prompts only:
{:enable-prompts ["clojure_repl_system_prompt"]}Disable scratch pad prompts:
{:disable-prompts ["scratch-pad-load" "scratch-pad-save-as"]}Control which resource files are exposed to the AI assistant.
{:enable-resources ["PROJECT_SUMMARY.md" "README.md"]
:disable-resources ["CLAUDE.md" "LLM_CODE_STYLE.md"]}For now, resources are identified by their string names (not URIs or paths):
"PROJECT_SUMMARY.md"- Project overview"README.md"- Main documentation"CLAUDE.md"- Claude-specific instructions"LLM_CODE_STYLE.md"- Coding style guide
Only project documentation:
{:enable-resources ["PROJECT_SUMMARY.md" "README.md"]}Remove AI-specific resources:
{:disable-resources ["CLAUDE.md" "LLM_CODE_STYLE.md"]}- Model Configuration - Configure custom LLM models
- Tools Configuration - Configure tool-specific settings
- Creating Custom MCP Servers - Build servers with custom filtering