Xcode Mcp Server (drewster99)
Created at 4 months ago
by drewster99
An MCP (Model Context Protocol) server for controlling and interacting with Xcode from AI assistants and LLMs like Claude Code, Cursor, Claude Desktop, LM Studio, etc. This server significantly improves the build cycle. Now Claude (or your favorite tool) can directly command Xcode to build your project. Because Xcode is building it directly (rather than xcodebuild command-line or similar), the build happens exactly the same way as when you build it in Xcode. Xcode-mcp-server returns relevant build errors or warnings back to your coding tool (like Cursor or Claude Code), so the LLM sees exactly the same errors you do. Included tool functions here - you don't really need to know this info because your coding LLM will get this info (and more details) automatically, but I've included it here for the curious: - version - Returns xcode-mcp-server's version string - get_xcode_projects - Finds all .xcodeproj and .xcworkspace projects in the given search_path. If search_path is empty, all paths to which the tool has been granted access are searched - get_project_hierarchy - Returns the path hierarchy of the project or workspace - get_project_schemes - Returns a list of build schemes for the specified project - build_project - Commands Xcode to build. This is the workhorse that builds your project again and again, returning success or build errors - run_project - Commands Xcode to run your project - get_build_errors - Returns most recent build errors from the given project - clean_project - Cleans build
Categories
Tags
Xcode
developer
tool
What is Xcode MCP Server?
Xcode MCP Server is a Model Context Protocol server designed to control and interact with Xcode from AI assistants and LLMs like Claude. It enhances the build cycle by allowing direct commands to Xcode, ensuring that builds occur in the same manner as when done manually in Xcode.
How to use Xcode MCP Server?
To use the Xcode MCP Server, set up the environment variable for allowed folders, start the server, and use natural language commands through your AI assistant to build, run, or manage your Xcode projects.
Key features of Xcode MCP Server?
- Direct interaction with Xcode for building and running projects.
- Retrieval of build errors and warnings.
- Path-based security to restrict access to specified directories.
- Support for multiple AI assistants like Claude and Cursor.
Use cases of Xcode MCP Server?
- Automating the build process for Xcode projects using AI.
- Quickly retrieving build errors to streamline debugging.
- Integrating Xcode with AI tools for enhanced development workflows.
FAQ from Xcode MCP Server?
- Can I use Xcode MCP Server with any AI assistant?
Yes, it is compatible with various AI assistants like Claude and Cursor.
- How do I set the allowed folders for security?
You can set the allowed folders using the environment variable
XCODEMCP_ALLOWED_FOLDERSwith a colon-separated list of absolute paths.
- Is there a way to test the server locally?
Yes, you can test the server locally using the MCP Inspector interface.
View More
MCP Servers