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.chatcli acp— an ACP (Agent Client Protocol) server, for editors.
chatcli mcp-server
Exposes ChatCLI as an MCP server (revision 2024-11-05). The key point: it’s not just Q&A — it exposes ChatCLI’s real functionality as MCP tools.
Exposed tools
| Tool | What it does |
|---|---|
ask_chatcli | Ask the model (chat, no tools). Keeps server-side history per session. |
agent_task | Run the full agent (ReAct) loop on a task — the agent autonomously uses its tools (read, search, shell via coder, web, memory) and returns the transcript. For multi-step work. |
coder_task | Run the coder loop on a task (focused on reading/editing code in the workspace). |
read, search, tree, websearch, webfetch | The curated built-in tools (read-only/safe), exposed individually. |
The agent and coder render to stdout; the backend captures that output during the run and returns it as the tool result. The JSON-RPC server keeps its own copy of the original stdout, so the protocol channel is never corrupted.
Backend (provider/model)
The backend usesLLM_PROVIDER / LLM_MODEL (or the global config) to pick the model. If full ChatCLI initialization fails, chat (ask_chatcli) still works; agent/coder/tools become unavailable and return a clear error.
Configuring an MCP client
chatcli acp
Exposes ChatCLI over the Agent Client Protocol (stdio): initialize, session/new, session/prompt, with the agent’s replies streamed as session/update. Use it in editors that speak ACP.
See also
- MCP Integration — ChatCLI as an MCP client
- Environment Variables —
LLM_PROVIDER,LLM_MODEL - Command Reference — external subcommands