What I'm building#
An external orchestrator that starts t3 threads for automated work. Some of those threads
must run with a narrow MCP surface: a worker that reaches exactly one server and provably
not the operator's others — production database servers among them.
Problem#
For Claude Code, t3 passes the server set per process (--mcp-config <inline JSON>), and
Claude Code additionally offers --strict-mcp-config to suppress inherited configuration.
For Codex, t3 passes -c mcp_servers.<name>..... For Grok there is no equivalent: t3 starts
the session over ACP and session/new carries mcpServers, but the Grok CLI (1.0.40)
admits that list on top of what it already has (admit_client_mcp_servers) instead of
substituting it.
Everything else in the Grok CLI that looks like an answer is not one: a project-level
.grok/config.toml replaces entries by name only, disabled_mcp_servers is a user-layer
key, and there is no --strict-mcp-config equivalent.
Net effect: a Grok session started by t3 inherits the user's full MCP server set, including
servers imported through [compat.claude] / [compat.cursor]. A client can neither scope
that session nor verify that it is scoped.
Workaround, and why it is not enough#
[compat.claude] mcps = false + [compat.cursor] mcps = false in ~/.grok/config.toml.
Verified at both layers: config (every compat-imported server disabled) and live session
(connected set becomes t3-code and nothing else). That is acceptable on a machine
dedicated to t3, but it is machine-global rather than per session, and it disables the
compat import for anyone who also uses Grok interactively.
Ask#
Either (a) spawn Grok with an isolated config root — a t3-owned GROK_HOME — so the session
sees only what t3 declares, or (b) if the strictness has to come from the Grok CLI itself,
document that t3-started Grok sessions inherit user-level MCP servers, so clients that need
a scoped session can fail closed instead of assuming.
Thanks for the precise report — this is a real isolation gap, and it is not a duplicate of #7746.
What t3 does today#
On Grok session start, t3 already injects the thread-scoped
t3-codeMCP server on ACPsession/new(and the load/resume paths):apps/server/src/provider/Layers/GrokAdapter.tsapps/server/src/provider/acp/AcpSessionRuntime.tsSpawn (
apps/server/src/provider/acp/GrokAcpSupport.ts) forwards the instance environment and does not set a t3-ownedGROK_HOME.GrokSettingsalso has no first-classhomePath(unlike CodexCODEX_HOME/ ClaudeCLAUDE_CONFIG_DIR).So t3 is doing the ACP-correct thing: declare
mcpServers. Merge-vs-replace is Grok CLI behavior (admit_client_mcp_serverson 1.0.40), including[compat.claude]/[compat.cursor]. There is no Grok--strict-mcp-config.#7746 / #9154 only stopped the health check from calling
session/new. Live threads still inherit user MCP.Claude / Codex nuance#
The comparison is directionally right, but t3 is not fully strict there either:
mcpServers: { t3-code }and still load user/project/local setting sources.--strict-mcp-configis used on the capabilities probe, not every chat session.-c mcp_servers.t3-code.*; that is additive unless the instance uses a separatehomePath.The Grok-specific hole is: no CLI strict flag and no first-class home setting / user doc, so an orchestrator cannot fail closed from public docs.
Why a default isolated
GROK_HOMEis the wrong default#Auth, skills (
grok inspect), sessions/plans, and usage all live under~/.grok(GROK_HOME). Forcing a hidden t3 home on every Grok thread would drop login/skills for interactive use. Codex/Claude isolation is an explicit per-instance home, not a silent override.Workarounds#
[compat.claude] mcps = false+[compat.cursor] mcps = falseyou verified — fine on a dedicated host, not per-session.GROK_HOMEpointed at a stripped config (Grok already merges instance env inGrokDriver). Auth must be set up in that home, or useXAI_API_KEY. That is undocumented and has no Settings field.Next step#
session/newaddst3-code.homePath(same shape as Claude/Codex) for a dedicated worker instance.Not treating this as a t3 wiring bug. Leaving it open as enhancement + docs + upstream.