Wire chachaml's MCP server into Claude Code so the agent can read your runs, models, and tags directly.
After ~5 minutes of config, you can ask Claude things like:
"Which run in the iris experiment has the best F1?" "Compare runs abc and def — which params changed?" "Add a
reviewed=yestag to the production version of kmeans-prod."
…and it answers from your actual chachaml store.
claude on your PATH).clojure CLI on your PATH (Claude Code will exec it).Before involving Claude, verify the server starts and answers a
tools/list request:
cd /path/to/your/project
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | clojure -M:mcp
You should see a JSON response listing 16 tools (list_runs,
get_run, compare_runs, ...). If this errors or hangs, fix that
before continuing.
.claude/mcp.jsonInside your project (or ~/.claude/ for a user-wide config), create
or edit .claude/mcp.json:
{
"mcpServers": {
"chachaml": {
"command": "clojure",
"args": ["-M:mcp"],
"cwd": "/absolute/path/to/your/project"
}
}
}
Notes:
cwd must be absolute. Relative paths are resolved relative to
Claude Code's working directory, not yours.chachaml.db lives somewhere unusual, pass the path as an
arg: "args": ["-M:mcp", "/path/to/store.db"].DB_TYPE, JDBC_URL,
DB_USER, DB_PASSWORD env vars in an "env" map — same vars
the UI Docker setup uses.MCP config is read at startup. Quit and reopen Claude Code (or run
/mcp to inspect connected servers).
> Show me the most recent runs in the kmeans experiment.
Claude should respond with a table of runs, having called
list_runs under the hood. You can verify the tool call in the MCP
panel.
The MCP server has limited write capability — add_tag, set_note,
create_experiment — but never touches params, metrics, or
artifacts (those are append-only). Try:
> Find the run with the lowest final-inertia and tag it "champion".
Claude calls best_run then add_tag.
See the Troubleshooting page. The most common gotchas:
mcp.json.cwd is relative or wrong.The same JSON-RPC server works with any MCP-compatible client:
Settings → MCP → Add Server, point at the same
command.~/.continue/config.json under
mcpServers.The contract is JSON-RPC over stdio; whatever MCP-aware client you use should "just work" if it can spawn a subprocess.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |