Cover image
Try Now
2024-12-06

3 years

Works with Finder

1

Github Watches

2

Github Forks

34

Github Stars

Xcode MCP Server

A Model Context Protocol server for building Xcode projects directly from LLM applications

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

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Teach you all the details related to YouTube. Solve all your YouTube-related issues.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Brendan Bradley
  • Shares clean telebot code snippets.

  • meiko patton
  • Expertly compares newsletter platforms with a Beehiiv bonus

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • 2013xile
  • OpenAPI specifications => MCP (Model Context Protocol) tools

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • oatpp
  • Anthropic’s Model Context Protocol implementation for Oat++

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • ariofarmani
  • Test repository for GitHub MCP server functionality

    Reviews

    1 (1)
    Avatar
    user_64Tv012H
    2025-04-16

    As an avid user of GitLab from MCP, I am thoroughly impressed with its comprehensive features for version control and CI/CD pipelines. The seamless integration and robust performance make it an indispensable tool for my projects. The support and documentation are outstanding, providing clear guidance for setup and usage. I highly recommend GitLab by MCP to anyone in need of a reliable and efficient development platform.