# Xcode MCP Files

> Navigate, read, inspect, and search files through Apple Xcode MCP project-structure tools. Use when the user asks to list Xcode project files, find files, grep source, read a file as Xcode sees it, inspect the active editor file or selection, or locate project navigator paths before build/edit/test/preview actions.

- Skill: `ai-x-builder/xcode-mcp-files` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ai-x-builder/xcode-mcp-files`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ai-x-builder/xcode-mcp-files/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ai-x-builder (https://skillmd.com/u/ai-x-builder)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ai-x-builder/xcode-mcp-files

---


# Xcode MCP Files

## Overview

Use this skill for read-only project navigation through Xcode MCP. These tools operate on Xcode project navigator paths, not raw filesystem paths, so use them when Xcode's project structure or target membership matters.

## Tool Availability

Before calling MCP tools, confirm the `mcp__xcode` namespace is available. If file tools such as `XcodeRead`, `XcodeGrep`, `XcodeGlob`, `XcodeLS`, or `XcodeGetCurrentFile` are not visible, use `tool_search` with those names to expose Apple Xcode MCP file tools. If the tools still are not available, tell the user Xcode MCP is not connected and stop rather than answering from local filesystem state.

## Workflow

1. Call `mcp__xcode.XcodeListWindows` and select the relevant `tabIdentifier`.
2. If the user references the active editor, call `mcp__xcode.XcodeGetCurrentFile`.
3. If the user references a directory/group, call `mcp__xcode.XcodeLS`.
4. If the user references filename patterns, call `mcp__xcode.XcodeGlob`.
5. If the user references source text, symbols, routes, strings, or regex patterns, call `mcp__xcode.XcodeGrep`.
6. Once a project path is identified, call `mcp__xcode.XcodeRead` before drawing conclusions or before handing off to an edit/build/test workflow.

## Tool Selection

- `XcodeGetCurrentFile`: use for the active editor path, content, or selected text.
- `XcodeLS`: use for listing project groups or directories; set `recursive: false` for a shallow scan when possible.
- `XcodeGlob`: use for wildcard file discovery such as `**/*.swift` or `**/*ViewModel*`.
- `XcodeGrep`: use for regex text search inside the Xcode project structure.
- `XcodeRead`: use for exact file content; read large files with `offset` and `limit`.

## Path Rules

- Pass Xcode project organization paths, for example `ProjectName/Sources/MyFile.swift`.
- Do not assume filesystem paths are accepted by these tools.
- When converting from a filesystem path, first locate the corresponding Xcode project path with `XcodeGlob`, `XcodeGrep`, `XcodeLS`, or `XcodeGetCurrentFile`.
- Account for JSON-escaped output from `XcodeRead` and `XcodeGrep`; treat displayed backslashes and newlines carefully when preparing exact replacements.

## Reporting

- Preserve exact project paths and line numbers when returned.
- Say whether a path came from Xcode project structure or the filesystem.
- If no match is found, include the searched path/pattern and the selected Xcode tab.

