These are two external subcommands, both speaking JSON-RPC over stdio (stdin/stdout carry the protocol; all logging goes to the file logger):
chatcli mcp-server(aliasmcp-serve) — an MCP (Model Context Protocol) server. Negotiates revision2025-03-26or2024-11-05.chatcli acp— an ACP (Agent Client Protocol) server, for editors (Zed) and agent-to-agent use.
chatcli mcp-server
Exposes ChatCLI’s entire capability surface — not a curated subset:
Harness tools
The
quality parameter maps to the CHATCLI_QUALITY_* namespace, so a caller can turn on plan, refine, verify, reflexion, convergence and lessons for a single run:
Every plugin tool
All registered built-in and external plugins are advertised individually (37 on a default build): files (read, search, tree, coder), web (websearch, webfetch, http, api-explorer), memory (memory, recall), knowledge (knowledge, context, compress, docs-flatten), visuals (diagram, graphview, image), plus moa, lsp, scheduler, session, osv, wikipedia, registry-tags, todo, tools, channels, send, proc, skill, speak…
- Each tool carries its usage embedded in the description and a
readOnlyHintannotation derived from ChatCLI’s per-plugin capability metadata. - Arguments follow the same contract the agent uses: a JSON envelope (
{"cmd":"read","args":{...}}) or a flat string. - Interactive tools that require a live terminal (
ask,voice,park) are never exposed — over stdio they would hang forever.
Exposure policy — CHATCLI_MCP_TOOLS
Skills as MCP prompts
Every installed skill is served throughprompts/list / prompts/get — the client can pull ChatCLI’s whole skill catalog as ready-to-use prompts.
Local state as MCP resources — chatcli://
Everything the user built in ChatCLI is browsable read-only through resources/list / resources/read:
Mutations go through the tools surface (
memory, context, manage_session, …). CHATCLI_MCP_RESOURCES=off disables the resources surface entirely.
Cross-channel continuity — the conversation hub
The server joins the conversation hub in resume mode: it adopts the principal’s active conversation instead of rotating it, so a thread started in the interactive REPL or on a gateway channel (Telegram, Slack…) continues seamlessly from any MCP client — and the turns made over MCP show up back in the REPL.CHATCLI_MCP_HUB=off opts out; CHATCLI_MCP_HUB_PRINCIPAL isolates the MCP thread under its own principal.
Unattended safety — CHATCLI_MCP_DANGER
stdin carries the protocol, so the server runs unattended (every interactive confirmation auto-approves, like the gateway daemon). Dangerous commands in coder_task exec calls are always hard-blocked regardless of policy; for the remaining shell-command gate, CHATCLI_MCP_DANGER=block declines dangerous commands in-band (the model sees the refusal and replans) instead of auto-approving. Default is allow, matching the gateway.
No provider configured? Still useful
An MCP client brings its own model — ChatCLI’s direct tools don’t need a local LLM. Without any key/OAuth in ChatCLI, the LLM-backed tools (ask_chatcli, agent_task, coder_task) are simply hidden from tools/list, and every direct tool keeps working (persistent memory, knowledge bases, LSP, diagrams, scheduler… driven by the caller’s model). Configure a provider and restart to enable the harness tools.
Connecting from Claude Code
The agent and coder render to stdout; the backend captures that output during the run and returns it as the tool result. Direct tool calls are stdout-captured too, so a chatty plugin can never corrupt the protocol channel. Long-running calls don’t block the read loop — requests dispatch concurrently, which is what makes cancellation work.
chatcli acp
A full Agent Client Protocol server: sessions, modes, live streaming and cancellation.
- Modes per session — advertised on
session/new, switched withsession/set_mode:chat— direct model conversation, no tools.agent(default) — the full autonomous loop with every ChatCLI tool.coder— the coding-focused loop.
- Live streaming — agent/coder transcripts stream as
agent_message_chunkupdates while the loop works. - Cancellation —
session/cancelinterrupts an in-flight prompt (stopReason: "cancelled").
See also
- MCP Integration — ChatCLI as an MCP client, including
chatcli mcp add - Environment Variables —
LLM_PROVIDER,LLM_MODEL,CHATCLI_MCP_TOOLS - Command Reference — external subcommands