From 94de92188e723874162c3e31a0bc593a52e4a3ef Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Thu, 1 Jan 2026 18:13:04 +0000 Subject: [PATCH 1/2] Commit generated files --- .gitignore | 3 - src/core/generated-plugins.ts | 396 ++++++++++++++++++++++++++++++++ src/core/generated-resources.ts | 19 ++ src/version.ts | 3 + 4 files changed, 418 insertions(+), 3 deletions(-) create mode 100644 src/core/generated-plugins.ts create mode 100644 src/core/generated-resources.ts create mode 100644 src/version.ts diff --git a/.gitignore b/.gitignore index f49d4c5e..5a29692b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,6 @@ dist/ *.tsbuildinfo # Auto-generated files -src/version.ts -src/core/generated-plugins.ts -src/core/generated-resources.ts # IDE and editor files .idea/ diff --git a/src/core/generated-plugins.ts b/src/core/generated-plugins.ts new file mode 100644 index 00000000..0ca52998 --- /dev/null +++ b/src/core/generated-plugins.ts @@ -0,0 +1,396 @@ +// AUTO-GENERATED - DO NOT EDIT +// This file is generated by the plugin discovery esbuild plugin + +// Generated based on filesystem scan +export const WORKFLOW_LOADERS = { + device: async () => { + const { workflow } = await import('../mcp/tools/device/index.js'); + const tool_0 = await import('../mcp/tools/device/build_device.js').then((m) => m.default); + const tool_1 = await import('../mcp/tools/device/clean.js').then((m) => m.default); + const tool_2 = await import('../mcp/tools/device/discover_projs.js').then((m) => m.default); + const tool_3 = await import('../mcp/tools/device/get_app_bundle_id.js').then((m) => m.default); + const tool_4 = await import('../mcp/tools/device/get_device_app_path.js').then( + (m) => m.default, + ); + const tool_5 = await import('../mcp/tools/device/install_app_device.js').then((m) => m.default); + const tool_6 = await import('../mcp/tools/device/launch_app_device.js').then((m) => m.default); + const tool_7 = await import('../mcp/tools/device/list_devices.js').then((m) => m.default); + const tool_8 = await import('../mcp/tools/device/list_schemes.js').then((m) => m.default); + const tool_9 = await import('../mcp/tools/device/show_build_settings.js').then( + (m) => m.default, + ); + const tool_10 = await import('../mcp/tools/device/start_device_log_cap.js').then( + (m) => m.default, + ); + const tool_11 = await import('../mcp/tools/device/stop_app_device.js').then((m) => m.default); + const tool_12 = await import('../mcp/tools/device/stop_device_log_cap.js').then( + (m) => m.default, + ); + const tool_13 = await import('../mcp/tools/device/test_device.js').then((m) => m.default); + + return { + workflow, + build_device: tool_0, + clean: tool_1, + discover_projs: tool_2, + get_app_bundle_id: tool_3, + get_device_app_path: tool_4, + install_app_device: tool_5, + launch_app_device: tool_6, + list_devices: tool_7, + list_schemes: tool_8, + show_build_settings: tool_9, + start_device_log_cap: tool_10, + stop_app_device: tool_11, + stop_device_log_cap: tool_12, + test_device: tool_13, + }; + }, + doctor: async () => { + const { workflow } = await import('../mcp/tools/doctor/index.js'); + const tool_0 = await import('../mcp/tools/doctor/doctor.js').then((m) => m.default); + + return { + workflow, + doctor: tool_0, + }; + }, + logging: async () => { + const { workflow } = await import('../mcp/tools/logging/index.js'); + const tool_0 = await import('../mcp/tools/logging/start_device_log_cap.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/logging/start_sim_log_cap.js').then((m) => m.default); + const tool_2 = await import('../mcp/tools/logging/stop_device_log_cap.js').then( + (m) => m.default, + ); + const tool_3 = await import('../mcp/tools/logging/stop_sim_log_cap.js').then((m) => m.default); + + return { + workflow, + start_device_log_cap: tool_0, + start_sim_log_cap: tool_1, + stop_device_log_cap: tool_2, + stop_sim_log_cap: tool_3, + }; + }, + macos: async () => { + const { workflow } = await import('../mcp/tools/macos/index.js'); + const tool_0 = await import('../mcp/tools/macos/build_macos.js').then((m) => m.default); + const tool_1 = await import('../mcp/tools/macos/build_run_macos.js').then((m) => m.default); + const tool_2 = await import('../mcp/tools/macos/clean.js').then((m) => m.default); + const tool_3 = await import('../mcp/tools/macos/discover_projs.js').then((m) => m.default); + const tool_4 = await import('../mcp/tools/macos/get_mac_app_path.js').then((m) => m.default); + const tool_5 = await import('../mcp/tools/macos/get_mac_bundle_id.js').then((m) => m.default); + const tool_6 = await import('../mcp/tools/macos/launch_mac_app.js').then((m) => m.default); + const tool_7 = await import('../mcp/tools/macos/list_schemes.js').then((m) => m.default); + const tool_8 = await import('../mcp/tools/macos/show_build_settings.js').then((m) => m.default); + const tool_9 = await import('../mcp/tools/macos/stop_mac_app.js').then((m) => m.default); + const tool_10 = await import('../mcp/tools/macos/test_macos.js').then((m) => m.default); + + return { + workflow, + build_macos: tool_0, + build_run_macos: tool_1, + clean: tool_2, + discover_projs: tool_3, + get_mac_app_path: tool_4, + get_mac_bundle_id: tool_5, + launch_mac_app: tool_6, + list_schemes: tool_7, + show_build_settings: tool_8, + stop_mac_app: tool_9, + test_macos: tool_10, + }; + }, + 'project-discovery': async () => { + const { workflow } = await import('../mcp/tools/project-discovery/index.js'); + const tool_0 = await import('../mcp/tools/project-discovery/discover_projs.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/project-discovery/get_app_bundle_id.js').then( + (m) => m.default, + ); + const tool_2 = await import('../mcp/tools/project-discovery/get_mac_bundle_id.js').then( + (m) => m.default, + ); + const tool_3 = await import('../mcp/tools/project-discovery/list_schemes.js').then( + (m) => m.default, + ); + const tool_4 = await import('../mcp/tools/project-discovery/show_build_settings.js').then( + (m) => m.default, + ); + + return { + workflow, + discover_projs: tool_0, + get_app_bundle_id: tool_1, + get_mac_bundle_id: tool_2, + list_schemes: tool_3, + show_build_settings: tool_4, + }; + }, + 'project-scaffolding': async () => { + const { workflow } = await import('../mcp/tools/project-scaffolding/index.js'); + const tool_0 = await import('../mcp/tools/project-scaffolding/scaffold_ios_project.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/project-scaffolding/scaffold_macos_project.js').then( + (m) => m.default, + ); + + return { + workflow, + scaffold_ios_project: tool_0, + scaffold_macos_project: tool_1, + }; + }, + 'session-management': async () => { + const { workflow } = await import('../mcp/tools/session-management/index.js'); + const tool_0 = await import('../mcp/tools/session-management/session_clear_defaults.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/session-management/session_set_defaults.js').then( + (m) => m.default, + ); + const tool_2 = await import('../mcp/tools/session-management/session_show_defaults.js').then( + (m) => m.default, + ); + + return { + workflow, + session_clear_defaults: tool_0, + session_set_defaults: tool_1, + session_show_defaults: tool_2, + }; + }, + simulator: async () => { + const { workflow } = await import('../mcp/tools/simulator/index.js'); + const tool_0 = await import('../mcp/tools/simulator/boot_sim.js').then((m) => m.default); + const tool_1 = await import('../mcp/tools/simulator/build_run_sim.js').then((m) => m.default); + const tool_2 = await import('../mcp/tools/simulator/build_sim.js').then((m) => m.default); + const tool_3 = await import('../mcp/tools/simulator/clean.js').then((m) => m.default); + const tool_4 = await import('../mcp/tools/simulator/describe_ui.js').then((m) => m.default); + const tool_5 = await import('../mcp/tools/simulator/discover_projs.js').then((m) => m.default); + const tool_6 = await import('../mcp/tools/simulator/get_app_bundle_id.js').then( + (m) => m.default, + ); + const tool_7 = await import('../mcp/tools/simulator/get_sim_app_path.js').then( + (m) => m.default, + ); + const tool_8 = await import('../mcp/tools/simulator/install_app_sim.js').then((m) => m.default); + const tool_9 = await import('../mcp/tools/simulator/launch_app_logs_sim.js').then( + (m) => m.default, + ); + const tool_10 = await import('../mcp/tools/simulator/launch_app_sim.js').then((m) => m.default); + const tool_11 = await import('../mcp/tools/simulator/list_schemes.js').then((m) => m.default); + const tool_12 = await import('../mcp/tools/simulator/list_sims.js').then((m) => m.default); + const tool_13 = await import('../mcp/tools/simulator/open_sim.js').then((m) => m.default); + const tool_14 = await import('../mcp/tools/simulator/record_sim_video.js').then( + (m) => m.default, + ); + const tool_15 = await import('../mcp/tools/simulator/screenshot.js').then((m) => m.default); + const tool_16 = await import('../mcp/tools/simulator/show_build_settings.js').then( + (m) => m.default, + ); + const tool_17 = await import('../mcp/tools/simulator/stop_app_sim.js').then((m) => m.default); + const tool_18 = await import('../mcp/tools/simulator/test_sim.js').then((m) => m.default); + + return { + workflow, + boot_sim: tool_0, + build_run_sim: tool_1, + build_sim: tool_2, + clean: tool_3, + describe_ui: tool_4, + discover_projs: tool_5, + get_app_bundle_id: tool_6, + get_sim_app_path: tool_7, + install_app_sim: tool_8, + launch_app_logs_sim: tool_9, + launch_app_sim: tool_10, + list_schemes: tool_11, + list_sims: tool_12, + open_sim: tool_13, + record_sim_video: tool_14, + screenshot: tool_15, + show_build_settings: tool_16, + stop_app_sim: tool_17, + test_sim: tool_18, + }; + }, + 'simulator-management': async () => { + const { workflow } = await import('../mcp/tools/simulator-management/index.js'); + const tool_0 = await import('../mcp/tools/simulator-management/boot_sim.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/simulator-management/erase_sims.js').then( + (m) => m.default, + ); + const tool_2 = await import('../mcp/tools/simulator-management/list_sims.js').then( + (m) => m.default, + ); + const tool_3 = await import('../mcp/tools/simulator-management/open_sim.js').then( + (m) => m.default, + ); + const tool_4 = await import('../mcp/tools/simulator-management/reset_sim_location.js').then( + (m) => m.default, + ); + const tool_5 = await import('../mcp/tools/simulator-management/set_sim_appearance.js').then( + (m) => m.default, + ); + const tool_6 = await import('../mcp/tools/simulator-management/set_sim_location.js').then( + (m) => m.default, + ); + const tool_7 = await import('../mcp/tools/simulator-management/sim_statusbar.js').then( + (m) => m.default, + ); + + return { + workflow, + boot_sim: tool_0, + erase_sims: tool_1, + list_sims: tool_2, + open_sim: tool_3, + reset_sim_location: tool_4, + set_sim_appearance: tool_5, + set_sim_location: tool_6, + sim_statusbar: tool_7, + }; + }, + 'swift-package': async () => { + const { workflow } = await import('../mcp/tools/swift-package/index.js'); + const tool_0 = await import('../mcp/tools/swift-package/swift_package_build.js').then( + (m) => m.default, + ); + const tool_1 = await import('../mcp/tools/swift-package/swift_package_clean.js').then( + (m) => m.default, + ); + const tool_2 = await import('../mcp/tools/swift-package/swift_package_list.js').then( + (m) => m.default, + ); + const tool_3 = await import('../mcp/tools/swift-package/swift_package_run.js').then( + (m) => m.default, + ); + const tool_4 = await import('../mcp/tools/swift-package/swift_package_stop.js').then( + (m) => m.default, + ); + const tool_5 = await import('../mcp/tools/swift-package/swift_package_test.js').then( + (m) => m.default, + ); + + return { + workflow, + swift_package_build: tool_0, + swift_package_clean: tool_1, + swift_package_list: tool_2, + swift_package_run: tool_3, + swift_package_stop: tool_4, + swift_package_test: tool_5, + }; + }, + 'ui-testing': async () => { + const { workflow } = await import('../mcp/tools/ui-testing/index.js'); + const tool_0 = await import('../mcp/tools/ui-testing/button.js').then((m) => m.default); + const tool_1 = await import('../mcp/tools/ui-testing/describe_ui.js').then((m) => m.default); + const tool_2 = await import('../mcp/tools/ui-testing/gesture.js').then((m) => m.default); + const tool_3 = await import('../mcp/tools/ui-testing/key_press.js').then((m) => m.default); + const tool_4 = await import('../mcp/tools/ui-testing/key_sequence.js').then((m) => m.default); + const tool_5 = await import('../mcp/tools/ui-testing/long_press.js').then((m) => m.default); + const tool_6 = await import('../mcp/tools/ui-testing/screenshot.js').then((m) => m.default); + const tool_7 = await import('../mcp/tools/ui-testing/swipe.js').then((m) => m.default); + const tool_8 = await import('../mcp/tools/ui-testing/tap.js').then((m) => m.default); + const tool_9 = await import('../mcp/tools/ui-testing/touch.js').then((m) => m.default); + const tool_10 = await import('../mcp/tools/ui-testing/type_text.js').then((m) => m.default); + + return { + workflow, + button: tool_0, + describe_ui: tool_1, + gesture: tool_2, + key_press: tool_3, + key_sequence: tool_4, + long_press: tool_5, + screenshot: tool_6, + swipe: tool_7, + tap: tool_8, + touch: tool_9, + type_text: tool_10, + }; + }, + utilities: async () => { + const { workflow } = await import('../mcp/tools/utilities/index.js'); + const tool_0 = await import('../mcp/tools/utilities/clean.js').then((m) => m.default); + + return { + workflow, + clean: tool_0, + }; + }, +}; + +export type WorkflowName = keyof typeof WORKFLOW_LOADERS; + +// Optional: Export workflow metadata for quick access +export const WORKFLOW_METADATA = { + device: { + name: 'iOS Device Development', + description: + 'Complete iOS development workflow for both .xcodeproj and .xcworkspace files targeting physical devices (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro). Build, test, deploy, and debug apps on real hardware.', + }, + doctor: { + name: 'System Doctor', + description: + 'Debug tools and system doctor for troubleshooting XcodeBuildMCP server, development environment, and tool availability.', + }, + logging: { + name: 'Log Capture & Management', + description: + 'Log capture and management tools for iOS simulators and physical devices. Start, stop, and analyze application and system logs during development and testing.', + }, + macos: { + name: 'macOS Development', + description: + 'Complete macOS development workflow for both .xcodeproj and .xcworkspace files. Build, test, deploy, and manage macOS applications.', + }, + 'project-discovery': { + name: 'Project Discovery', + description: + 'Discover and examine Xcode projects, workspaces, and Swift packages. Analyze project structure, schemes, build settings, and bundle information.', + }, + 'project-scaffolding': { + name: 'Project Scaffolding', + description: + 'Tools for creating new iOS and macOS projects from templates. Bootstrap new applications with best practices, standard configurations, and modern project structures.', + }, + 'session-management': { + name: 'session-management', + description: + 'Manage session defaults for projectPath/workspacePath, scheme, configuration, simulatorName/simulatorId, deviceId, useLatestOS and arch. These defaults are required by many tools and must be set before attempting to call tools that would depend on these values.', + }, + simulator: { + name: 'iOS Simulator Development', + description: + 'Complete iOS development workflow for both .xcodeproj and .xcworkspace files targeting simulators. Build, test, deploy, and interact with iOS apps on simulators.', + }, + 'simulator-management': { + name: 'Simulator Management', + description: + 'Tools for managing simulators from booting, opening simulators, listing simulators, stopping simulators, erasing simulator content and settings, and setting simulator environment options like location, network, statusbar and appearance.', + }, + 'swift-package': { + name: 'Swift Package Manager', + description: + 'Swift Package Manager operations for building, testing, running, and managing Swift packages and dependencies. Complete SPM workflow support.', + }, + 'ui-testing': { + name: 'UI Testing & Automation', + description: + 'UI automation and accessibility testing tools for iOS simulators. Perform gestures, interactions, screenshots, and UI analysis for automated testing workflows.', + }, + utilities: { + name: 'Project Utilities', + description: + 'Essential project maintenance utilities for cleaning and managing existing projects. Provides clean operations for both .xcodeproj and .xcworkspace files.', + }, +}; diff --git a/src/core/generated-resources.ts b/src/core/generated-resources.ts new file mode 100644 index 00000000..8a1f914c --- /dev/null +++ b/src/core/generated-resources.ts @@ -0,0 +1,19 @@ +// AUTO-GENERATED - DO NOT EDIT +// This file is generated by the plugin discovery esbuild plugin + +export const RESOURCE_LOADERS = { + devices: async () => { + const module = await import('../mcp/resources/devices.js'); + return module.default; + }, + doctor: async () => { + const module = await import('../mcp/resources/doctor.js'); + return module.default; + }, + simulators: async () => { + const module = await import('../mcp/resources/simulators.js'); + return module.default; + }, +}; + +export type ResourceName = keyof typeof RESOURCE_LOADERS; diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 00000000..640d2d73 --- /dev/null +++ b/src/version.ts @@ -0,0 +1,3 @@ +export const version = '1.15.1'; +export const iOSTemplateVersion = 'v1.0.8'; +export const macOSTemplateVersion = 'v1.0.5'; From 4db642e392ca852d1c26203fbbc2bc8982b72c16 Mon Sep 17 00:00:00 2001 From: "smithery-ai[bot]" <194235850+smithery-ai[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:15:13 +0000 Subject: [PATCH 2/2] Update README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d5eb20c5..03b27fda 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ +```markdown XcodeBuild MCP A Model Context Protocol (MCP) server that provides Xcode-related tools for integration with AI assistants and other MCP clients. -[![CI](https://github.com/cameroncooke/XcodeBuildMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/cameroncooke/XcodeBuildMCP/actions/workflows/ci.yml) +[![smithery badge](https://smithery.ai/badge/cameroncooke/xcodebuildmcp)](https://smithery.ai/server/cameroncooke/xcodebuildmcp) [![CI](https://github.com/cameroncooke/XcodeBuildMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/cameroncooke/XcodeBuildMCP/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/xcodebuildmcp.svg)](https://badge.fury.io/js/xcodebuildmcp) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js](https://img.shields.io/badge/node->=18.x-brightgreen.svg)](https://nodejs.org/) [![Xcode 16](https://img.shields.io/badge/Xcode-16-blue.svg)](https://developer.apple.com/xcode/) [![macOS](https://img.shields.io/badge/platform-macOS-lightgrey.svg)](https://www.apple.com/macos/) [![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/cameroncooke/XcodeBuildMCP) ## Table of contents @@ -248,7 +249,7 @@ Example MCP client configuration: ## Session-aware opt-out -By default, XcodeBuildMCP uses a session-aware mode: the LLM (or client) sets shared defaults once (simulator, device, project/workspace, scheme, etc.), and all tools reuse them—similar to choosing a scheme and simulator in Xcode’s UI so you don’t repeat them on every action. This cuts context bloat not just in each call payload, but also in the tool schemas themselves (those parameters don’t have to be described on every tool). +By default, XcodeBuildMCP uses a session-aware mode: the LLM (or client) sets shared defaults once (simulator, device, project/workspace, scheme, etc.), and all tools reuse them—similar to choosing a scheme and simulator in Xcode's UI so you don't repeat them on every action. This cuts context bloat not just in each call payload, but also in the tool schemas themselves (those parameters don't have to be described on every tool). If you prefer the older, explicit style where each tool requires its own parameters, set `XCODEBUILDMCP_DISABLE_SESSION_DEFAULTS=true`. This restores the legacy schemas with per-call parameters while still honoring any session defaults you choose to set. @@ -347,3 +348,4 @@ See our documentation for development: ## Licence This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +``` \ No newline at end of file