dsh-xcode-mcp: Xcode MCP Bridge Plugin for DeepSeek Harness

Preface

The ecosystem philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” Xcode 27 introduces a headless MCP tool service that provides standard input/output (STDIO) bridging via /usr/bin/xcrun mcpbridge. DSH’s built-in MCP client currently cannot directly invoke these tools, requiring manual editing of the cordis.patch.yml configuration file to connect to the bridge.

The dsh-xcode-mcp plugin takes on the bridging work, mapping xcrun mcpbridge to native tools mcp__xcode__*. This transforms the originally fragmented configuration into an installable, uninstallable, version-manageable plugin unit, eliminating the hassle of maintaining profile files.

What Is It

This is an Apple Xcode MCP bridge plugin designed for DeepSeek Harness.

  • Maintainer: OrrHsiao
  • Positioning: Configuration-only bundle — no code logic, no dependencies on other npm packages.
  • Core Value: Integrates Xcode 27’s headless service into DSH’s tool list, allowing the model to invoke Xcode commands directly.

Core Features

This plugin exposes 54 tools from Xcode 27 to DSH, mainly including:

  • Project and Scheme inspection
  • Build and Test
  • SwiftUI preview rendering
  • Simulator launch and interaction (tap, input, swipe)
  • Screenshot capture
  • Accessibility hierarchy
  • OSLog log viewing
  • Swift Package, localization, and performance analysis utilities

Installation & Activation

Install through the “Plugins” page in the DSH sidebar. Simply enter the package name in the search box:

dsh-xcode-mcp

After installation, the plugin is typically auto-activated via hot reload. If mcp__xcode__* tools don’t appear in the list, restart the current Profile to reload the plugin layer.

Typical Usage

After enabling the plugin, the model can operate via the following commands or tools:

System Status Check

xcrun mcp-server status     # Check if the service is running
xcrun mcp-server enable     # Enable the service
xcrun mcp-server start      # Start the service

Authorize Project Directory

sudo xcrun mcp-server allow-folder /path/to/your/projects

Tool Invocation Examples

When the model invokes native tools, the name format is mcp__xcode__ToolName:

mcp__xcode__XcodeListWorkspaces
# Example return:
# * workspaceIdentifier: workspace-xxxxxxxxxx, workspacePath: /path/to/App.xcodeproj

mcp__xcode__XcodeListSchemes
# Requires workspaceIdentifier; lists the project's schemes

Use Cases & Cautions

The following conditions must be met before use:

  1. System Requirements: macOS and Xcode 27 or later. mcpbridge does not exist in older versions.
  2. Service Running: The headless service must be enabled and running.
  3. Project Context: To use project-scoped tools, the corresponding project must be open in Xcode.
  4. Client Signing: On first connection, Xcode will prompt for authorization. Only signed clients (such as DSH) can obtain permanent authorization; unsign authorizations expire after approximately 24 hours.
  5. Manual Updates: DSH does not auto-update installed plugins. To upgrade, uninstall and reinstall first.
  6. Supply Chain Protection: Plugin installation relies on pnpm; the default configuration requires a minimum release age of 24 hours (1440 minutes). Versions released less than a day ago will be refused installation, and even running the update command will display “Already up to date.” This is a security measure, not a bug.

Configuration Notes

This plugin is essentially a configuration patch. In DSH’s cordis.patch.yml, you can adjust parameters by overriding the mcp-xcode line.

Default configuration (based on @deepseek-ai/dsh-mcp-client schema):

- id: mcp-xcode
  name: '@deepseek-ai/dsh-mcp-client'
  config:
    serverName: xcode
    transport: stdio
    command: /usr/bin/xcrun
    args: ['mcpbridge']
    toolCallTimeoutMs: 900000   # Default is 60 seconds; build tasks usually need more time
    failOnStartupError: false   # Should not block Harness startup when Xcode is closed

If you need to point to a specific Xcode instance (rather than the default version pointed to by xcode-select), you can add an env field in config:

    env:
      MCP_XCODE_PID: <PID>

Conclusion

dsh-xcode-mcp solves the integration problem between DSH and Xcode 27’s headless service with minimal configuration. For developers who need to perform iOS/Mac development, testing, or automated builds within DSH, this is an essential bridging tool.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye