fix(workspaces): auto-trust project MCP servers in claude adapter#244
Open
Brandouttt wants to merge 1 commit into
Open
fix(workspaces): auto-trust project MCP servers in claude adapter#244Brandouttt wants to merge 1 commit into
Brandouttt wants to merge 1 commit into
Conversation
Claude Code parks every project-scoped `.mcp.json` server at "⏸ Pending
approval" — the trust gate for `.mcp.json` shared via VCS. In a launcher
workspace there is no interactive session to approve it, so the OpenAlice
MCP tool surface never connects and the agent sees zero `mcp__open-alice__*`
tools. Users hit this as "MCP 啟動唔到".
Inject `--settings '{"enableAllProjectMcpServers":true}'` in the claude
adapter's composeCommand. CLI injection (not a written settings file)
mirrors the codex adapter's `-c mcp_servers.openalice.url=...` approach and
the author's earlier `--allowedTools` direction (5816b88).
Verified empirically against claude 2.1.x that `--mcp-config`,
`--dangerously-skip-permissions`, and `--permission-mode bypassPermissions`
do NOT clear this gate — only `enableAllProjectMcpServers` flips the server
from "Pending approval" to "✓ Connected".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@Brandon-tecky is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Workspaces launched through the claude adapter never connected to the OpenAlice MCP server — the agent saw zero
mcp__open-alice__*tools. Root cause: Claude Code parks every project-scoped.mcp.jsonserver at "⏸ Pending approval" (the trust gate for.mcp.jsonshared via VCS), and a launcher PTY has no interactive session to approve it. Users hit this as "MCP 啟動唔到".--settings '{"enableAllProjectMcpServers":true}'inclaudeAdapter.composeCommandso project MCP servers auto-trust at spawn..claude/settings.json) mirrors the codex adapter's-c mcp_servers.openalice.url=...and the earlier--allowedToolsdirection in 5816b88.claude.spec.tscovering the fresh / resume-by-id / settings-shape / resume="last"-throws paths.Test plan
npx vitest run src/workspaces/adapters/claude.spec.ts— 4/4 passnpx tsc --noEmit— no new errors (3 pre-existing incore/agent-work.spec.tson master, unrelated)--mcp-config,--dangerously-skip-permissions, and--permission-mode bypassPermissionsdo NOT clear the gate; onlyenableAllProjectMcpServersflips the server from "⏸ Pending approval" → "✓ Connected" (viaclaude mcp list).Boundary touch
None — workspace launcher adapter only. No trading / auth / broker / migration code.
🤖 Generated with Claude Code