
Xcode: MCP Bridge Wrapper for Cursor
io.github.SoundBlaster由 GitHub 帳號 SoundBlaster 發布v0.1.6更新於 Nov 3, 2026
Python wrapper that makes Xcode's MCP bridge compatible with strict MCP clients like Cursor
概覽
Python 包裝器,讓 Cursor 等嚴格 MCP 用戶端透過 xcrun mcpbridge 使用 Xcode 工具,並修復格式不完整的工具回應。
- 可以做什麼
- 以直連或 broker 模式把 MCP 用戶端接到 Apple xcrun mcpbridge 提供的 Xcode 工具目錄。
- 列出、開啟與關閉工作區,建立專案與 target,切換 scheme、執行目標與測試計畫。
- 讀取、寫入、更新、移動與刪除專案檔案,並重新整理程式碼問題。
- 建置、測試、執行與停止專案,讀取建置日誌與主控台輸出,送出除錯器指令。
- 與裝置和模擬器互動,編輯字串目錄,查詢當機與線上效能問題。
- 算圖預覽、搜尋文件並執行程式碼片段。
- 適用情境
- 適合在 macOS 上用 Xcode 開發,並希望 Cursor、Codex、Zed 或 Claude Code 等 AI 用戶端檢視與操作已開啟 Xcode 專案的情境,例如建置、測試、改檔案、模擬器與診斷。多個用戶端需要共用同一條 Xcode 連線時適合用 broker 模式。
- 執行需求
- macOS 與 Xcode 26.3 或更新版本(支援 27.0)、Python 3.9-3.12,以及用來執行 PyPI 套件的 uv/uvx。需在 Xcode 設定中允許外部代理使用 Xcode 工具,並開啟目標專案。Xcode 可能要求核准 broker 主機行程與專案資料夾。
安裝
在 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版本歷史
1- v0.1.6最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分