diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a15e338 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Start from a Python image with UV installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# Set the working directory +WORKDIR /app + +# Copy the project files to the container +COPY . . + +# Use UV to install the dependencies from the lock file +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-install-project --no-dev --no-editable + +# Install the project itself +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev --no-editable + +# Use a minimal Python image for the final release +FROM python:3.12-slim-bookworm + +# Set the working directory +WORKDIR /app + +# Copy installed dependencies and the virtual environment from the UV stage +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# Ensure executables are available on PATH +ENV PATH="/app/.venv/bin:$PATH" + +# Set the entrypoint for the Docker container +ENTRYPOINT ["docker-mcp"] diff --git a/README.md b/README.md index 3bd00be..76cc87d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![smithery badge](https://smithery.ai/badge/docker-mcp)](https://smithery.ai/protocol/docker-mcp) +[![smithery badge](https://smithery.ai/badge/docker-mcp)](https://smithery.ai/server/docker-mcp) A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI. @@ -48,10 +48,10 @@ To try this in Claude Desktop app, add this to your claude config files: ### Installing via Smithery -To install Docker MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/protocol/docker-mcp): +To install Docker MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/docker-mcp): ```bash -npx @smithery/cli install docker-mcp --client claude +npx -y @smithery/cli install docker-mcp --client claude ``` ### Prerequisites diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..3dc0127 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,13 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: [] + properties: {} + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: 'uvx', args: ['docker-mcp']})