A Model Context Protocol (MCP) server that brings the power of AI to your Xcode projects. This server acts as a bridge between Claude and your local Xcode development environment, enabling intelligent code assistance, project management, and automated development tasks.
At its core, this server follows a client-server architecture where Claude can securely interact with your local Xcode projects:
flowchart LR
subgraph "Your Computer"
Claude["Claude Desktop"]
MCP["Xcode MCP Server"]
XP[("Xcode Projects")]
Claude <-->|"MCP Protocol\n(Commands & Results)"| MCP
MCP <-->|"Local Access\n(File & Build Operations)"| XP
end
The communication between the Xcode MCP server and your local projects happens entirely on your machine—your code is not exposed to the internet. The Model Context Protocol ensures that Claude can only perform approved operations through well-defined interfaces, giving you a secure way to let AI assist with your development while maintaining complete control.
This server implements the Model Context Protocol (MCP) specification, making it compatible with any MCP-compliant client or host. While the installation instructions focus on Claude Desktop, you can use this server with:
The standardized protocol ensures consistent functionality across different clients while maintaining the same level of security and local-only operation.
You can install this server in three ways:
Update your Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"xcode": {
"command": "npx",
"args": [
"-y",
"xcode-mcp-server"
],
"env": {
"PROJECTS_BASE_DIR": "/path/to/your/xcode/projects"
}
}
}
}
Install the package globally:
npm install -g @modelcontextprotocol/xcode-server
Then update your Claude configuration:
{
"mcpServers": {
"xcode": {
"command": "xcode-server",
"env": {
"PROJECTS_BASE_DIR": "/path/to/your/xcode/projects"
}
}
}
}
Clone this repository:
git clone https://github.com/r-huijts/xcode-mcp-server.git
cd xcode-mcp-server
Install dependencies:
npm install
Set up environment variables:
cp .env.example .env
Edit .env
and set PROJECTS_BASE_DIR
to your Xcode projects directory.
Build the project:
npm run build
Then update your Claude configuration:
{
"mcpServers": {
"xcode": {
"command": "node",
"args": [
"/absolute/path/to/xcode-mcp-server/dist/index.js"
],
"env": {
"PROJECTS_BASE_DIR": "/path/to/your/xcode/projects"
}
}
}
}
Note: Replace
/path/to/your/xcode/projects
with the actual path to your Xcode projects directory.
After updating the configuration, restart Claude Desktop for the changes to take effect.
The server provides a natural interface for Claude to assist with your Xcode development. Here are some ways you can interact:
Ask Claude to:
/Users/username/Documents/XcodeProjects
"Get help with:
Let Claude assist with:
npm run build
npm test
The server provides detailed logging through stderr. Common issues and their solutions:
Project Detection Issues
Build Problems
We welcome contributions! Whether it's:
Feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Seamless access to top MCP servers powering the future of AI integration.