Skip to content

fix(mcp): make tool approval annotations explicit#297

Merged
cameroncooke merged 4 commits intomainfrom
codex/audit-mcp-tool-approvals
Mar 27, 2026
Merged

fix(mcp): make tool approval annotations explicit#297
cameroncooke merged 4 commits intomainfrom
codex/audit-mcp-tool-approvals

Conversation

@cameroncooke
Copy link
Copy Markdown
Collaborator

Summary

  • make MCP approval annotations explicit across all static tool manifests
  • ensure proxied Xcode IDE bridge tools always register a complete approval annotation set
  • add tests that fail if manifests or discovered tools omit the required approval hints

Context

Codex now treats missing MCP approval hints as risky defaults. This change makes the approval-related annotations explicit so local XcodeBuildMCP tools can stay low-friction while still describing their behavior honestly.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@297

commit: 093b91f

@cameroncooke cameroncooke marked this pull request as ready for review March 27, 2026 17:09
@cameroncooke cameroncooke merged commit 8db787c into main Mar 27, 2026
10 checks passed
@cameroncooke cameroncooke deleted the codex/audit-mcp-tool-approvals branch March 27, 2026 17:19
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

description: Set sim location.
annotations:
title: Set Simulator Location
readOnlyHint: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulator-mutating tools incorrectly marked as read-only

High Severity

set_sim_location, set_sim_appearance, reset_sim_location, and sim_statusbar are all newly marked readOnlyHint: true, yet their implementations execute state-mutating xcrun simctl commands (location set, ui appearance, location clear, status_bar override). The MCP spec defines readOnlyHint: true as "the tool does not modify its environment," and clients skip user-approval dialogs for such tools. This contradicts the PR's stated goal of "describing behavior honestly" and is inconsistent with erase_sims, which is correctly marked readOnlyHint: false.

Additional Locations (2)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant