Overview
Configuration
Configuration File
Create~/.chatcli/mcp_servers.json:
Extended server capabilities
Beyond the minimum (name, command, args, env, transport, enabled, overrides), each server entry accepts an opt-in set of fields covering the same cases Claude Code, Cline, Cursor, and the AWS EKS MCP server support β tool auto-approval, enabledTools/disabledTools filtering, per-server timeouts, working directory, custom HTTP headers, and HTTP authentication (bearer/basic/header, shared by sse and http), plus metadata (description, tags, category) shown in /mcp status.
Any key outside the typed schema is preserved verbatim across save/load (the Extensions catch-all), so a config copied from another client works without losing vendor-specific annotations.
Full reference with semantics, examples and troubleshooting: MCP Servers Configuration.
Environment Variables
Via Server Flag
Transports
- stdio
- SSE (HTTP+SSE)
- http (Streamable HTTP)
The Use case: Local servers distributed as npm packages, standalone binaries, or scripts.
stdio transport starts a local process and communicates via stdin/stdout using JSON-RPC 2.0:Tool Naming
MCP tools are automatically prefixed withmcp_ and receive a description from the source server:
The
mcp_ prefix prevents collisions with ChatCLIβs native tools.Built-in Overrides (Shadow + Fallback)
When an MCP server provides a tool that replaces a native plugin (e.g.,@webfetch, @websearch), use the overrides field to declare which built-ins it replaces. ChatCLI automatically hides the listed built-ins while the MCP server is connected. If the server disconnects, the built-ins are immediately restored β the user never loses the capability.
Why use overrides?
Withoutoverrides, the LLM sees two tools that do the same thing (e.g., @webfetch and mcp_web_fetch) and picks randomly. With overrides, the behavior is deterministic: the LLM only sees the MCP tool, with no ambiguity.
Configuration
Addoverrides to the MCP server configuration:
- CLI (mcp_servers.json)
- Helm (values.yaml)
- Operator (Instance CRD)
How it works
Shadow sync happens on every conversation turn, not just at startup. This means if the MCP server crashes mid-conversation, the built-ins return on the very next message β no restart needed.
Important rules
| Rule | Detail |
|---|---|
| Exact names | Use the full built-in name including @ (e.g., "@webfetch", not "webfetch") |
| Multiple servers | Different servers can declare different overrides. If two servers override the same built-in, only one needs to be connected to maintain the shadow |
| Disabled server | "enabled": false on the server = overrides do not apply (server never connects) |
| Partial override | You can override just one built-in (e.g., only @websearch) and keep the others visible |
| No effect on @coder | @coder cannot be overridden via MCP β its subcommands are native tools of /coder mode |
Deploy via Helm
- Inline MCP Servers
- Existing ConfigMap
mcp_servers.json and mounts it at /etc/chatcli/mcp/.
Deploy via Operator (Instance CRD)
When using the ChatCLI Operator, configure MCP directly in theInstance resource:
- Generates a ConfigMap
<instance>-mcpwithmcp_servers.json - Mounts at
/etc/chatcli/mcp/(read-only) - Passes
--mcp-config /etc/chatcli/mcp/mcp_servers.jsonto the container
The
MCPSpec CRD mirrors the mcp_servers.json format exactly. Each MCPServerSpec field maps to a JSON field β including overrides for built-in shadowing.Checking Status
The MCP Manager exposes the status of each server:Popular MCP Servers
| Server | Description | Installation |
|---|---|---|
@anthropic/mcp-server-filesystem | File system access | npx -y @anthropic/mcp-server-filesystem /path |
@anthropic/mcp-server-github | GitHub integration | npx -y @anthropic/mcp-server-github |
@anthropic/mcp-server-postgres | PostgreSQL queries | npx -y @anthropic/mcp-server-postgres |
@anthropic/mcp-server-slack | Slack integration | npx -y @anthropic/mcp-server-slack |
MCP in Client Mode (TTY)
MCP now works directly in interactive mode (TTY), not just server mode.
ChatCLI auto-detects
~/.chatcli/mcp_servers.json and initializes servers automatically on startup.| Mode | How it works |
|---|---|
| Chat | Tools listed in system prompt as informational context |
| Agent | Tools invocable via <tool_call name="mcp_<tool>" args='...' /> |
| Coder | Same mechanism as Agent mode |
Deferred Schemas (Token Savings)
To save tokens in the system prompt, ChatCLI uses deferred schemas:- Only name + description are sent in the prompt (lightweight)
- When the model invokes a tool without arguments, the full schema is returned as feedback
- The model then re-invokes with the correct arguments
/mcp Command
Manage MCP servers directly from the interactive terminal. Every subcommand that takes a server name has autocomplete β press Tab after /mcp <subcommand> to list the configured servers.
| Subcommand | Argument | Description |
|---|---|---|
/mcp or /mcp status [name] | Optional | Status of all servers (no name) or a specific one |
/mcp tools [name] | Optional | All tools (no name) or only those of <name> |
/mcp start <name> | Required | Start a stopped server (or one that failed to start) |
/mcp stop <name> | Required | Stop a server without removing it from config β start revives it later |
/mcp restart [name] | Optional | Restart one server (with name) or all (no name) |
/mcp reload | β | Re-read mcp_servers.json and reconcile (same logic as hot-reload, on demand) |
/mcp logs <name> | Required | Last 200 stderr lines from the server (in-memory ring buffer) |
Example: status and logs
Start/stop semantics
| Scenario | Behavior |
|---|---|
/mcp stop foo on a running server | Kills the process, drops its tools; keeps the entry in the manager |
/mcp start foo after stop | Revives using the in-memory config; tools come back |
Hot-reload (JSON edit) while foo is user-stopped | Reload respects the manual stop; restarts only if fooβs config changed |
/mcp restart (no name) | Stop all + start all with a new mcpCtx β equivalent to a full reset |
/mcp restart foo | Stop + start of foo only, preserving the global ctx and the other servers |
| Server that failed at startup (LastError set) | /mcp start foo clears LastError and retries β useful after fixing command/env |
Difference between
/mcp restart and /mcp reload:/mcp restartforces a restart even if the config didnβt change (useful for βreload credentialsβ after editing shell env)./mcp reloadis a diff-and-apply againstmcp_servers.jsonβ nothing that hasnβt changed gets restarted.
Per-server log buffer
Each stdio server keeps a 200-line ring buffer fed from the child processβs stderr. That means:/mcp logs <name>shows the last 200 lines without enabling--debug;- Chatty servers donβt grow memory unboundedly β old lines drop off the front;
- Captures like
npm 404, panic stacks and startup messages stay available even after startup ends.
Push notifications β MCP Channels
Beyond tools (request/response), ChatCLI accepts push notifications from any MCP server across all three transports. Notifications are JSON-RPC messages withoutid (the spec form for βthe server wants to tell me something, it isnβt asking for anything backβ). ChatCLI captures, persists, and automatically injects them into the next conversations, and β optionally β fires the agent via trigger rules.
The essentials
- Works on
stdio,sse, andhttpβ each transport has its own listener:sse: the GET/ssethat already carries tool responses receives notifications on the same stream.http: a separate GET on the endpoint (opt-in by the client, optional by the spec) pulls notifications. Servers that donβt support it respond with 405/404/501 and the listener stops cleanly, no retries.stdio: JSON-RPC lines on stdout withoutidare treated as notifications.
- Durable persistence at
~/.chatcli/mcp/channels.jsonl(up to 10 MiB, rotates, replays on boot). - Auto-injection of the 5 most recent in the system prompt of
chat/agent/coder(uncached so cache isnβt trashed). - Per-server filter:
channelsfield inmcp_servers.jsonaccepts a literal allow-list. - Optional rules engine in
~/.chatcli/mcp/triggers.jsonwith 3 modes:notify(discreet banner, default),confirm(manual yes/no),auto(runs the agent β requires tool whitelist). - Slash commands:
/channel list,/channel ack,/channel pause,/channel rules,/channel confirm <id>,/channel run <seq>,/channel inject.
Minimal example β server with channels
/channel list, show up in the next prompt banner, and are auto-injected into the agent context.
Example β trigger that investigates CI failures
~/.chatcli/mcp/triggers.json:
/channel confirm <id> accepts and the agent starts investigating.
Full channels, rules, and troubleshooting docs: MCP Channels. Complete
channels schema and triggers.json reference: MCP Config.Next steps
MCP Channels
Push messages across all three transports (
stdio, sse, http) with durable persistence, per-server filter, and a rules engine (notify/confirm/auto).Agentic plugins
ChatCLIβs plugin system β compared with MCP.
Native Tool Use
Native Anthropic/OpenAI APIs that power MCP under the hood.
MCP Config
Full
mcp_servers.json format and examples.