Bug Description
When no configuration is provided (neither as a tool parameter nor a session default), every build/test/path tool injects -configuration Debug into the xcodebuild invocation. This overrides the configuration that the scheme's Run action would otherwise select.
xcodebuild, run on its own, picks the configuration from the scheme. By always passing -configuration Debug, XcodeBuildMCP forces resolution against Debug.xcconfig instead of the scheme's actual Run configuration. In a project where the scheme's Run action uses a custom configuration (e.g. Debug-dev), this produces the wrong build settings — including the wrong bundle identifier.
Concrete example from a real project:
- Scheme's Run action configuration:
Debug-dev -> Development.xcconfig -> com.example.app.dev (expected)
- Forced
-configuration Debug -> Debug.xcconfig -> com.example.app (what actually gets built)
Debug Output
⚙️ XcodeBuildMCP Doctor
Generated: 2026-06-03T14:21:14.316Z
Server Version: 2.6.2
Output Mode: Redacted (default)
System Information
platform: darwin
release: 25.5.0
arch: arm64
cpus: 10 x Apple M1 Pro
memory: 32 GB
Node.js Information
version: v25.2.1
platform: darwin
arch: arm64
Xcode Information
version: Xcode 26.5 - Build version 17F42
path: /Applications/Xcode-26.5.0.app/Contents/Developer
selectedXcode: /Applications/Xcode-26.5.0.app/Contents/Developer/usr/bin/xcodebuild
xcrunVersion: xcrun version 72.
Dependencies
axe: 1.7.1
mise: 2026.5.18 macos-arm64 (2026-05-31)
Environment Variables
XCODEBUILDMCP_RUNTIME: cli
XCODEBUILDMCP_SILENCE_LOGS: true
UI Automation (axe)
Available: Yes
UI Automation Supported: Yes
Manifest Tool Inventory
Total Unique Tools: 82
Workflow Count: 15
Tool Availability Summary
Build Tools: Available
UI Automation Tools: Available
Incremental Build Support: Not available
Sentry
Sentry enabled: Yes
✅ Doctor diagnostics complete
Editor/Client
Claude Code
MCP Server Version
2.6.2
LLM
Claude Opus 4.8
MCP Configuration
"XcodeBuildMCP": {
"args": [
"-y",
"xcodebuildmcp@latest",
"mcp"
],
"command": "npx",
"env": {},
"type": "stdio"
}
Steps to Reproduce
- Use a project whose scheme's Run action is set to a non-
Debug configuration (e.g. Debug-dev).
- Ask the agent to build for simulator/device without specifying a
configuration, and without a configuration session default set.
- Inspect the generated
xcodebuild command in the build log.
Expected Behavior
When neither an explicit configuration argument nor a session default is set, -configuration should be omitted so xcodebuild honors the scheme's configuration for the chosen action.
Actual Behavior
-configuration Debug is always passed, silently overriding the scheme and producing the wrong build settings/bundle id for projects whose scheme uses a non-Debug Run configuration.
Root cause:
// src/mcp/tools/simulator/build_sim.ts:103 (same pattern in device/macos/clean/path tools)
const configuration = params.configuration ?? 'Debug';
// src/utils/build-utils.ts:97 — pushed unconditionally
command.push('-configuration', params.configuration);
SharedBuildParams.configuration is typed as required string (src/types/common.ts:135), so no code path omits the flag. Session defaults allow configuration: string | null and only merge concrete non-null values, so an unset configuration always falls through to the hardcoded Debug.
Error Messages
(none — silent wrong-config build)
Bug Description
When no
configurationis provided (neither as a tool parameter nor a session default), every build/test/path tool injects-configuration Debuginto thexcodebuildinvocation. This overrides the configuration that the scheme's Run action would otherwise select.xcodebuild, run on its own, picks the configuration from the scheme. By always passing-configuration Debug, XcodeBuildMCP forces resolution againstDebug.xcconfiginstead of the scheme's actual Run configuration. In a project where the scheme's Run action uses a custom configuration (e.g.Debug-dev), this produces the wrong build settings — including the wrong bundle identifier.Concrete example from a real project:
Debug-dev->Development.xcconfig->com.example.app.dev(expected)-configuration Debug->Debug.xcconfig->com.example.app(what actually gets built)Debug Output
Editor/Client
Claude Code
MCP Server Version
2.6.2
LLM
Claude Opus 4.8
MCP Configuration
Steps to Reproduce
Debugconfiguration (e.g.Debug-dev).configuration, and without aconfigurationsession default set.xcodebuildcommand in the build log.Expected Behavior
When neither an explicit
configurationargument nor a session default is set,-configurationshould be omitted soxcodebuildhonors the scheme's configuration for the chosen action.Actual Behavior
-configuration Debugis always passed, silently overriding the scheme and producing the wrong build settings/bundle id for projects whose scheme uses a non-DebugRun configuration.Root cause:
SharedBuildParams.configurationis typed as requiredstring(src/types/common.ts:135), so no code path omits the flag. Session defaults allowconfiguration: string | nulland only merge concrete non-null values, so an unset configuration always falls through to the hardcodedDebug.Error Messages
(none — silent wrong-config build)