feat(mcp): pre-approve the whole wick MCP server for spawned agents (mcp__wick)#606
Merged
Merged
Conversation
The spawn allowlist (wickMCPAllowedTools) enumerated only five meta-tools, so the new wick_manager_* tools (and wick_info, ask_user, wick_skill_*, wick_encrypt/decrypt) were not pre-approved — on the gated spawn path they hit the command gate's 'always ask' for MCP tools, which blocks in headless channels and prompts in interactive ones. Switch to the server-level form '--allowedTools mcp__wick', which covers every wick tool (meta + the dynamic wick_manager_* surface) without a static per-tool list. This is not a security change: --allowedTools is a client-side prompt-skip, not the boundary — wick enforces per-op access server-side (wickmanager's requireAdmin/requireTray/per-resource gates), and wick_execute (which can already mutate) was always pre-approved. Docs: note in connectors/wickmanager.md + command-gate.md that wick's own tools skip the gate and are guarded server-side, and how to keep management ops controlled (tighten admin/tag access; system_* is tray-gated).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Widens the spawned-agent MCP tool pre-approval from a static five-tool list to the server-level form
--allowedTools mcp__wick, so every wick tool is auto-approved — the meta-tools plus the dynamicwick_manager_*surface (merged in v0.15.8) andwick_info/ask_user/wick_skill_*/wick_encrypt/wick_decrypt.Why
wickMCPAllowedToolsenumerated onlywick_list/search/get/execute/list_providers. So the newer tools — especially thewick_manager_*management surface — were not pre-approved. On the gated spawn path (PermissionMode: on) they fell through to the command gate's "always ask" for MCP tools, which blocks in headless channels (Slack/HTTP, no human to answer) and prompts in interactive ones. That defeats the original purpose of the allowlist ("so the headless agent isn't blocked on a permission prompt nobody can answer").The server-level
mcp__wickform covers all wick tools dynamically, so future tools never need a static allowlist edit.Not a security change
--allowedToolsis a client-side prompt-skip, not the authorization boundary. wick enforces per-op access server-side — e.g. wickmanager'srequireAdmin/requireTray/ per-resource gates (used 37× inwickmanager/service.go;system_server_stop → requireAdmin). An unauthorized caller is rejected even though the tool is auto-approved client-side. Andwick_execute— which can already run destructive connector ops — was always pre-approved, so this is consistent with the existing posture, not a new risk category.Docs
docs/connectors/wickmanager.md— new "Command gate & management ops" section: whywick_manager_*skips the client gate, that server-side gates are the real boundary, and how to keep management ops controlled (tighten admin/tag access;system_*is tray-gated). Notes selective client-gate review as a possible future enhancement.docs/guide/command-gate.md— tip that wick's own MCP tools are pre-approved (the "always ask" rule is for third-party servers).docs/changelog.md—[Unreleased]entry.Testing
TestMCPConfigArgsupdated to assert the server-levelmcp__wickvalue (RED→GREEN).internal/agents/provider/claude+internal/mcpsuites pass (92 tests).go build ./cmd/lab ., gofmt clean.