Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Test to validate XcodeBuildMCP marketplace integration
import { describe, it, expect } from "vitest"
import { mcpMarketplaceItemSchema, type McpMarketplaceItem } from "@roo-code/types"

describe("XcodeBuildMCP Marketplace Integration", () => {
const xcodeBuildMcpConfig: McpMarketplaceItem = {
id: "xcodebuildmcp",
name: "XcodeBuildMCP",
description:
"A comprehensive Model Context Protocol server that provides Xcode-related tools for building, testing, and managing iOS/macOS projects, simulators, and devices.",
author: "Cameron Cooke",
authorUrl: "https://github.com/cameroncooke",
url: "https://github.com/cameroncooke/XcodeBuildMCP",
tags: ["xcode", "ios", "macos", "swift", "simulator", "device", "build", "test"],
prerequisites: ["Xcode 16.x or later", "Node.js 18.x or later", "macOS"],
content: JSON.stringify({
command: "npx",
args: ["-y", "xcodebuildmcp@latest"],
}),
parameters: [
{
name: "Enable Incremental Builds",
key: "INCREMENTAL_BUILDS_ENABLED",
placeholder: "true",
optional: true,
},
{
name: "Disable Sentry Telemetry",
key: "SENTRY_DISABLED",
placeholder: "true",
optional: true,
},
],
}

it("should validate XcodeBuildMCP configuration against marketplace schema", () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great integration test! The schema validation is thorough and well-structured. Could we consider adding a test that verifies the XcodeBuildMCP repository is accessible, perhaps by checking if the GitHub repository URL returns a 200 status? This would catch cases where the repository becomes unavailable.

expect(() => mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)).not.toThrow()

const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)
expect(validated.id).toBe("xcodebuildmcp")
expect(validated.name).toBe("XcodeBuildMCP")
expect(validated.url).toBe("https://github.com/cameroncooke/XcodeBuildMCP")
expect(validated.parameters).toHaveLength(2)
})

it("should have valid URL fields", () => {
const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)
expect(validated.url).toMatch(/^https:\/\//)
expect(validated.authorUrl).toMatch(/^https:\/\//)
})

it("should have proper parameter configuration", () => {
const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)

// Check incremental builds parameter
const incrementalParam = validated.parameters?.find((p) => p.key === "INCREMENTAL_BUILDS_ENABLED")
expect(incrementalParam).toBeDefined()
expect(incrementalParam?.optional).toBe(true)
expect(incrementalParam?.name).toBe("Enable Incremental Builds")

// Check sentry parameter
const sentryParam = validated.parameters?.find((p) => p.key === "SENTRY_DISABLED")
expect(sentryParam).toBeDefined()
expect(sentryParam?.optional).toBe(true)
expect(sentryParam?.name).toBe("Disable Sentry Telemetry")
})

it("should have valid content configuration", () => {
const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)
const contentObj = JSON.parse(validated.content as string)

expect(contentObj.command).toBe("npx")
expect(contentObj.args).toEqual(["-y", "xcodebuildmcp@latest"])
})

it("should have appropriate tags for Xcode development", () => {
const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)

expect(validated.tags).toContain("xcode")
expect(validated.tags).toContain("ios")
expect(validated.tags).toContain("macos")
expect(validated.tags).toContain("swift")
expect(validated.tags).toContain("simulator")
expect(validated.tags).toContain("device")
expect(validated.tags).toContain("build")
expect(validated.tags).toContain("test")
})

it("should have proper prerequisites", () => {
const validated = mcpMarketplaceItemSchema.parse(xcodeBuildMcpConfig)

expect(validated.prerequisites).toContain("Xcode 16.x or later")
expect(validated.prerequisites).toContain("Node.js 18.x or later")
expect(validated.prerequisites).toContain("macOS")
})
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test validates the schema perfectly, but could we also add validation that this configuration would work with the actual marketplace API structure? Perhaps by testing against the RemoteConfigLoader or MarketplaceManager?

137 changes: 137 additions & 0 deletions xcode-mcp-marketplace-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Xcode MCP Marketplace Addition Proposal
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent comprehensive research! However, this proposal document would be better organized in a or directory rather than at the repository root. Could we consider moving it to maintain better project structure?


## Overview

This document proposes adding XcodeBuildMCP to the Roo Code MCP Marketplace to address GitHub issue #6482. After researching available Xcode MCPs, XcodeBuildMCP emerges as the most comprehensive and popular option.

## Research Findings

### Available Xcode MCPs

1. **XcodeBuildMCP** (⭐ 2,163 stars) - Most popular and comprehensive

- Repository: https://github.com/cameroncooke/XcodeBuildMCP
- NPM Package: `xcodebuildmcp`
- Features: Complete Xcode project management, simulator control, device management, Swift Package Manager integration

2. **xcodeproj-mcp-server** (⭐ 81 stars)

- Repository: https://github.com/giginet/xcodeproj-mcp-server
- Features: Xcode project file manipulation

3. **Claude-Project-Coordinator** (⭐ 38 stars)

- Repository: https://github.com/M-Pineapple/Claude-Project-Coordinator
- Features: Multi-project Xcode development coordination

4. **SwiftLens** (⭐ 30 stars)

- Repository: https://github.com/swiftlens/swiftlens
- Features: Swift codebase semantic analysis

5. **xctools-mcp-server** (⭐ 2 stars)
- Repository: https://github.com/nzrsky/xctools-mcp-server
- Features: Various Xcode tools

## Recommended MCP: XcodeBuildMCP

### Why XcodeBuildMCP?

- **Most Popular**: 2,163 GitHub stars indicate strong community adoption
- **Comprehensive**: Covers all major Xcode development workflows
- **Well-Maintained**: Active development with CI/CD, CodeQL scanning
- **Professional Quality**: MIT licensed, verified on MseeP platform
- **Easy Installation**: Available via NPM with simple configuration

### Features

- **Xcode Project Management**: Build, clean, discover projects and workspaces
- **Simulator Management**: List, boot, install/launch apps, capture logs and screenshots
- **Device Management**: Physical device support with app deployment and testing
- **Swift Package Manager**: Build packages, run tests and executables
- **App Utilities**: Bundle ID extraction, app lifecycle management
- **MCP Resources**: Efficient URI-based data access for supported clients

### Installation Configuration

```json
{
"mcpServers": {
"XcodeBuildMCP": {
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"]
}
}
}
```

### Optional Environment Variables

- `INCREMENTAL_BUILDS_ENABLED`: Enable experimental incremental builds
- `SENTRY_DISABLED`: Disable telemetry reporting

## Marketplace Configuration Proposal

Based on the existing marketplace schema in `packages/types/src/marketplace.ts`, here's the proposed configuration:

```yaml
items:
- id: "xcodebuildmcp"
name: "XcodeBuildMCP"
description: "A comprehensive Model Context Protocol server that provides Xcode-related tools for building, testing, and managing iOS/macOS projects, simulators, and devices."
author: "Cameron Cooke"
authorUrl: "https://github.com/cameroncooke"
url: "https://github.com/cameroncooke/XcodeBuildMCP"
tags: ["xcode", "ios", "macos", "swift", "simulator", "device", "build", "test"]
prerequisites: ["Xcode 16.x or later", "Node.js 18.x or later", "macOS"]
content: |
{
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"]
}
parameters:
- name: "Enable Incremental Builds"
key: "INCREMENTAL_BUILDS_ENABLED"
placeholder: "true"
optional: true
- name: "Disable Sentry Telemetry"
key: "SENTRY_DISABLED"
placeholder: "true"
optional: true
```

## Implementation Steps

1. **Add to Marketplace API**: The configuration above should be added to the marketplace API endpoint (`/api/marketplace/mcps`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR mentions that 'The configuration above needs to be added to the marketplace API endpoint ()' but doesn't include the actual implementation. Is this intentional, or should the actual marketplace configuration be included in this PR to make XcodeBuildMCP available to users?


2. **Verify Schema Compatibility**: The existing marketplace infrastructure already supports:

- ✅ Basic MCP configuration with `command` and `args`
- ✅ Optional parameters with environment variables
- ✅ Prerequisites listing
- ✅ Author information and URLs
- ✅ Tags for categorization

3. **Test Installation**: Verify that the marketplace can properly install and configure XcodeBuildMCP

## Additional Recommendations

### Consider Adding Multiple Xcode MCPs

While XcodeBuildMCP is the most comprehensive, different MCPs serve different use cases:

1. **XcodeBuildMCP**: Complete Xcode development workflow
2. **xcodeproj-mcp-server**: Specialized for project file manipulation
3. **SwiftLens**: Focused on code analysis and understanding

### Future Enhancements

- Add MCP compatibility matrix showing which features work with which editors
- Include demo videos or screenshots in marketplace listings
- Add community ratings and reviews for MCPs

## Conclusion

Adding XcodeBuildMCP to the marketplace would significantly enhance Roo Code's iOS/macOS development capabilities. The MCP is mature, well-maintained, and provides comprehensive Xcode integration that would benefit many users working on Apple platform development.

The existing marketplace infrastructure is fully capable of supporting this addition without any code changes to the Roo Code repository.