Xcode MCP Server

Xcode MCP Server

A Model Context Protocol server that enables AI assistants to build and test Xcode projects directly through a standardized interface, with capabilities for running tests, monitoring progress, and accessing logs in real-time.

PolarVista

Remote Shell Execution
Database Interaction
AI Content Generation
AI Integration Systems
Data & App Analysis
Visit Server

README

Xcode MCP Server

<p align="center"> <strong>A Model Context Protocol server for building Xcode projects directly from LLM applications</strong> </p>

The Xcode MCP Server provides a Model Context Protocol interface for building and testing Xcode projects. It enables AI assistants to directly trigger builds, run tests, monitor progress, and access logs through a standardized interface.

Features

  • Build Xcode projects with custom schemes and configurations
  • Run unit tests with granular control (run specific tests or skip tests)
  • Generate code coverage reports
  • Stream build and test logs in real-time
  • Access detailed build and test reports
  • JSON-formatted output
  • Automatic log persistence

Requirements

  • Node.js 16+
  • Xcode Command Line Tools
  • TypeScript
  • MCP-compatible client (e.g., Claude Desktop)

Installation

# Clone the repository
git clone https://github.com/PolarVista/Xcode-mcp-server.git
cd xcode-mcp-server

# Install dependencies
npm install

# Build the server
npm run build

Usage with Claude Desktop

  1. Start the server:

    npm run start /path/to/build/logs/directory
    
  2. In Claude Desktop settings:

           "command": "node",
           "args": ["/path/to/the/xcode-mcp-server/build/index.js",
                    "/path/to/your/project/folder"],
           "env": {
             "PATH": "/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin"
       }
    

Available Tools

build_project

Builds an Xcode project with specified parameters.

Parameters:

  • projectPath (required): Path to the .xcodeproj or .xcworkspace
  • scheme (required): Build scheme name
  • configuration (optional): Build configuration (Debug/Release, defaults to Debug)
  • destination (optional): Build destination (defaults to "platform=iOS Simulator,name=iPhone 15 Pro")

Example usage in Claude:

build_project({
  projectPath: "/path/to/Project.xcodeproj",
  scheme: "MyApp",
  configuration: "Debug"
})

run_tests

Runs unit tests with optional filtering.

Parameters:

  • projectPath (required): Path to the .xcodeproj or .xcworkspace
  • scheme (required): Test scheme name
  • testIdentifier (optional): Specific test to run (e.g., 'MyTests/testExample')
  • skipTests (optional): Array of test identifiers to skip
  • configuration (optional): Build configuration (Debug/Release, defaults to Debug)
  • destination (optional): Test destination (defaults to "platform=iOS Simulator,name=iPhone 15 Pro")

Example usage in Claude:

run_tests({
  projectPath: "/path/to/Project.xcodeproj",
  scheme: "MyAppTests",
  testIdentifier: "LoginTests/testSuccessfulLogin",
  skipTests: ["PerformanceTests/testLargeDataLoad"],
  configuration: "Debug"
})

Logs

  • All logs are stored in the specified base directory under build-logs/
  • Build operations create:
    • Plain text log (build-[timestamp].log)
    • JSON-formatted log (build-[timestamp].log.json)
    • Xcode report (report-[timestamp].txt)
  • Test operations create:
    • Test log (test-[timestamp].log)
    • JSON-formatted log (test-[timestamp].log.json)
    • Test report (test-report-[timestamp].txt)
    • Code coverage report (coverage-[timestamp].txt)
  • Latest log (build or test) is accessible via the xcode-build://latest-log resource

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
AIO-MCP Server

AIO-MCP Server

🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from

Featured
Local
Persistent Knowledge Graph

Persistent Knowledge Graph

An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.

Featured
Local
Hyperbrowser MCP Server

Hyperbrowser MCP Server

Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to

Featured
Local
React MCP

React MCP

react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts

Featured
Local