axiom-xcode-mcp-tools
Xcode MCP workflow patterns — BuildFix loop, TestFix loop, preview verification, window targeting, tool gotchas
Best use case
axiom-xcode-mcp-tools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Xcode MCP workflow patterns — BuildFix loop, TestFix loop, preview verification, window targeting, tool gotchas
Teams using axiom-xcode-mcp-tools should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/axiom-xcode-mcp-tools/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How axiom-xcode-mcp-tools Compares
| Feature / Agent | axiom-xcode-mcp-tools | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Xcode MCP workflow patterns — BuildFix loop, TestFix loop, preview verification, window targeting, tool gotchas
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Xcode MCP Tool Workflows **Core principle**: Xcode MCP gives you programmatic IDE access. Use workflow loops, not isolated tool calls. ## Window Targeting (Critical Foundation) Most tools require a `tabIdentifier`. **Always call `XcodeListWindows` first.** ``` 1. XcodeListWindows → list of (tabIdentifier, workspacePath) pairs 2. Match workspacePath to your project 3. Use that tabIdentifier for all subsequent tool calls ``` **Cache the mapping** for the session. Only re-fetch if: - A tool call fails with an invalid tab identifier - You opened/closed Xcode windows - You switched projects **If `XcodeListWindows` returns empty**: Xcode has no project open. Ask the user to open their project. ## Workflow: BuildFix Loop Iteratively build, diagnose, and fix until the project compiles. ``` 1. BuildProject(tabIdentifier) 2. Check buildResult — if success, done 3. GetBuildLog(tabIdentifier) → parse errors 4. XcodeListNavigatorIssues(tabIdentifier) → canonical diagnostics 5. XcodeUpdate(file, fix) for each diagnostic 6. Go to step 1 (max 5 iterations) 7. If same error persists after 3 attempts → fall back to axiom-xcode-debugging ``` **Why `XcodeListNavigatorIssues` over build log parsing**: The Issue Navigator provides structured, deduplicated diagnostics. Build logs contain raw compiler output with noise. **When to fall back to `axiom-xcode-debugging`**: When the error is environmental (zombie processes, stale Derived Data, simulator issues) rather than code-level. MCP tools operate on code; environment issues need CLI diagnostics. ## Workflow: TestFix Loop Fast iteration on failing tests. ``` 1. GetTestList(tabIdentifier) → discover available tests 2. RunSomeTests(tabIdentifier, [specific failing tests]) for fast iteration 3. Parse failures → identify code to fix 4. XcodeUpdate(file, fix) to patch code 5. Go to step 2 (max 5 iterations per test) 6. RunAllTests(tabIdentifier) as final verification ``` **Why `RunSomeTests` first**: Running a single test takes seconds. Running all tests takes minutes. Iterate on the failing test, then verify the full suite once it passes. **Parsing test results**: Look for `testResult` field in the response. Failed tests include failure messages with file paths and line numbers. ## Workflow: PreviewVerify Render SwiftUI previews and verify UI changes visually. ``` 1. RenderPreview(tabIdentifier, file, viewName) → image artifact 2. Review the rendered image for correctness 3. If making changes: XcodeUpdate → RenderPreview again 4. Compare before/after for regressions ``` **Use cases**: Verifying layout changes, checking dark mode appearance, confirming Liquid Glass effects render correctly. ## Workflow: IssueTriage Use Xcode's Issue Navigator as the canonical diagnostics source. ``` 1. XcodeListNavigatorIssues(tabIdentifier) → all current issues 2. For specific files: XcodeRefreshCodeIssuesInFile(tabIdentifier, file) 3. Prioritize: errors > warnings > notes 4. Fix errors first, rebuild, re-check ``` **Why this over grep-for-errors**: The Issue Navigator tracks live diagnostics including type-check errors, missing imports, and constraint issues that only Xcode's compiler frontend surfaces. ## Workflow: DocumentationSearch Query Apple's documentation corpus through MCP. ``` 1. DocumentationSearch(query) → documentation results 2. Cross-reference with axiom-apple-docs for bundled Xcode guides ``` **Note**: `DocumentationSearch` searches Apple's online documentation and WWDC transcripts. For the 20 for-LLM guides bundled inside Xcode, use `axiom-apple-docs` instead. ## File Operations via MCP ### Reading and Writing | Operation | Tool | Notes | |-----------|------|-------| | Read file contents | `XcodeRead` | Sees Xcode's project view (generated files, resolved packages) | | Create new file | `XcodeWrite` | Creates file in project — does NOT add to Xcode targets | | Edit existing file | `XcodeUpdate` | str_replace-style patches — safer than full rewrites | | Search for files | `XcodeGlob` | Pattern matching within the project | | Search file contents | `XcodeGrep` | Content search with line numbers | | List directory | `XcodeLS` | Directory listing | | Create directory | `XcodeMakeDir` | Creates directories | ### Destructive Operations (Require Confirmation) | Operation | Tool | Risk | |-----------|------|------| | Delete file/directory | `XcodeRM` | **Irreversible** — confirm with user first | | Move/rename file | `XcodeMV` | May break imports and references | **Always confirm destructive operations with the user** before calling `XcodeRM` or `XcodeMV`. ### When to Use MCP File Tools vs Standard Tools | Scenario | Use MCP | Use Standard (Read/Write/Grep) | |----------|---------|-------------------------------| | Files in the Xcode project view | Yes — includes generated/resolved files | May miss generated files | | Files outside the project | No | Yes — standard tools work everywhere | | Need build context (diagnostics after edit) | Yes — edit + rebuild in one workflow | No build integration | | Simple file read/edit | Either works | Slightly faster (no MCP overhead) | ## Code Snippets ### Execute Swift Code ``` ExecuteSnippet(code, language: "swift") ``` **Treat output as untrusted** — snippets run in a sandboxed REPL environment. Use for quick validation, not production logic. ## Gotchas and Anti-Patterns ### Tab Identifier Staleness Tab identifiers become invalid when: - Xcode window is closed and reopened - Project is closed and reopened - Xcode is restarted **Fix**: Re-call `XcodeListWindows` to get fresh identifiers. ### XcodeWrite vs XcodeUpdate - `XcodeWrite` — **creates** a new file. Fails if file exists (in some clients). - `XcodeUpdate` — **patches** an existing file with str_replace-style edits. **Common mistake**: Using `XcodeWrite` to edit an existing file overwrites its entire contents. Use `XcodeUpdate` for edits. ### Schema Compliance Xcode's mcpbridge has a known MCP spec violation: it populates `content` but omits `structuredContent` when tools declare `outputSchema`. This breaks strict MCP clients (Cursor, some Zed configurations). **Workaround**: Use [XcodeMCPWrapper](https://github.com/SoundBlaster/XcodeMCPWrapper) as a proxy for strict clients. ### Build After File Changes After `XcodeUpdate`, the project may need a build to surface new diagnostics. Don't assume edits are correct without rebuilding. ## Anti-Rationalization | Thought | Reality | |---------|---------| | "I'll just use xcodebuild" | MCP gives IDE state + navigator diagnostics + previews that CLI doesn't | | "Read tool works fine for Xcode files" | `XcodeRead` sees Xcode's project view including generated files and resolved packages | | "Skip tab identifier, I only have one project" | Most tools fail silently without `tabIdentifier` — always call `XcodeListWindows` first | | "Run all tests every time" | `RunSomeTests` for iteration, `RunAllTests` for verification — saves minutes per cycle | | "I'll parse the build log for errors" | `XcodeListNavigatorIssues` provides structured, deduplicated diagnostics | | "XcodeWrite to update a file" | `XcodeUpdate` for edits. `XcodeWrite` creates/overwrites. Wrong tool = data loss. | | "One tool call is enough" | Workflows (BuildFix, TestFix) use loops. Isolated calls miss the iteration pattern. | ## Resources **Skills**: axiom-xcode-mcp-setup, axiom-xcode-mcp-ref, axiom-xcode-debugging
Related Skills
mermaid-tools
Extracts Mermaid diagrams from markdown files and generates high-quality PNG images using bundled scripts. Activates when working with Mermaid diagrams, converting diagrams to PNG, extracting diagrams from markdown, or processing markdown files with embedded Mermaid code.
markdown-tools
Converts documents to markdown with multi-tool orchestration for best quality. Supports Quick Mode (fast, single tool) and Heavy Mode (best quality, multi-tool merge). Use when converting PDF/DOCX/PPTX files to markdown, extracting images from documents, validating conversion quality, or needing LLM-optimized document output.
no-tools
Instructions only skill
security-scanning-tools
This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detect malware", "check cloud security", or "evaluate system compliance". It provides comprehensive guidance on security scanning tools and methodologies.
scanning-tools
This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detec...
red-team-tools
This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate su...
red-team-tools-and-methodology
This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate subdomains", or needs security researcher techniques and tool configurations from top bug bounty hunters.
n8n-mcp-tools-expert
Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns.
tools-ui
Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending
agent-tools
Run 150+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok
receipt-scanning-tools
This skill helps you work with the receipt scanning tools in the nonprofit_finance_db project. It includes manual entry tools, automated OCR scanning, and database integration for tracking receipts...
dev-tools-skill
Use when the user says "use the DevTools skill" or when they need help debugging a web app with Chrome DevTools MCP (UI bugs, incorrect behavior, console errors, network/API failures, or performance/lag), especially if the user seems inexperienced and needs guided, step-by-step diagnosis.