Skip to content

One-click pair Xcode MCP / MobileBuildMCP on Apple projects (#488) - #1649

Merged
currentbits merged 1 commit into
mainfrom
coder/one-click-pair-xcode-mcp-xcodebuildmcp-o-615f93
Oct 16, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/one-click-pair-xcode-mcp-xcodebuildmcp-o-615f93

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #488.

What

Settings → Skills & MCP shows an Xcode card when the selected project's root has a *.xcworkspace, a *.xcodeproj, or a Package.swift that targets iOS, tvOS, watchOS or visionOS.

  • Checks: whether MobileBuildMCP is on PATH (mobilebuildmcp, or the legacy xcodebuildmcp) and whether xcrun --find mcpbridge succeeds. A missing server gets its install hint.
  • One button adds the preferred server: MobileBuildMCP (<bin> mcp) when present, else Apple's xcrun mcpbridge. Only one is ever offered.
  • A second Xcode server is refused, matched by name, binary, xcrun mcpbridge, or npx …buildmcp@….
  • A non-Apple repo or a non-macOS host returns null before any probe runs (on a Mac without Xcode, xcrun can open the CLT installer).
  • No binaries are vendored. The entry goes through the same upsertMcpServer → syncUserMcpServers path as mcp:save, and the command is fixed in the main process.

New IPC: mcp:xcodeStatus (read scope) and mcp:pairXcode (full scope).

Differences from the issue

  • XcodeBuildMCP is now MobileBuildMCP (xcodebuildmcp.com redirects to mobilebuildmcp.com, npm mobilebuildmcp 2.7.1). Both binary names are detected.
  • The "Allow external agents" Xcode toggle has no preference key I could find, so the card shows it as an instruction, not a check.
  • User scope only. Solenta has no per-project MCP list yet.
  • Pairing saves the server trusted: true on 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.
  • Local: typecheck, vite build, renderer 3074/3074. Electron 4752/4753: the one failure was a memory-sup.test.js waitFor timeout under load, which passes 41/41 in isolation (untouched by this PR).
  • Dogfooded against real tools (Xcode 27.1): the fixture project is detected and xcrun mcpbridge is offered.

🤖 Generated with Claude Code

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T07:59:10.461786Z c386134 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread electron/xcodeMcp.js
Comment on lines +76 to +79
execFileSync("xcrun", ["--find", "mcpbridge"], {
stdio: "ignore",
timeout: 5_000,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@currentbits
currentbits merged commit 97a23bd into main Oct 16, 2026
6 checks passed
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.

One-click pair Xcode MCP / XcodeBuildMCP on iOS projects

1 participant