diff --git a/package-lock.json b/package-lock.json index 34253af3..140b5ca3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5015,7 +5015,7 @@ "mcp-server-aws-kb-retrieval": "dist/index.js" }, "devDependencies": { - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5040,7 +5040,7 @@ "mcp-server-brave-search": "dist/index.js" }, "devDependencies": { - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5080,7 +5080,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5099,7 +5099,7 @@ "mcp-server-everart": "dist/index.js" }, "devDependencies": { - "@types/node": "^20.11.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.3.3" } @@ -5201,7 +5201,7 @@ "devDependencies": { "@types/diff": "^5.0.9", "@types/minimatch": "^5.1.2", - "@types/node": "^20.11.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.3.3" } @@ -5298,7 +5298,7 @@ "mcp-server-gdrive": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5328,7 +5328,7 @@ "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", - "@types/node": "^20.11.0", + "@types/node": "^22", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod": "^3.22.4", @@ -5501,7 +5501,7 @@ "mcp-server-memory": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5591,7 +5591,7 @@ "mcp-server-sequential-thinking": "dist/index.js" }, "devDependencies": { - "@types/node": "^20.11.0", + "@types/node": "^22", "@types/yargs": "^17.0.32", "shx": "^0.3.4", "typescript": "^5.3.3" @@ -5617,7 +5617,7 @@ "mcp-server-slack": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5642,4 +5642,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/aws-kb-retrieval-server/Dockerfile b/src/aws-kb-retrieval-server/Dockerfile new file mode 100644 index 00000000..88f3906d --- /dev/null +++ b/src/aws-kb-retrieval-server/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/aws-kb-retrieval-server /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/aws-kb-retrieval-server/README.md b/src/aws-kb-retrieval-server/README.md index ac2bdb43..ed19f1ee 100644 --- a/src/aws-kb-retrieval-server/README.md +++ b/src/aws-kb-retrieval-server/README.md @@ -27,6 +27,24 @@ An MCP server implementation for retrieving information from the AWS Knowledge B Add this to your `claude_desktop_config.json`: +#### Docker + +```json +{ + "mcpServers": { + "aws-kb-retrieval": { + "command": "docker", + "args": [ "run", "-i", "--rm", "-e", "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID", "-e", "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION=$AWS_REGION", "ai/mcp-aws-kb-retrieval-server" ], + "env": { + "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", + "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", + "AWS_REGION": "YOUR_AWS_REGION_HERE" + } + } + } +} +``` + ```json { "mcpServers": { @@ -46,6 +64,14 @@ Add this to your `claude_desktop_config.json`: } ``` +## Building + +Docker: + +```sh +docker build -t ai/mcp-aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/aws-kb-retrieval-server/package.json b/src/aws-kb-retrieval-server/package.json index fdad1a69..072fee11 100644 --- a/src/aws-kb-retrieval-server/package.json +++ b/src/aws-kb-retrieval-server/package.json @@ -23,8 +23,8 @@ "@aws-sdk/client-bedrock-agent-runtime": "^3.0.0" }, "devDependencies": { - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/brave-search/Dockerfile b/src/brave-search/Dockerfile new file mode 100644 index 00000000..ed129551 --- /dev/null +++ b/src/brave-search/Dockerfile @@ -0,0 +1,19 @@ +FROM node:22.12-alpine as builder + +# Must be entire project because `prepare` script is run during `npm install` and requires all files. +COPY src/brave-search /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/brave-search/README.md b/src/brave-search/README.md index 2d5ae0df..d94ecdf1 100644 --- a/src/brave-search/README.md +++ b/src/brave-search/README.md @@ -36,6 +36,31 @@ An MCP server implementation that integrates the Brave Search API, providing bot ### Usage with Claude Desktop Add this to your `claude_desktop_config.json`: +### Docker + +```json +{ + "mcpServers": { + "brave-search": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "BRAVE_API_KEY=$BRAVE_API_KEY", + "ai/mcp-brave-search" + ], + "env": { + "BRAVE_API_KEY": "YOUR_API_KEY_HERE" + } + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -53,6 +78,15 @@ Add this to your `claude_desktop_config.json`: } ``` + +## Build + +Docker build: + +```bash +docker build -t vonwig/brave-search:mcp -f src/brave-search/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/brave-search/package.json b/src/brave-search/package.json index 70ce9d00..163e5afc 100644 --- a/src/brave-search/package.json +++ b/src/brave-search/package.json @@ -22,7 +22,7 @@ "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } diff --git a/src/everart/Dockerfile b/src/everart/Dockerfile new file mode 100644 index 00000000..385c08dd --- /dev/null +++ b/src/everart/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/everart /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/everart/README.md b/src/everart/README.md index 545f5dfa..04b07578 100644 --- a/src/everart/README.md +++ b/src/everart/README.md @@ -10,6 +10,25 @@ export EVERART_API_KEY=your_key_here ## Config Add to Claude Desktop config: + +### Docker +```json +{ + "mcpServers": { + "everart": { + "command": "docker", + "args": ["run", "-i", "--rm", "-e", "EVERART_API_KEY=$EVERART_API_KEY", "ai/mcp-everart"], + "env": { + "EVERART_API_KEY": "your_key_here" + } + }, + + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -71,3 +90,9 @@ Generation details: You can also click the URL above to view the image again. ``` + +## Building w/ Docker + +```sh +docker build -t ai/mcp-everart -f src/everart/Dockerfile . +``` diff --git a/src/everart/package.json b/src/everart/package.json index 189ca650..653c654b 100644 --- a/src/everart/package.json +++ b/src/everart/package.json @@ -25,7 +25,7 @@ "open": "^9.1.0" }, "devDependencies": { - "@types/node": "^20.11.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.3.3" } diff --git a/src/everything/Dockerfile b/src/everything/Dockerfile new file mode 100644 index 00000000..7a6482c4 --- /dev/null +++ b/src/everything/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/everything /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/fetch/Dockerfile b/src/fetch/Dockerfile new file mode 100644 index 00000000..fae262d1 --- /dev/null +++ b/src/fetch/Dockerfile @@ -0,0 +1,29 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install the project into `/app` +WORKDIR /app + +# Enable bytecode compilation +ENV UV_COMPILE_BYTECODE=1 + +# Copy from the cache instead of linking since it's a mounted volume +ENV UV_LINK_MODE=copy + +# Install the project's dependencies using the lockfile and settings +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +# Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching +ADD . /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +# Place executables in the environment at the front of the path +ENV PATH="/app/.venv/bin:$PATH" + +# when running the container, add --db-path and a bind mount to the host's db file +ENTRYPOINT ["uvx" , "mcp-server-fetch"] diff --git a/src/filesystem/Dockerfile b/src/filesystem/Dockerfile new file mode 100644 index 00000000..2addb6db --- /dev/null +++ b/src/filesystem/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +WORKDIR /app + +COPY src/filesystem /app +COPY tsconfig.json /tsconfig.json + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 79c2b0f3..b9286511 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -105,6 +105,32 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio ## Usage with Claude Desktop Add this to your `claude_desktop_config.json`: + +Note: you can provide sandboxed directories to the server by mounting them to `/projects`. Adding the `ro` flag will make the directory readonly by the server. + +### Docker + +```json +{ + "mcpServers": { + "filesystem": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop", + "--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro", + "--mount", "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt", + "ai/mcp-filesystem" + ] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -121,6 +147,14 @@ Add this to your `claude_desktop_config.json`: } ``` +## Build + +Docker build: + +```bash +docker build -t ai/mcp-filesystem -f src/filesystem/Dockerfile . +``` + ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 6f0b223d..6aca648f 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -28,8 +28,8 @@ "devDependencies": { "@types/diff": "^5.0.9", "@types/minimatch": "^5.1.2", - "@types/node": "^20.11.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/src/gdrive/Dockerfile b/src/gdrive/Dockerfile new file mode 100644 index 00000000..43840db7 --- /dev/null +++ b/src/gdrive/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/gdrive /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/gdrive/README.md b/src/gdrive/README.md index 9a795f0c..016b592d 100644 --- a/src/gdrive/README.md +++ b/src/gdrive/README.md @@ -49,6 +49,21 @@ To authenticate and save credentials: To integrate this server with the desktop app, add the following to your app's server configuration: +#### Docker + +```json +{ + "mcpServers": { + "gdrive": { + "command": "docker", + "args": ["run", "-i", "--rm", "ai/mcp-gdrive"] + } + } +} +``` + +#### NPX + ```json { "mcpServers": { diff --git a/src/gdrive/package.json b/src/gdrive/package.json index 26e2bfe5..a2d4be37 100644 --- a/src/gdrive/package.json +++ b/src/gdrive/package.json @@ -24,7 +24,7 @@ "googleapis": "^144.0.0" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } diff --git a/src/git/Dockerfile b/src/git/Dockerfile new file mode 100644 index 00000000..264962ed --- /dev/null +++ b/src/git/Dockerfile @@ -0,0 +1,31 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install the project into `/app` +WORKDIR /app + +# Enable bytecode compilation +ENV UV_COMPILE_BYTECODE=1 + +# Copy from the cache instead of linking since it's a mounted volume +ENV UV_LINK_MODE=copy + +RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* + +# Install the project's dependencies using the lockfile and settings +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +# Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching +ADD . /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +# Place executables in the environment at the front of the path +ENV PATH="/app/.venv/bin:$PATH" + +# when running the container, add --db-path and a bind mount to the host's db file +ENTRYPOINT ["uv" , "run" , "--directory", ".", "mcp-server-git"] diff --git a/src/git/README.md b/src/git/README.md index 8f3afdc7..d62ddd61 100644 --- a/src/git/README.md +++ b/src/git/README.md @@ -193,18 +193,52 @@ If you are doing local development, there are two ways to test your changes: 2. Test using the Claude desktop app. Add the following to your `claude_desktop_config.json`: +### Docker + ```json -"git": { - "command": "uv", - "args": [ - "--directory", - "//mcp-servers/src/git", - "run", - "mcp-server-git" - ] +{ + "mcpServers": { + "brave-search": { + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop", + "--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro", + "--mount", "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt", + "ai/mcp-git" + ] + } + } } ``` +### UVX +```json +{ +"mcpServers": { + "git": { + "command": "uv", + "args": [ + "--directory", + "//mcp-servers/src/git", + "run", + "mcp-server-git" + ] + } +} +``` + +## Build + +Docker build: + +```bash +cd src/git +docker build -t ai/mcp-git . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/github/Dockerfile b/src/github/Dockerfile new file mode 100644 index 00000000..a94abccc --- /dev/null +++ b/src/github/Dockerfile @@ -0,0 +1,19 @@ +FROM node:22.12-alpine as builder + +# Must be entire project because `prepare` script is run during `npm install` and requires all files. +COPY src/github /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/github/README.md b/src/github/README.md index 1898f9e1..d20ba9cc 100644 --- a/src/github/README.md +++ b/src/github/README.md @@ -225,14 +225,19 @@ For detailed search syntax, see [GitHub's searching documentation](https://docs. ### Usage with Claude Desktop To use this with Claude Desktop, add the following to your `claude_desktop_config.json`: +#### Docker ```json { "mcpServers": { "github": { - "command": "npx", + "command": "docker", "args": [ - "-y", - "@modelcontextprotocol/server-github" + "run", + "-i", + "--rm", + "-e", + "GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN", + "ai/mcp-github" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "" @@ -242,6 +247,33 @@ To use this with Claude Desktop, add the following to your `claude_desktop_confi } ``` +### NPX + +```json +{ + "mcpServers": { + "github": { + "command": "npx", + "args": [ + "-y", + "@modelcontextprotocol/server-github" + ] + }, + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "" + } + } +} +``` + +## Build + +Docker build: + +```bash +docker build -t ai/mcp-github -f src/github/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/github/package.json b/src/github/package.json index 0fc2aaeb..46d24ccd 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", - "@types/node": "^20.11.0", + "@types/node": "^22", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod": "^3.22.4", diff --git a/src/gitlab/Dockerfile b/src/gitlab/Dockerfile new file mode 100644 index 00000000..79caaef0 --- /dev/null +++ b/src/gitlab/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/gitlab /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/gitlab/README.md b/src/gitlab/README.md index fdf82552..7feb06b4 100644 --- a/src/gitlab/README.md +++ b/src/gitlab/README.md @@ -109,19 +109,57 @@ MCP Server for the GitLab API, enabling project management, file operations, and ### Usage with Claude Desktop Add the following to your `claude_desktop_config.json`: +#### Docker ```json { - "gitlab": { - "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-gitlab"], - "env": { - "GITLAB_PERSONAL_ACCESS_TOKEN": "", - "GITLAB_API_URL": "https://gitlab.com/api/v4" // Optional, for self-hosted instances + "mcpServers": { + "gitlab": { + "command": "docker", + "args": [ + "run", + "-e", + "GITLAB_PERSONAL_ACCESS_TOKEN=$GITLAB_PERSONAL_ACCESS_TOKEN", + "-e", + "GITLAB_API_URL=$GITLAB_API_URL", + "ai/mcp-gitlab" + ], + "env": { + "GITLAB_PERSONAL_ACCESS_TOKEN": "", + "GITLAB_API_URL": "https://gitlab.com/api/v4" // Optional, for self-hosted instances + } } } } ``` +### NPX + +```json +{ + "mcpServers": { + "gitlab": { + "command": "npx", + "args": [ + "-y", + "@modelcontextprotocol/server-gitlab" + ], + "env": { + "GITLAB_PERSONAL_ACCESS_TOKEN": "", + "GITLAB_API_URL": "https://gitlab.com/api/v4" // Optional, for self-hosted instances + } + } + } +} +``` + +## Build + +Docker build: + +```bash +docker build -t vonwig/gitlab:mcp -f src/gitlab/Dockerfile . +``` + ## Environment Variables - `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token (required) diff --git a/src/google-maps/Dockerfile b/src/google-maps/Dockerfile new file mode 100644 index 00000000..ca8a7dd5 --- /dev/null +++ b/src/google-maps/Dockerfile @@ -0,0 +1,19 @@ +FROM node:22.12-alpine as builder + +# Must be entire project because `prepare` script is run during `npm install` and requires all files. +COPY src/google-maps /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/google-maps/README.md b/src/google-maps/README.md index 51a1b9e5..46a55c72 100644 --- a/src/google-maps/README.md +++ b/src/google-maps/README.md @@ -59,6 +59,31 @@ Get a Google Maps API key by following the instructions [here](https://developer Add the following to your `claude_desktop_config.json`: +#### Docker + +```json +{ + "mcpServers": { + "google-maps": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "GOOGLE_MAPS_API_KEY=$GOOGLE_MAPS_API_KEY", + "ai/mcp-google-maps" + ], + "env": { + "GOOGLE_MAPS_API_KEY": "" + } + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -76,6 +101,14 @@ Add the following to your `claude_desktop_config.json`: } ``` +## Build + +Docker build: + +```bash +docker build -t vonwig/google-maps:mcp -f src/google-maps/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/memory/Dockerfile b/src/memory/Dockerfile new file mode 100644 index 00000000..0bbfa8ef --- /dev/null +++ b/src/memory/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/memory /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/memory/README.md b/src/memory/README.md index 66bdbb41..37f47094 100644 --- a/src/memory/README.md +++ b/src/memory/README.md @@ -127,7 +127,23 @@ Example: # Usage with Claude Desktop ### Setup + Add this to your claude_desktop_config.json: + +#### Docker + +```json +{ + "mcpServers": { + "memory": { + "command": "docker", + "args": ["run", "-i", "--rm", "ai/mcp-memory"] + } + } +} +``` + +#### NPX ```json { "mcpServers": { @@ -174,6 +190,14 @@ Follow these steps for each interaction: b) Store facts about them as observations ``` +## Building + +Docker: + +```sh +docker build -t ai/mcp-memory -f src/memory/Dockerfile . +``` + ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file diff --git a/src/memory/package.json b/src/memory/package.json index 49cbc92e..741244b1 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -22,7 +22,7 @@ "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } diff --git a/src/postgres/Dockerfile b/src/postgres/Dockerfile new file mode 100644 index 00000000..70fec576 --- /dev/null +++ b/src/postgres/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/postgres /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/postgres/README.md b/src/postgres/README.md index 9a16af77..f5e7b3a1 100644 --- a/src/postgres/README.md +++ b/src/postgres/README.md @@ -24,6 +24,21 @@ The server provides schema information for each table in the database: To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`: +### Docker + +```json +{ + "mcpServers": { + "postgres": { + "command": "docker", + "args": ["run", "-i", "--rm", "ai/mcp-postgres", "host.docker.internal:5432/mydb"] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -41,6 +56,14 @@ To use this server with the Claude Desktop app, add the following configuration Replace `/mydb` with your database name. +## Building + +Docker: + +```sh +docker build -t ai/mcp-postgres -f src/postgres/Dockerfile . +``` + ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file diff --git a/src/puppeteer/Dockerfile b/src/puppeteer/Dockerfile new file mode 100644 index 00000000..d3b250b1 --- /dev/null +++ b/src/puppeteer/Dockerfile @@ -0,0 +1,27 @@ +FROM node:22-bullseye-slim + +ENV DEBIAN_FRONTEND noninteractive + +# for arm64 support we need to install chromium provided by debian +# npm ERR! The chromium binary is not available for arm64. +# https://github.com/puppeteer/puppeteer/issues/7740 + +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium + +RUN apt-get update && \ + apt-get install -y wget gnupg && \ + apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ + libgtk2.0-0 libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libgbm1 libasound2 && \ + apt-get install -y chromium && \ + apt-get clean + +COPY src/puppeteer /project +COPY tsconfig.json /tsconfig.json + +WORKDIR /project + +RUN npm install + +CMD ["node", "dist/index.js"] + diff --git a/src/puppeteer/README.md b/src/puppeteer/README.md index a951a9a3..715f9d0a 100644 --- a/src/puppeteer/README.md +++ b/src/puppeteer/README.md @@ -65,6 +65,21 @@ The server provides access to two types of resources: ## Configuration to use Puppeteer Server Here's the Claude Desktop configuration to use the Puppeter server: +### Docker + +```json +{ + "mcpServers": { + "puppeteer": { + "command": "docker", + "args": ["run", "-i", "--rm", "--init", "ai/mcp-puppeteer"] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -76,6 +91,14 @@ Here's the Claude Desktop configuration to use the Puppeter server: } ``` +## Build + +Docker build: + +```bash +docker build -t ai/mcp-puppeteer -f src/puppeteer/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index 5cae2eb0..2dc98371 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -108,7 +108,7 @@ const screenshots = new Map(); async function ensureBrowser() { if (!browser) { - browser = await puppeteer.launch({ headless: false }); + browser = await puppeteer.launch({ headless: true, args: ["--no-sandbox"] }); const pages = await browser.pages(); page = pages[0]; diff --git a/src/sentry/Dockerfile b/src/sentry/Dockerfile new file mode 100644 index 00000000..5cd6f220 --- /dev/null +++ b/src/sentry/Dockerfile @@ -0,0 +1,29 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install the project into `/app` +WORKDIR /app + +# Enable bytecode compilation +ENV UV_COMPILE_BYTECODE=1 + +# Copy from the cache instead of linking since it's a mounted volume +ENV UV_LINK_MODE=copy + +# Install the project's dependencies using the lockfile and settings +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +# Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching +ADD . /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +# Place executables in the environment at the front of the path +ENV PATH="/app/.venv/bin:$PATH" + +# when running the container, add --db-path and a bind mount to the host's db file +ENTRYPOINT ["uv" , "run" , "--directory", ".", "mcp-server-sentry"] diff --git a/src/sequentialthinking/Dockerfile b/src/sequentialthinking/Dockerfile new file mode 100644 index 00000000..3f35b543 --- /dev/null +++ b/src/sequentialthinking/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22.12-alpine as builder + +COPY src/sequentialthinking /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] diff --git a/src/sequentialthinking/README.md b/src/sequentialthinking/README.md index 0b299c3f..15586b39 100644 --- a/src/sequentialthinking/README.md +++ b/src/sequentialthinking/README.md @@ -44,6 +44,8 @@ The Sequential Thinking tool is designed for: Add this to your `claude_desktop_config.json`: +#### npx + ```json { "mcpServers": { @@ -58,6 +60,32 @@ Add this to your `claude_desktop_config.json`: } ``` +#### docker + +```json +{ + "mcpServers": { + "sequentialthinking": { + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "ai/mcp-sequentialthinking" + ] + } + } +} +``` + +## Building + +Docker: + +```bash +docker build -t ai/mcp-sequentialthinking -f sequentialthinking/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index d696695e..89205d30 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -24,7 +24,7 @@ "yargs": "^17.7.2" }, "devDependencies": { - "@types/node": "^20.11.0", + "@types/node": "^22", "@types/yargs": "^17.0.32", "shx": "^0.3.4", "typescript": "^5.3.3" diff --git a/src/slack/Dockerfile b/src/slack/Dockerfile new file mode 100644 index 00000000..aed894ef --- /dev/null +++ b/src/slack/Dockerfile @@ -0,0 +1,19 @@ +FROM node:22.12-alpine as builder + +# Must be entire project because `prepare` script is run during `npm install` and requires all files. +COPY src/slack /app +COPY tsconfig.json /tsconfig.json + +WORKDIR /app + +RUN --mount=type=cache,target=/root/.npm npm install + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app + +ENV NODE_ENV=production + +WORKDIR /app + +CMD ["node", "dist/index.js"] diff --git a/src/slack/README.md b/src/slack/README.md index b3d80a21..b0523ee3 100644 --- a/src/slack/README.md +++ b/src/slack/README.md @@ -89,6 +89,8 @@ MCP Server for the Slack API, enabling Claude to interact with Slack workspaces. Add the following to your `claude_desktop_config.json`: +#### npx + ```json { "mcpServers": { @@ -107,6 +109,32 @@ Add the following to your `claude_desktop_config.json`: } ``` +#### docker + +```json +{ + "mcpServers": { + "slack": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN", + "-e", + "SLACK_TEAM_ID=$SLACK_TEAM_ID", + "ai/mcp-slack" + ], + "env": { + "SLACK_BOT_TOKEN": "xoxb-your-bot-token", + "SLACK_TEAM_ID": "T01234567" + } + } + } +} +``` + ### Troubleshooting If you encounter permission errors, verify that: @@ -115,6 +143,14 @@ If you encounter permission errors, verify that: 3. The tokens and workspace ID are correctly copied to your configuration 4. The app has been added to the channels it needs to access +## Build + +Docker build: + +```bash +docker build -t ai/mcp-slack -f src/slack/Dockerfile . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/slack/package.json b/src/slack/package.json index 10e18594..337b9db0 100644 --- a/src/slack/package.json +++ b/src/slack/package.json @@ -22,7 +22,7 @@ "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } diff --git a/src/sqlite/Dockerfile b/src/sqlite/Dockerfile new file mode 100644 index 00000000..8189a3d6 --- /dev/null +++ b/src/sqlite/Dockerfile @@ -0,0 +1,29 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install the project into `/app` +WORKDIR /app + +# Enable bytecode compilation +ENV UV_COMPILE_BYTECODE=1 + +# Copy from the cache instead of linking since it's a mounted volume +ENV UV_LINK_MODE=copy + +# Install the project's dependencies using the lockfile and settings +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +# Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching +ADD . /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +# Place executables in the environment at the front of the path +ENV PATH="/app/.venv/bin:$PATH" + +# when running the container, add --db-path and a bind mount to the host's db file +ENTRYPOINT ["uv" , "run" , "--directory", ".", "mcp-server-sqlite"] diff --git a/src/sqlite/README.md b/src/sqlite/README.md index 2b2bea80..517b6e47 100644 --- a/src/sqlite/README.md +++ b/src/sqlite/README.md @@ -63,6 +63,8 @@ The server offers six core tools: ## Usage with Claude Desktop +### uv + ```bash # Add the server to your claude_desktop_config.json "mcpServers": { @@ -80,6 +82,35 @@ The server offers six core tools: } ``` +### Docker + +```json +# Add the server to your claude_desktop_config.json +"mcpServers": { + "sqlite": { + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "-v", + "mcp-test:/mcp", + "ai/mcp-sqlite", + "--db-path", + "/mcp/test.db" + ] + } +} +``` + +## Building + +Docker: + +```bash +docker build -t ai/mcp-sqlite . +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/time/Dockerfile b/src/time/Dockerfile new file mode 100644 index 00000000..b45b389d --- /dev/null +++ b/src/time/Dockerfile @@ -0,0 +1,29 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install the project into `/app` +WORKDIR /app + +# Enable bytecode compilation +ENV UV_COMPILE_BYTECODE=1 + +# Copy from the cache instead of linking since it's a mounted volume +ENV UV_LINK_MODE=copy + +# Install the project's dependencies using the lockfile and settings +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +# Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching +ADD . /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +# Place executables in the environment at the front of the path +ENV PATH="/app/.venv/bin:$PATH" + +# when running the container, add --db-path and a bind mount to the host's db file +ENTRYPOINT ["uv" , "run" , "--directory", ".", "mcp-server-time"] diff --git a/src/time/README.md b/src/time/README.md index 8f80e415..f40dc19d 100644 --- a/src/time/README.md +++ b/src/time/README.md @@ -54,6 +54,19 @@ Add to your Claude settings: ``` +
+Using docker + +```json +"mcpServers": { + "time": { + "command": "docker", + "args": ["run", "-i", "--rm", "ai/mcp-time"] + } +} +``` +
+
Using pip installation @@ -179,6 +192,15 @@ npx @modelcontextprotocol/inspector uv run mcp-server-time 3. "When it's 4 PM in New York, what time is it in London?" 4. "Convert 9:30 AM Tokyo time to New York time" +## Build + +Docker build: + +```bash +cd src/time +docker build -t ai/mcp-time . +``` + ## Contributing We encourage contributions to help expand and improve mcp-server-time. Whether you want to add new time-related tools, enhance existing functionality, or improve documentation, your input is valuable.