From 9508b9e1b828e0efc4eeb2b84c5b123bc3048c2f Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 28 May 2025 15:02:18 -0700 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..06ffc5a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config +FROM node:lts-alpine AS builder + +# Enable corepack to use pnpm +RUN corepack enable && corepack prepare pnpm@latest --activate + +WORKDIR /app + +# Copy package manifests and lockfile +COPY package.json pnpm-lock.yaml tsconfig.json . +COPY src ./src + +# Install dependencies and build +RUN pnpm install --frozen-lockfile --ignore-scripts \ + && pnpm run build + +# Runtime image +FROM node:lts-alpine AS runtime +WORKDIR /app + +# Copy built artifacts and production dependencies +COPY package.json pnpm-lock.yaml . +COPY --from=builder /app/dist ./dist + +# Install production dependencies only +RUN corepack enable && corepack prepare pnpm@latest --activate \ + && pnpm install --prod --frozen-lockfile --ignore-scripts + +# Expose no ports needed for stdio +ENTRYPOINT ["node", "dist/index.js"] From 281225a7adbc62bace3f7b492046986c0e810aaf Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 28 May 2025 15:02:19 -0700 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..91f9b59 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,13 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['dist/index.js'], env: {} }) + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + properties: {} + exampleConfig: {} From b2c4d11775e496a64e902db7ed67d75df91da000 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 28 May 2025 15:02:20 -0700 Subject: [PATCH 3/3] Update README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 0fd8b59..04337ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # MCP Shell Server +[![smithery badge](https://smithery.ai/badge/@mkusaka/mcp-shell-server)](https://smithery.ai/server/@mkusaka/mcp-shell-server) A server that uses the Model Context Protocol (MCP) to execute shell commands. It functions as a bridge that allows AI agents to safely execute shell commands. @@ -11,6 +12,14 @@ A server that uses the Model Context Protocol (MCP) to execute shell commands. I ## Installation +### Installing via Smithery + +To install Shell Command Executor for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@mkusaka/mcp-shell-server): + +```bash +npx -y @smithery/cli install @mkusaka/mcp-shell-server --client claude +``` + ### From npm (as a user) ```bash