A2

a-25/ios-mcp-code-quality-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

12 stars 3 forks 质量 62 趋势 19MIT

This server enables AI assistants to run Xcode tests, perform linter analysis, and provide detailed feedback on iOS projects through structured, actionable reports.

概览

A versatile iOS code quality analysis tool that operates in two modes: 1. : Direct command-line interface for iOS testing and linting 2. : Model Context Protocol server for AI assistant integration This tool provides comprehensive iOS code quality analysis and test automation capabilities, enabling both direct developer usage and AI assistant integration for Xcode tests, linter analysis, and detailed feedback on iOS projects through structured, actionable reports. For frequent use across multiple projects, you can install globally: Using npx is recommended as it ensures you always use the latest version without global installs. The server will start on http://localhost:3000 and be ready to receive MCP requests.

README

以下为原文 README 节选,完整内容请查看原文。

iOS MCP Code Quality Server

A versatile iOS code quality analysis tool that operates in two modes:

  1. CLI Tool: Direct command-line interface for iOS testing and linting
  2. MCP Server: Model Context Protocol server for AI assistant integration

This tool provides comprehensive iOS code quality analysis and test automation capabilities, enabling both direct developer usage and AI assistant integration for Xcode tests, linter analysis, and detailed feedback on iOS projects through structured, actionable reports.

Quick Start

Use instantly without installation:

# Run iOS tests
npx ios-mcp-code-quality-server test --xcworkspace MyApp.xcworkspace --scheme MyAppTests

# Run SwiftLint analysis
npx ios-mcp-code-quality-server lint --changed-files "ViewController.swift,Model.swift"

# Show help
npx ios-mcp-code-quality-server --help

Alternative: Install Globally (Optional)

For frequent use across multiple projects, you can install globally:

npm install -g ios-mcp-code-quality-server

# Then use the full name (following MCP conventions)
ios-mcp-code-quality-server test --xcworkspace MyApp.xcworkspace --scheme MyAppTests
ios-mcp-code-quality-server lint --changed-files "ViewController.swift,Model.swift"

💡 Tip: Using npx is recommended as it ensures you always use the latest version without global installs.

MCP Server Mode (AI Assistant Integration)

# Start as MCP server (no arguments)
npx ios-mcp-code-quality-server

# Or explicitly start server mode
npx ios-mcp-code-quality-server server

The server will start on http://localhost:3000 and be ready to receive MCP requests.

Features

  • 🧪 iOS Test Execution: Run Xcode tests with detailed failure analysis
  • 📱 Multiple Schemes Support: Test different iOS project configurations
  • 🔍 SwiftLint Integration: Automated Swift code style and quality checking
  • 📊 Structured Reporting: Clear, actionable feedback with file locations and line numbers
  • 🛠 Build Error Detection: Intelligent parsing of Xcode build failures
  • 🔒 Local Processing: All analysis happens on your machine for security
  • ⚡ Dual Mode Operation: Use as CLI tool or MCP server
  • 💻 Command Line Interface: Direct terminal usage for developers
  • 🤖 AI Assistant Ready: MCP protocol support for seamless AI integration

Architecture

This tool operates in two distinct modes with intelligent detection:

CLI Mode

  • Activation: When command-line arguments are provided
  • Usage: Direct developer interaction via terminal commands or npx
  • Output: Human-readable or JSON format for scripting
在 GitHub 查看完整 README

安装

npx ios-mcp-code-quality-server test --xcworkspace MyApp.xcworkspace --scheme MyAppTests
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ios-code-quality": { "url": "http://localhost:3000", "timeout": 30000 } } }