-
-
Notifications
You must be signed in to change notification settings - Fork 39
OpenCode
zikajk edited this page Jun 7, 2025
·
3 revisions
OpenCode is a powerful AI coding agent. Built for the terminal.
It offers a nicer GUI than Claude Code and is written in Go. In my experience, it provides superior Clojure syntax highlighting compared to Claude.
Create / edit ~/.opencode.json
and add clojure-mcp
configuration there.
- This is an example config file:
{
"data": {},
"mcpServers": {
"clojure-mcp": {
"command": "/bin/sh",
"env": [],
"args": [
"-c",
"cd /Users/john/clojure-mcp && clojure -X:mcp :port 7888"
],
"type": "stdio",
"url": "",
"headers": null
}
},
"lsp": {
"clojure": {
"disabled": true,
"command": "clojure-lsp",
"args": null,
"options": null
}
},
"agents": {
"coder": {
"model": "openrouter.gemini-2.5-flash",
"maxTokens": 0,
"reasoningEffort": ""
},
"task": {
"model": "openrouter.gemini-2.5-flash",
"maxTokens": 0,
"reasoningEffort": ""
},
"title": {
"model": "openrouter.gemini-2.5-flash",
"maxTokens": 0,
"reasoningEffort": ""
}
},
"tui": {
"theme": "opencode"
},
"shell": {}
}
- The most relevant section is
"mcpServers"
setting. - While there's also an
lsp
section, OpenCode crashed for me when enabled, so I've kept it disabled. You might have better luck enabling it. - Run OpenCode with the debug option (
opencode -d
). If you don't encounter errors and have your REPL running on:7888
, you should be all set.