Xcode MCP Server
Overview
Xcode MCP Server is a Model Context Protocol server designed for building and testing Xcode projects using AI applications. It allows users to trigger builds, run tests, and access logs seamlessly through a standardized interface.
To use the Xcode MCP Server, clone the repository, install dependencies, build the server, and configure your AI application (like Claude Desktop) to communicate with it by providing the necessary project parameters.
- Build Xcode projects with custom configurations - Run unit tests with detailed control over which tests to execute - Generate and view code coverage reports - Stream logs in real-time for builds and tests - Provide JSON-formatted output for easy integration - Automatic persistence of build and test logs
- Automating Xcode project builds from AI-powered IDEs
- Running specific unit tests as part of a CI/CD pipeline
- Monitoring build progress in real-time for Xcode applications
Add to your AI client
Use these steps to connect Xcode MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"xcode-mcp-server-polarvista": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"xcode-mcp-server-polarvista": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"xcode-mcp-server-polarvista": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"xcode-mcp-server-polarvista": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"xcode-mcp-server-polarvista": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"xcode-mcp-server-polarvista": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xcode-mcp-server-polarvista"
]
}
}
}FAQ
What are the requirements for Xcode MCP Server?
Requires Node.js 16+, Xcode Command Line Tools, and a TypeScript environment.
Can I use Xcode MCP Server with any AI application?
Yes, as long as the AI application supports the Model Context Protocol.
Are the logs generated by Xcode MCP Server accessible?
Yes, all logs are stored in a specified build logs directory and can be accessed easily.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":156,"uuid":"d2178fa0-a2f0-4e28-85f9-65bc456db02c","name":"Xcode-mcp-server","title":"Xcode MCP Server","description":null,"avatar_url":"https://avatars.githubusercontent.com/u/177375436?v=4","created_at":"2024-12-13T09:02:40.023Z","updated_at":"2024-12-13T12:28:12.051Z","status":"created","author_name":"PolarVista","author_avatar_url":"https://avatars.githubusercontent.com/u/177375436?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/PolarVista/Xcode-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]