fix(agent): escalate MCP Store tool approvals to users#2954
Closed
cvolzer3 wants to merge 4 commits into
Closed
Conversation
Cloud sessions surfaced the MCP Store proxy's "requires approval" (-32001) instead of prompting the user. Two root causes: - bypassPermissions (the cloud Claude default) skips canUseTool, where the MCP approval gate lives, so needs_approval tools ran unchecked. Add a PreToolUse hook that forces ask/deny for needs_approval / do_not_use MCP Store tools, which runs in every permission mode. - approval state was stored on the volatile MCP metadata cache, which clearMcpToolMetadataCache() wipes on every server refresh/reconnect. Move it to a dedicated cache that survives refreshes so the gate keeps seeing the right state mid-session. Also hardens mcp-store tool-key resolution and wires codex approval support.
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(agent): escalate mcp-store tool appr..." | Re-trigger Greptile |
973b336 to
979cfc7
Compare
Contributor
|
Reviews (2): Last reviewed commit: "fix(agent): address mcp approval review ..." | Re-trigger Greptile |
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
Stack 1/2. This PR contains the shared MCP approval plumbing and Claude-side approval path.
Stack 2/2: #2984 replaces the prior Codex MCP proxy approach with Codex PreToolUse/PostToolUse hooks so Codex reaches parity through the same approval model.
Testing