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"] 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 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: {}