Xcode MCP Server
Supports Mermaid diagrams for visualizing architecture and workflows, as shown in the README's flowchart depicting the server's client-server architecture.
Provides capabilities for analyzing, creating, and modifying Swift files with proper syntax and imports, implementing features like SwiftUI views, property wrappers, and modern async/await patterns.
Enables intelligent interactions with Xcode projects, including project detection, file operations (reading/writing Swift and Objective-C files), project management (accessing targets, configurations, and schemes), build execution, and test suite management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Xcode MCP Servershow me all Swift files in the current project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Xcode MCP Server
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.
What is Xcode MCP Server?
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
endThe 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.
Related MCP server: Code Analysis MCP Server
Key Features
🔍 Intelligent Project Detection
Automatically finds and connects to your active Xcode project
Supports manual project selection for precise control
Maintains workspace context across interactions
📁 Smart File Operations
Read and analyze Swift, Objective-C, and project configuration files
Create and modify source files with proper syntax and imports
Intelligent file listing with type filtering and search
🛠 Project Management
Access project targets, configurations, and schemes
Analyze source files for potential issues
Execute builds with specific configurations
Run and manage test suites
Installation
You can install this server in three ways:
1. Using Claude Desktop with NPM Package
Update your Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"xcode": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/xcode-server"
],
"env": {
"PROJECTS_BASE_DIR": "/path/to/your/xcode/projects"
}
}
}
}2. Global NPM Installation
Install the package globally:
npm install -g @modelcontextprotocol/xcode-serverThen update your Claude configuration:
{
"mcpServers": {
"xcode": {
"command": "xcode-server",
"env": {
"PROJECTS_BASE_DIR": "/path/to/your/xcode/projects"
}
}
}
}3. From Source
Clone this repository:
git clone https://github.com/r-huijts/xcode-mcp-server.git cd xcode-mcp-serverInstall dependencies:
npm installSet up environment variables:
cp .env.example .envEdit
.envand setPROJECTS_BASE_DIRto 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/projectswith the actual path to your Xcode projects directory.
After updating the configuration, restart Claude Desktop for the changes to take effect.
Working with the Server
The server provides a natural interface for Claude to assist with your Xcode development. Here are some ways you can interact:
Project Navigation
Ask Claude to:
"Set my Xcode projects directory to
/Users/username/Documents/XcodeProjects""What's my current active project?"
"Switch to the MyApp.xcodeproj project"
"Show me all Swift files in the project"
Code Creation & Modification
Get help with:
"Create a new view called ProfileView with a preview provider"
"Add a @Published email property to UserModel.swift"
"Set up a modern async/await networking layer"
"Implement Core Data models with SwiftUI bindings"
Project Analysis & Building
Let Claude assist with:
"Analyze NetworkManager.swift for potential issues"
"Build the project in Debug configuration"
"Run the unit tests for the UserModel module"
"What build schemes are available?"
Development and Debugging
Building the Project
npm run buildRunning Tests
npm testTroubleshooting
The server provides detailed logging through stderr. Common issues and their solutions:
Project Detection Issues
Verify your projects directory path
Ensure Xcode Command Line Tools are installed
Check file permissions
Build Problems
Validate Xcode installation
Check project configurations
Review build settings
Contributing
We welcome contributions! Whether it's:
🐛 Bug fixes
✨ New features
📚 Documentation improvements
🧪 Additional tests
Feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceBridges Claude AI with Xcode, enabling AI-powered code assistance, project management, and automated development tasks securely on your local machine.Last updated155384MIT
- FlicenseAqualityDmaintenanceThe server facilitates natural language interactions for exploring and understanding codebases, providing insights into data models and system architecture using a cost-effective, simple setup with support for existing Claude Pro subscriptions.Last updated427
- Alicense-qualityFmaintenanceA modular server implementation for Claude AI assistants with integrated tools, enabling Claude to perform actions and access external resources like file systems, web searches, browser automation, financial data, and document generation.Last updated109MIT
- Alicense-qualityDmaintenanceA server that enables AI assistants like Claude to safely run Python code and access websites, processing data for better AI understanding while providing helpful error messages.Last updated3GPL 3.0
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zackbissell/xcode-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server