xcode
MCP Server for interacting with Xcode
claude mcp add --transport stdio drewster99-xcode-mcp-server uvx xcode-mcp-server \ --env XCODEMCP_ALLOWED_FOLDERS="Optional: colon-separated absolute folders to restrict access (e.g., /Users/you/projects:/Users/you/Documents)"
How to use
The Xcode MCP Server enables an AI assistant to interact with Xcode and Apple platform projects through the MCP (Model Context Protocol) interface. Once configured with uvx, you can ask the AI to discover Xcode projects, navigate source files, build and run apps for iOS/macOS/tvOS/watchOS, execute and monitor tests, retrieve build and runtime errors, capture console output, take screenshots of Xcode windows or simulators, and manage simulators. This server relies on AppleScript under the hood to communicate with Xcode and is intended to run on macOS with Xcode installed.
To use it, add the MCP server to your preferred client (Claude Desktop, Claude Code, Cursor, etc.) using the uvx command and point the client to the xcode-mcp-server executable. For example, you can configure Claude Code or Claude Desktop to run uvx xcode-mcp-server so the AI can load the server and start issuing Xcode-related commands. You can optionally constrain filesystem access with the XCODEMCP_ALLOWED_FOLDERS environment variable to limit which directories the AI can browse.
How to install
Prerequisites:
- macOS
- Xcode installed
- Python 3.8+ (for running the server)
- uv (the Unicode Virtual Machine) or uvx (the MCP transport) available on your PATH
Installation steps:
- Install uv (if not already installed):
- macOS: brew install libuv
- Ensure uvx is accessible: which uvx
- Install the xcode-mcp-server package (Python package name inferred from project):
- pip install xcode-mcp-server
- Verify installation by running the server directly (optional for development):
- uvx xcode-mcp-server
- Configure your MCP client (Claude Desktop/Code or Cursor) to load the server from the command above, using the provided command and arguments. Example client config:
Claude Desktop / Cursor:
- command: uvx
- args: ["xcode-mcp-server"]
- Optional env: XCODEMCP_ALLOWED_FOLDERS to restrict access
- If you prefer local testing without a client, you can run the server in development mode via MCP Inspector or equivalent tooling provided by MCP frameworks.
Additional notes
Tips and notes:
- This server is macOS-only and requires Xcode to be installed on the host machine.
- Security: Use XCODEMCP_ALLOWED_FOLDERS to restrict the paths the AI can access. All paths must be absolute directories.
- If you encounter AppleScript compatibility issues with a newer Xcode, you may need to adjust the script or version compatibility within your environment.
- When using MCP clients, the environment variable approach for access control is preferred (env in the client config) rather than altering the server startup parameters.
- For debugging, you can run the server directly and use MCP Inspector or internal tools to validate commands before enabling client integration.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP