XcodeBuild Mini MCP Server
Provides Xcode build operations including building schemes, listing and running tests, building tests, and listing packages in Xcode projects.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@XcodeBuild Mini MCP Serverrun tests for MyApp"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
XcodeBuild Mini MCP Server
An MCP (Model Context Protocol) server that provides Xcode build operations through the MCP interface, following the official MCP Node.js guide.
Features
This MCP server provides the following tools:
build - Build an Xcode scheme
list_tests - List all tests for an Xcode scheme
build_tests - Build tests for an Xcode scheme
run_tests - Run tests for an Xcode scheme (with optional test filtering)
list_packages - List all packages in the Xcode project
Related MCP server: Xcode MCP Server
Installation
Install dependencies:
npm installBuild the TypeScript code:
npm run buildUsage
Running the MCP Server
npm startOr for development:
npm run devMCP Client Configuration
To use this MCP server with an MCP client, add it to your client configuration:
{
"mcpServers": {
"xcodebuild-mini": {
"command": "npx",
"args": ["-y", "@roeybiran/xcodebuild-mini-mcp"],
}
}
}Available Tools
build
Build an Xcode scheme.
Parameters:
scheme(required): The Xcode scheme to buildwarn(optional): Show warnings in output (default: false)
Example:
{
"name": "build",
"arguments": {
"scheme": "MyApp",
"warn": true
}
}list_tests
List all tests for an Xcode scheme.
Parameters:
scheme(required): The Xcode scheme to list tests for
Example:
{
"name": "list_tests",
"arguments": {
"scheme": "MyApp"
}
}build_tests
Build tests for an Xcode scheme.
Parameters:
scheme(required): The Xcode scheme to build tests for
Example:
{
"name": "build_tests",
"arguments": {
"scheme": "MyApp"
}
}run_tests
Run tests for an Xcode scheme.
Parameters:
scheme(required): The Xcode scheme to run tests foronly(optional): Run only specific test
Example:
{
"name": "run_tests",
"arguments": {
"scheme": "MyApp",
"only": "MyAppTests/testExample"
}
}list_packages
List all packages in the Xcode project.
Parameters: None
Example:
{
"name": "list_packages",
"arguments": {}
}Requirements
Node.js 18+
Xcode command line tools
The
xcodebuildcommand must be available in PATH
Development
Project Structure
xcodebuild-mini-mcp/
├── src/
│ ├── index.ts # Main MCP server implementation (following MCP guide patterns)
│ └── xcodebuild.ts # TypeScript implementation of Xcode build operations
├── dist/ # Compiled JavaScript output
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This fileImplementation Details
This server follows the official MCP Node.js guide patterns:
Server Initialization: Uses the recommended
Serverclass from@modelcontextprotocol/sdkTransport: Uses
StdioServerTransportfor stdio-based communicationTool Handlers: Implements
ListToolsRequestSchemaandCallToolRequestSchemahandlersError Handling: Proper error handling with structured responses
Logging: Uses
console.errorfor logging (stdout is reserved for JSON-RPC messages)
Building
npm run buildDevelopment Mode
npm run devError Handling
The MCP server handles errors gracefully and returns structured error responses. Common error scenarios include:
Invalid scheme names
Build failures
Test execution failures
Missing dependencies
All errors are returned with descriptive messages and proper error flags.
License
MIT
Available Tools
4 toolsbuildA
Build the project, not including test targets
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | The source directory path | |
| warn | No | Whether to show warnings in the output | |
| scheme | Yes | The scheme name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description 'Build the project' does not disclose behavioral traits such as side effects, error conditions, output details, or prerequisites beyond the schema parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no fluff, effectively conveying the tool's purpose and exclusion of test targets.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters and no output schema, the description is somewhat complete but lacks behavioral context such as output location, build process details, or caching behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does not add any parameter-specific information beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Build the project, not including test targets' clearly states the action (build) and the resource (project), and explicitly distinguishes from sibling tools like build_tests by excluding test targets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (when building the main project without tests), but does not explicitly state when not to use it or name alternatives like build_tests for test targets.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
build_testsB
Build the project, including test targets
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | The source directory path | |
| warn | No | Whether to show warnings in the output | |
| scheme | Yes | The scheme name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavioral traits. It only states the action of building, omitting side effects (e.g., artifact generation, output location, success/failure indicators) or any operational constraints like required environment or duration.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words. However, for a build tool with 3 parameters, it could be slightly expanded to include key behavioral notes without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description lacks essential context for a build tool, such as expected outcomes (e.g., compiled binaries), error behavior, or prerequisites (e.g., source code present). Schema coverage alone does not compensate for missing operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are fully documented structurally. The description adds no additional meaning beyond the schema, which is acceptable per baseline scoring. No parameter-specific semantics are provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the verb 'Build' and clearly specifies the resource as 'the project, including test targets'. This distinguishes it from sibling tools 'build' (likely without tests), 'list_tests', and 'run_tests', making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for building test targets but does not explicitly state when to use this tool versus alternatives like 'build' for plain builds or 'run_tests' after building. No prerequisites or exclusions are mentioned, leaving the agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_testsC
List all tests for the project
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | The source directory path | |
| scheme | Yes | The scheme name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description does not disclose any behavioral traits (e.g., side effects, permissions, performance). Only states the action without additional context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise single sentence. However, it is too brief and lacks detail that would be valuable for an agent. Could add context without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with two parameters, this description is minimally complete. However, it does not explain what 'tests' means (e.g., test files vs test cases) or how the project is identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. Description does not add value beyond schema, but baseline is 3 due to high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb and resource: 'list tests'. Distinguishes from siblings (build, build_tests, run_tests) by being a listing operation. However, does not specify scope beyond 'for the project'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. No mention of prerequisites or context for listing tests. Implied usage only.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_testsC
Runs the project's tests
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | The source directory path | |
| only | No | Specific tests to run. Provide the full path to the test - TestTarget/TestSuite/TestName, including parentheses (e.g. 'MyAppTests/MyTestSuite/testExample()') | |
| scheme | Yes | The scheme name | |
| coverage | No | Whether to generate code coverage |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose what happens when tests are run (e.g., output format, exit codes, coverage generation) or whether there are side effects. With no annotations, the agent has minimal insight into the tool's behavior beyond the generic verb.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
At one sentence, the description is concise, but it is too sparse to be fully informative. It lacks structure or detail that could aid an agent, though it does not waste words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 4 parameters and no output schema, yet the description does not explain what the tool returns or how to interpret results. For a test runner, this is a significant gap, leaving the agent without critical information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameters are well-documented in the schema. The description adds no additional context about parameter usage or relationships, which is acceptable as the schema suffices, but no extra value is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Runs the project's tests' clearly states the action and resource, but it is too generic. It does not differentiate from sibling tools like 'build' or 'build_tests', and omits nuances like running specific tests (via 'only' parameter) or configurations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing to build first) or describe scenarios where this tool is appropriate compared to 'build_tests' or 'list_tests'. The agent is left to infer usage from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.11- First observed
build - First observed
build_tests - First observed
list_tests - First observed
run_tests
TDQS
Each tool serves a unique purpose: build (without tests), build_tests (with tests), list_tests (list test targets), and run_tests (execute tests). No overlap in functionality.
All tool names follow a consistent verb_noun pattern: build, build_tests, list_tests, run_tests. The naming is predictable and uniform.
Four tools cover the essential build and test workflow without unnecessary bloat. The count is well-scoped for a focused Xcode build server.
The set covers core build and test operations (build with/without tests, list/run tests). Missing cleanup or individual test selection, but minimal for a 'mini' server.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for todo.vu task management and time tracking.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
A Model Context Protocol (MCP) server for Selise Blocks Cloud integration
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that provides tools for Xcode-related operations, making it easier to work with iOS project management, building, testing, archiving, and deploying apps to both simulators and physical devices.9199MIT
- AlicenseBqualityCmaintenanceProvides programmatic access to Xcode functionality, enabling AI assistants to create, build, test, and manage iOS/macOS projects directly.3375MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Xcode projects by listing targets, reading configurations, and triggering builds via the Model Context Protocol. It facilitates natural language interaction with macOS developer tools to streamline iOS app development processes.6234MIT
- AlicenseNot gradedqualityDmaintenanceProvides a standardized interface for interacting with Trello's tools and services through the Model Context Protocol.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/roeybiran/xcodebuild-mini-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server