Skip to content
Merged
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
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
# Use a small base image with Node.js LTS
FROM node:lts-alpine AS build
Copy link

Copilot AI Jun 7, 2025

Choose a reason for hiding this comment

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

Consider pinning the Node.js LTS image version (e.g., node:18.17.0-alpine) to improve build reproducibility.

Suggested change
FROM node:lts-alpine AS build
FROM node:18.17.0-alpine AS build

Copilot uses AI. Check for mistakes.

# Install dependencies needed for building
RUN apk add --no-cache python3 g++ make git

# Create app directory
WORKDIR /usr/src/app

# Copy package manifests
COPY package.json package-lock.json tsconfig.json eslint.config.js ./

# Copy source
COPY src ./src

# Install dependencies ignoring any prepare scripts, then build
RUN npm ci --ignore-scripts
RUN npm run prebuild && npm run build

# Stage for runtime
FROM node:lts-alpine
WORKDIR /usr/src/app

# Install minimal runtime dependencies
# No build tools needed, install production deps
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts

# Copy built files
COPY --from=build /usr/src/app/build ./build

# Symlink binary
RUN npm link

# Default command
ENTRYPOINT ["xcodebuildmcp"]
CMD []
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ A Model Context Protocol (MCP) server that provides Xcode-related tools for inte
- [Quick install](#quick-install)
- [Manual installation](#manual-installation)
- [Alternative installation method using mise](#alternative-installation-method-using-mise)
- [Installing via Smithery](#installing-via-smithery)
- [Incremental build support](#incremental-build-support)
- [Troubleshooting](#troubleshooting)
- [Diagnostic Tool](#diagnostic-tool)
Expand Down Expand Up @@ -164,6 +165,14 @@ Then configure your MCP client to use mise to install XcodeBuildMCP:
> [!NOTE]
> When using mise avoid using the @latest tag as mise will cache the package and may not update to the latest version automatically, instead prefer an explicit version number.

#### Installing via Smithery

To install XcodeBuildMCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@cameroncooke/XcodeBuildMCP):

```bash
npx -y @smithery/cli install @cameroncooke/XcodeBuildMCP --client claude
```

> [!IMPORTANT]
> Please note that XcodeBuildMCP will request xcodebuild to skip macro validation. This is to avoid errors when building projects that use Swift Macros.

Expand Down
13 changes: 13 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Smithery configuration file: https://smithery.ai/docs/build/project-config

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
description: Configuration for XcodeBuildMCP (no options needed)
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => ({ command: 'xcodebuildmcp', args: [], env: {} })
exampleConfig: {}