
Xcode: MCP Bridge Wrapper for Cursor
io.github.SoundBlaster由 GitHub 帳號 SoundBlaster 發布v0.5.0更新於 Nov 10, 2026
Python wrapper that makes Xcode's MCP bridge compatible with strict MCP clients like Cursor
概覽
一個本機包裝器,把 Cursor 等 MCP 用戶端連到 Xcode 內建的 MCP 橋接,讓助理能操作 Xcode 專案與工具。
- 可以做什麼
- 它執行 Apple 的 xcrun mcpbridge,並暴露已安裝 Xcode 回傳的工具目錄,同時修復宣告 outputSchema 卻缺少 structuredContent 的回應。在 Xcode 27.0 上觀察到的目錄包含工作區與目標管理、檔案讀寫與診斷、建置、測試、執行與除錯器控制、模擬器裝置互動、在地化、當機與線上效能洞察、預覽,以及專案中繼資料工具。broker 模式可讓多個用戶端共用一個持久的 Xcode 連線,減少重複的連線提示。
- 適用情境
- 當 macOS 上的助理需要在 Xcode 內工作時適合使用:檢視工作區、編輯專案檔案、建置、執行測試、控制除錯器或模擬器,以及讀取當機或效能資料。當多個 MCP 用戶端需要同時存取 Xcode 時,broker 模式更有價值。
- 執行需求
- macOS 上安裝 Xcode 26.3 或更新版本(支援 27.0)、Python 3.9-3.12,以及 uv/uvx(自行管理環境)。需在 Xcode 的 Settings > Intelligence > Model Context Protocol 中啟用 Allow external agents to use Xcode tools,並開啟專案。用戶端需使用 initialize 生命週期;0.5.0 不支援 MCP 2026-07-28。未宣告 API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Xcode: MCP Bridge Wrapper for Cursor,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Xcode MCP Bridge Wrapper
mcpbridge-wrapper connects external MCP clients to Xcode through Apple's
xcrun mcpbridge. It repairs Xcode tool responses that declare an
outputSchema but omit structuredContent. The repair works in both direct
and broker modes. Broker mode also lets several clients share one persistent
Xcode connection, reducing repeated connection prompts.
Compatibility
The wrapper does not bundle Xcode tools. It exposes the catalog returned by
the installed Xcode, so tool names and availability can change with Xcode
updates and permissions. The Xcode 27.0 catalog observed with build 27A266a
is listed below.
Quick Start
- Install uv and Xcode 26.3 or newer. Xcode 27.0 is supported.
- In Xcode > Settings > Intelligence > Model Context Protocol, enable Allow external agents to use Xcode tools. Open the project you want to use in Xcode. See Apple's setup guide.
- Add one of the client configurations below. Pin
0.5.0to keep the legacy MCP contract when a future major release becomes available. - Start the client and approve the Xcode access prompt if shown. After
approval, reload or reconnect the MCP server in the client so it fetches
tools/listagain, then verify with a real Xcode tool call. A green MCP indicator alone only confirms the handshake.
Broker mode is recommended for multiple clients. All examples use the same per-user daemon. The first client starts it; subsequent clients reuse it.
Cursor
Add to ~/.cursor/mcp.json:
Codex
Add to ~/.codex/config.toml and restart Codex:
Zed
Add inside ~/.config/zed/settings.json under the top-level
context_servers key, then disable and re-enable the server in
Settings > AI > MCP Servers:
See Zed's MCP configuration guide for the settings UI and server status indicator.
Claude Code
For a single client that does not need the shared daemon, remove --broker
from its command to use direct mode. Manual installation and Web UI options
are covered in the installation,
broker, and Web UI guides.
Xcode 27.0 Approval and Verification
Xcode 27.0 may ask for permission for the broker host process and for the
project folder. The prompt identifies the Python executable and PID, not the
editor name. A new uvx host identity may need a fresh approval even if an
older Python installation was already permitted. Approve access only when the
path and project are expected.
If a tool reports that the agent is not approved, use XcodeOpenWorkspace
with the absolute path of an existing .xcodeproj or .xcworkspace to
request access, approve the prompt in Xcode, then retry the read-only tool.
Do not treat a successful tools/list or a green client status dot as proof
that Xcode tool calls are authorized. Check Xcode's state with:
The second command should show Proxy version: 0.5.0 and Daemon version: 0.5.0. If an older daemon is still running, stop it once and reconnect the
clients:
Stopping the singleton temporarily disconnects every client using it. The
next --broker connection starts a new daemon. For a stable long-lived host
identity, see the dedicated broker host.
Xcode 27.0 Tools
tools/list exposed 54 tools on Xcode 27.0 build 27A266a during a
local smoke test. This is an observed catalog, not a hard-coded wrapper API.
Xcode 27 adds workspace creation/opening, simulator interaction, run and
debugger control, build configuration, localization, and crash/field insight
tools. See Apple's Xcode 27 release notes.
- Workspaces and targets:
XcodeListWorkspaces,XcodeOpenWorkspace,XcodeCloseWorkspace,XcodeNewProject,XcodeNewTarget,XcodeListTargets,XcodeListTemplates,XcodeListSchemes,XcodeSwitchScheme,XcodeListRunDestinations,XcodeSwitchRunDestination,XcodeListTestPlans,XcodeSwitchTestPlan. - Files and diagnostics:
XcodeRead,XcodeWrite,XcodeUpdate,XcodeLS,XcodeGlob,XcodeGrep,XcodeMakeDir,XcodeMV,XcodeRM,XcodeRefreshCodeIssuesInFile. - Build, test, run, and debug:
BuildProject,GetBuildLog,GetTestList,RunAllTests,RunSomeTests,RunProject,StopProject,GetConsoleOutput,InvokeDebuggerCommand,GetFileCompilerFlags,UpdateFileCompilerFlags,GetTargetBuildSettings,UpdateTargetBuildSetting. - Device interaction:
DeviceInteractionStartSession,DeviceInteractionStartWorkspaceSession,DeviceInteractionInstallAndRun,DeviceInteractionSynthesize,DeviceInteractionEndSession. - Localization:
LocalizationPlanner,StringCatalogContext,StringCatalogRead,StringCatalogEdit. - Crash and field insights:
GetTopCrashIssues,GetCrashIssueLogs,GetTopFieldPerformanceIssues,GetFieldPerformanceIssueLogs. - Previews and reference:
RenderPreview,DocumentationSearch,RunCodeSnippet. - Project metadata:
AddEntitlement,AddInfoPlist.
In this catalog, the older XcodeListWindows name is absent; use
XcodeListWorkspaces to inspect workspaces after Xcode approval. Tool calls
such as builds, file edits, and device interaction can change project or
device state. Start with read-only calls when validating a new setup.
Development
For source installation and quality gates, see Contributing. The package is also available on PyPI and in the MCP Registry.
Licensed under the MIT License.
來源:README.md,提交 20b17fa
工具
0版本歷史
2- v0.5.0最新Sep 23, 2026
- v0.4.5Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分