ios -code-quality
This server enables AI assistants to run Xcode tests, perform linter analysis, and provide detailed feedback on iOS projects through structured, actionable reports.
claude mcp add --transport stdio a-25-ios-mcp-code-quality-server npx ios-mcp-code-quality-server \ --env PORT="3000 (default)" \ --env LOG_LEVEL="info (optional, e.g., debug, info, warn, error)"
How to use
This MCP server implements AI-assisted code quality analysis for iOS projects. When run without CLI arguments, it starts an MCP server that listens on localhost:3000 and responds to Model Context Protocol requests with structured, machine-readable analysis reports. The server integrates with your CI or AI assistants to provide actionable feedback about iOS test results, SwiftLint findings, and build diagnostics. If you prefer a direct CLI workflow, you can still invoke the bundled CLI via npx to run tests or lint locally, while the MCP server mode is designed for AI-assisted conversations and interactive debugging.
To use with an AI assistant, point the assistant at http://localhost:3000 and ensure it is configured to send MCP requests to that endpoint. The server returns contextual recommendations, file/line references, and potential next steps to improve code quality and test reliability. The CLI remains available for developers who want quick test runs, lint checks, or ad-hoc analysis without starting the MCP server.
How to install
Prerequisites:
- Node.js 18+ installed on your machine
- npm installed with Node.js
- Xcode and iOS tooling if you plan to run actual tests locally
Setup steps:
-
Clone the repository (or prepare your project as described in the MCP docs): git clone https://github.com/a-25/ios-mcp-code-quality-server.git cd ios-mcp-code-quality-server
-
Install dependencies: npm install
-
Build the project (if applicable): npm run build
-
Start the MCP server (default MCP mode): npm start
or explicitly as server mode
node dist/index.js server
-
Verify the server is running: Open http://localhost:3000 in your browser or send a test MCP request from your AI assistant configuration.
Additional notes
Notes and tips:
- The MCP server runs by default on port 3000; you can override this with the PORT environment variable (e.g., PORT=3001).
- For debugging and verbose output, set LOG_LEVEL to debug.
- The server provides structured MCP responses suitable for AI assistants, including file locations and line numbers for issues found during analysis.
- The CLI (invoked via npx) supports commands like test and lint, enabling quick local workflows without starting the server.
- If you plan to integrate with an AI assistant, ensure your assistant sends MCP-compatible requests to the configured URL and handles the JSON responses accordingly.
- While SwiftLint is optional, having it installed improves code quality feedback when using the CLI lint command.
Related MCP Servers
XcodeBuildMCP
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
ultracite
A highly opinionated, zero-configuration linter and formatter.
Claude-Project-Coordinator
Claude Project Coordinator is a Swift-powered MCP (Model Context Protocol) server designed to streamline multi-project Xcode development. It lets you track project status, auto-detect frameworks, search code patterns, and maintain a structured development knowledge base — all locally, with Claude Desktop as your assistant.
pinmeto-location
PinMeTo MCP server that enables users with authorized credentials to unlock their data
swift-patterns
An MCP server providing curated Swift and SwiftUI best practices from leading iOS sources.
instruments
MCP server for Xcode Instruments — AI agents get structured performance profiling (CPU, SwiftUI, memory, hitches) instead of raw xctrace XML