
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 分