Repository navigation
One-click pair Xcode MCP / MobileBuildMCP on Apple projects (#488) - #1649
Conversation
Settings > Skills & MCP shows an Xcode card when the selected project has a *.xcworkspace, *.xcodeproj or an iOS-family Package.swift. It reports whether MobileBuildMCP (formerly XcodeBuildMCP) and Apple's `xcrun mcpbridge` are installed and offers one Add button: MobileBuildMCP when present, else mcpbridge. A second Xcode server is refused, and a non-Apple repo or non-macOS host is a no-op with no probes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c386134622
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| execFileSync("xcrun", ["--find", "mcpbridge"], { | ||
| stdio: "ignore", | ||
| timeout: 5_000, | ||
| }); |
There was a problem hiding this comment.
Avoid blocking the main process during the Xcode probe
When Settings → Skills & MCP opens for an Apple project, reloadMcp invokes mcp:xcodeStatus, so this synchronous child process runs directly in Electron's main process. If xcrun is slow or wedged, the entire application stops processing IPC and window events for up to five seconds; the probe is also repeated after each MCP mutation. Run the probe asynchronously, and preferably cache its installation-level result, instead of using execFileSync in the IPC path.
Useful? React with 👍 / 👎.
Closes #488.
What
Settings → Skills & MCP shows an Xcode card when the selected project's root has a
*.xcworkspace, a*.xcodeproj, or aPackage.swiftthat targets iOS, tvOS, watchOS or visionOS.mobilebuildmcp, or the legacyxcodebuildmcp) and whetherxcrun --find mcpbridgesucceeds. A missing server gets its install hint.<bin> mcp) when present, else Apple'sxcrun mcpbridge. Only one is ever offered.xcrun mcpbridge, ornpx …buildmcp@….nullbefore any probe runs (on a Mac without Xcode,xcruncan open the CLT installer).upsertMcpServer→syncUserMcpServerspath asmcp:save, and the command is fixed in the main process.New IPC:
mcp:xcodeStatus(read scope) andmcp:pairXcode(full scope).Differences from the issue
mobilebuildmcp2.7.1). Both binary names are detected.trusted: trueon the click, without the catalog's trust checkbox. The card shows the exact command before the click.Tests
electron/test/xcode-mcp.test.js: detection fixtures, no-op without probing, MobileBuildMCP > mcpbridge preference, refuse-twice across four existing-server shapes, IPC no-op on a non-Apple repo.test/skillsTab.test.tsx: the card offers one server, the click pairs it, and the card hides with no Apple project.vite build, renderer 3074/3074. Electron 4752/4753: the one failure was amemory-sup.test.jswaitFortimeout under load, which passes 41/41 in isolation (untouched by this PR).xcrun mcpbridgeis offered.🤖 Generated with Claude Code