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
- Call
mcp__xcode.XcodeListWindows and select the relevant tabIdentifier.
- If the user references the active editor, call
mcp__xcode.XcodeGetCurrentFile.
- If the user references a directory/group, call
mcp__xcode.XcodeLS.
- If the user references filename patterns, call
mcp__xcode.XcodeGlob.
- If the user references source text, symbols, routes, strings, or regex patterns, call
mcp__xcode.XcodeGrep.
- 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.
1---2name: xcode-mcp-files3description: 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.4---56# Xcode MCP Files78## Overview910Use 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.1112## Tool Availability1314Before 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.1516## Workflow17181. Call `mcp__xcode.XcodeListWindows` and select the relevant `tabIdentifier`.192. If the user references the active editor, call `mcp__xcode.XcodeGetCurrentFile`.203. If the user references a directory/group, call `mcp__xcode.XcodeLS`.214. If the user references filename patterns, call `mcp__xcode.XcodeGlob`.225. If the user references source text, symbols, routes, strings, or regex patterns, call `mcp__xcode.XcodeGrep`.236. Once a project path is identified, call `mcp__xcode.XcodeRead` before drawing conclusions or before handing off to an edit/build/test workflow.2425## Tool Selection2627- `XcodeGetCurrentFile`: use for the active editor path, content, or selected text.28- `XcodeLS`: use for listing project groups or directories; set `recursive: false` for a shallow scan when possible.29- `XcodeGlob`: use for wildcard file discovery such as `**/*.swift` or `**/*ViewModel*`.30- `XcodeGrep`: use for regex text search inside the Xcode project structure.31- `XcodeRead`: use for exact file content; read large files with `offset` and `limit`.3233## Path Rules3435- Pass Xcode project organization paths, for example `ProjectName/Sources/MyFile.swift`.36- Do not assume filesystem paths are accepted by these tools.37- When converting from a filesystem path, first locate the corresponding Xcode project path with `XcodeGlob`, `XcodeGrep`, `XcodeLS`, or `XcodeGetCurrentFile`.38- Account for JSON-escaped output from `XcodeRead` and `XcodeGrep`; treat displayed backslashes and newlines carefully when preparing exact replacements.3940## Reporting4142- Preserve exact project paths and line numbers when returned.43- Say whether a path came from Xcode project structure or the filesystem.44- If no match is found, include the searched path/pattern and the selected Xcode tab.