axiom-xcode-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Xcode MCP Router

Xcode MCP Router

You MUST use this skill for ANY Xcode MCP interaction — setup, tool usage, workflow patterns, or troubleshooting.
Xcode 26.3 ships an MCP server (
xcrun mcpbridge
) that exposes 20 IDE tools to external AI clients. This router directs you to the right specialized skill.
任何Xcode MCP交互操作(设置、工具使用、工作流模式或故障排查)都必须使用此技能。
Xcode 26.3 附带了一个MCP服务器(
xcrun mcpbridge
),可向外部AI客户端开放20个IDE工具。本路由工具将引导你使用对应的专业技能。

When to Use

使用场景

Use this router when:
  • Setting up Xcode MCP for the first time
  • Configuring
    xcrun mcpbridge
    for any MCP client
  • Using any Xcode MCP tool (file ops, build, test, preview)
  • Building, testing, or previewing via MCP tools
  • Troubleshooting mcpbridge connection issues
  • Window/tab targeting questions
  • Permission dialog confusion
使用本路由工具的场景:
  • 首次设置Xcode MCP
  • 为任意MCP客户端配置
    xcrun mcpbridge
  • 使用任何Xcode MCP工具(文件操作、构建、测试、预览)
  • 通过MCP工具进行构建、测试或预览
  • 排查mcpbridge连接问题
  • 窗口/标签页定位相关问题
  • 权限对话框相关困惑

Routing Logic

路由逻辑

1. Setup/Connection → xcode-mcp-setup

1. 设置/连接 → xcode-mcp-setup

Triggers:
  • First-time Xcode MCP setup
  • Client-specific config (Claude Code, Cursor, Codex, VS Code, Gemini CLI)
  • Connection errors ("Connection refused", "No windows")
  • Permission dialog confusion
  • Multi-Xcode targeting (
    MCP_XCODE_PID
    )
  • Schema compliance issues with strict clients
Invoke:
/skill axiom-xcode-mcp-setup

触发场景:
  • 首次设置Xcode MCP
  • 客户端专属配置(Claude Code、Cursor、Codex、VS Code、Gemini CLI)
  • 连接错误("Connection refused"、"No windows")
  • 权限对话框相关困惑
  • 多Xcode实例定位(
    MCP_XCODE_PID
  • 严格模式客户端的Schema合规性问题
调用命令:
/skill axiom-xcode-mcp-setup

2. Using Tools & Workflows → xcode-mcp-tools

2. 工具使用与工作流 → xcode-mcp-tools

Triggers:
  • How to build/test/preview via MCP
  • Workflow patterns (BuildFix loop, TestFix loop)
  • Tool gotchas and anti-patterns
  • Window/tab targeting strategy
  • When to use MCP tools vs CLI (
    xcodebuild
    )
  • Destructive operation safety (
    XcodeRM
    ,
    XcodeMV
    )
Invoke:
/skill axiom-xcode-mcp-tools

触发场景:
  • 如何通过MCP进行构建/测试/预览
  • 工作流模式(BuildFix循环、TestFix循环)
  • 工具使用陷阱与反模式
  • 窗口/标签页定位策略
  • MCP工具与CLI(
    xcodebuild
    )的使用场景对比
  • 破坏性操作安全(
    XcodeRM
    XcodeMV
调用命令:
/skill axiom-xcode-mcp-tools

3. Tool API Reference → xcode-mcp-ref

3. 工具API参考 → xcode-mcp-ref

Triggers:
  • Specific tool parameters and schemas
  • Input/output format for a tool
  • "How does XcodeGrep work?"
  • "What params does BuildProject take?"
  • Tool category listing
Invoke:
/skill axiom-xcode-mcp-ref

触发场景:
  • 特定工具的参数与Schema
  • 工具的输入/输出格式
  • "XcodeGrep如何工作?"
  • "BuildProject需要哪些参数?"
  • 工具分类列表
调用命令:
/skill axiom-xcode-mcp-ref

Decision Tree

决策树

dot
digraph xcode_mcp_router {
    rankdir=TB;
    "User has Xcode MCP question" [shape=ellipse];
    "Setup or connection?" [shape=diamond];
    "Using tools or workflows?" [shape=diamond];
    "Need specific tool params?" [shape=diamond];

    "xcode-mcp-setup" [shape=box];
    "xcode-mcp-tools" [shape=box];
    "xcode-mcp-ref" [shape=box];

    "User has Xcode MCP question" -> "Setup or connection?";
    "Setup or connection?" -> "xcode-mcp-setup" [label="yes"];
    "Setup or connection?" -> "Using tools or workflows?" [label="no"];
    "Using tools or workflows?" -> "xcode-mcp-tools" [label="yes"];
    "Using tools or workflows?" -> "Need specific tool params?" [label="no"];
    "Need specific tool params?" -> "xcode-mcp-ref" [label="yes"];
    "Need specific tool params?" -> "xcode-mcp-tools" [label="general question"];
}
dot
digraph xcode_mcp_router {
    rankdir=TB;
    "User has Xcode MCP question" [shape=ellipse];
    "Setup or connection?" [shape=diamond];
    "Using tools or workflows?" [shape=diamond];
    "Need specific tool params?" [shape=diamond];

    "xcode-mcp-setup" [shape=box];
    "xcode-mcp-tools" [shape=box];
    "xcode-mcp-ref" [shape=box];

    "User has Xcode MCP question" -> "Setup or connection?";
    "Setup or connection?" -> "xcode-mcp-setup" [label="yes"];
    "Setup or connection?" -> "Using tools or workflows?" [label="no"];
    "Using tools or workflows?" -> "xcode-mcp-tools" [label="yes"];
    "Using tools or workflows?" -> "Need specific tool params?" [label="no"];
    "Need specific tool params?" -> "xcode-mcp-ref" [label="yes"];
    "Need specific tool params?" -> "xcode-mcp-tools" [label="general question"];
}

Anti-Rationalization

常见误区纠正

ThoughtReality
"I'll just use xcodebuild directly"MCP gives IDE state, diagnostics, previews, and navigator issues that CLI doesn't expose
"I already know how to set up MCP"Client configs differ. Permission dialog behavior is specific. Check setup skill.
"I can figure out the tool params"Tool schemas have required fields and gotchas. Check ref skill.
"Tab identifiers are obvious"Most tools fail silently without correct tabIdentifier. Tools skill explains targeting.
"This is just file reading, I'll use Read tool"XcodeRead sees Xcode's project view including generated files and resolved packages
错误想法实际情况
"我直接用xcodebuild就行"MCP能提供CLI无法获取的IDE状态、诊断信息、预览内容和导航器问题
"我已经知道怎么设置MCP了"不同客户端的配置存在差异,权限对话框的行为也有特殊性,请查看设置类技能
"我自己能搞清楚工具参数"工具Schema有必填字段和使用陷阱,请查看参考类技能
"标签页标识符很明显"大多数工具如果没有正确的tabIdentifier会静默失败,工具类技能会解释定位方法
"这只是读取文件,我用Read工具就行"XcodeRead能查看Xcode的项目视图,包括生成文件和已解析的包

Conflict Resolution (vs Other Routers)

与其他路由工具的冲突解决

DomainOwnerWhy
MCP-specific interaction (mcpbridge, MCP tools, tab identifiers)xcode-mcpMCP protocol and tool-specific
Xcode environment (Derived Data, zombie processes, simulators)ios-buildEnvironment diagnostics, not MCP
Apple's bundled documentation (for-LLM guides/diagnostics)apple-docsBundled docs, not MCP tool
DocumentationSearch
MCP tool usage specifically
xcode-mcpMCP tool invocation
Build failures diagnosed via CLIios-buildTraditional build debugging
Build failures diagnosed via MCP toolsxcode-mcpMCP workflow patterns
领域负责路由工具原因
MCP专属交互(mcpbridge、MCP工具、标签页标识符)xcode-mcp属于MCP协议和工具专属内容
Xcode环境(Derived Data、僵尸进程、模拟器)ios-build属于环境诊断,与MCP无关
Apple官方捆绑文档(面向LLM的指南/诊断内容)apple-docs属于捆绑文档,非MCP工具内容
专属
DocumentationSearch
MCP工具的使用
xcode-mcp属于MCP工具调用范畴
通过CLI排查的构建失败问题ios-build属于传统构建调试
通过MCP工具排查的构建失败问题xcode-mcp属于MCP工作流模式范畴

Example Invocations

调用示例

User: "How do I set up Xcode MCP with Claude Code?" -> Invoke:
/skill axiom-xcode-mcp-setup
User: "How do I build my project using MCP tools?" -> Invoke:
/skill axiom-xcode-mcp-tools
User: "What parameters does BuildProject take?" -> Invoke:
/skill axiom-xcode-mcp-ref
User: "My mcpbridge connection keeps failing" -> Invoke:
/skill axiom-xcode-mcp-setup
User: "How do I target a specific Xcode window?" -> Invoke:
/skill axiom-xcode-mcp-tools
User: "Can I render SwiftUI previews via MCP?" -> Invoke:
/skill axiom-xcode-mcp-tools
(workflow), then
/skill axiom-xcode-mcp-ref
(params)
User: "Cursor can't parse Xcode's MCP responses" -> Invoke:
/skill axiom-xcode-mcp-setup
(schema compliance section)
用户:"如何在Claude Code中设置Xcode MCP?" -> 调用命令:
/skill axiom-xcode-mcp-setup
用户:"如何使用MCP工具构建我的项目?" -> 调用命令:
/skill axiom-xcode-mcp-tools
用户:"BuildProject需要哪些参数?" -> 调用命令:
/skill axiom-xcode-mcp-ref
用户:"我的mcpbridge连接一直失败" -> 调用命令:
/skill axiom-xcode-mcp-setup
用户:"如何定位特定的Xcode窗口?" -> 调用命令:
/skill axiom-xcode-mcp-tools
用户:"我能通过MCP渲染SwiftUI预览吗?" -> 调用命令:
/skill axiom-xcode-mcp-tools
(工作流),然后调用
/skill axiom-xcode-mcp-ref
(参数)
用户:"Cursor无法解析Xcode的MCP响应" -> 调用命令:
/skill axiom-xcode-mcp-setup
(Schema合规性章节)

Resources

相关资源

Skills: xcode-mcp-setup, xcode-mcp-tools, xcode-mcp-ref
技能: xcode-mcp-setup, xcode-mcp-tools, xcode-mcp-ref