diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..01694782 --- /dev/null +++ b/Dockerfile @@ -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 + +# 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 [] diff --git a/README.md b/README.md index fc598b5b..c7e3dc1c 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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. diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 00000000..2d6db00f --- /dev/null +++ b/smithery.yaml @@ -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: {}