diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 7d55e744..a87cdd8f 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: npm - name: Install dependencies @@ -64,7 +64,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: npm registry-url: "https://registry.npmjs.org" diff --git a/README.md b/README.md index 7e1178f7..654481d5 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Official integrations are maintained by companies building production ready MCP - E2B Logo **[E2B](https://github.com/e2b-dev/mcp-server)** - Run code in secure sandboxes hosted by [E2B](https://e2b.dev) - Exa Logo **[Exa](https://github.com/exa-labs/exa-mcp-server)** - Search Engine made for AIs by [Exa](https://exa.ai) - **[JetBrains](https://github.com/JetBrains/mcp-jetbrains)** – Work on your code with JetBrains IDEs +- **[Needle](https://github.com/JANHMS/needle-mcp)** - Production-ready RAG out of the box to search and retrieve data from your own documents. - **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform - Neo4j Logo **[Neo4j](https://github.com/neo4j-contrib/mcp-neo4j/)** - Neo4j graph database server (schema + read/write-cypher) and separate graph database backed memory - Tinybird Logo **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform @@ -51,6 +52,7 @@ Official integrations are maintained by companies building production ready MCP - **[Qdrant](https://github.com/qdrant/mcp-server-qdrant/)** - Implement semantic memory layer on top of the Qdrant vector search engine - **[Metoro](https://github.com/metoro-io/metoro-mcp-server)** - Query and interact with kubernetes environments monitored by Metoro + ### 🌎 Community Servers A growing set of community-developed and maintained servers demonstrates various applications of MCP across different domains. @@ -103,6 +105,8 @@ A growing set of community-developed and maintained servers demonstrates various - **[TMDB](https://github.com/Laksh-star/mcp-server-tmdb)** - This MCP server integrates with The Movie Database (TMDB) API to provide movie information, search capabilities, and recommendations. - **[MongoDB](https://github.com/kiliczsh/mcp-mongo-server)** - A Model Context Protocol Server for MongoDB. - **[Airtable](https://github.com/felores/airtable-mcp)** - Airtable Model Context Protocol Server. +- **[Atlassian](https://github.com/sooperset/mcp-atlassian)** - Interact with Atlassian Cloud products (Confluence and Jira) including searching/reading Confluence spaces/pages, accessing Jira issues, and project metadata. +- **[Google Tasks](https://github.com/zcaceres/gtasks-mcp)** - Google Tasks API Model Context Protocol Server. - **[Fetch](https://github.com/zcaceres/fetch-mcp)** - A server that flexibly fetches HTML, JSON, Markdown, or plaintext - **[Everything Search](https://github.com/mamertofabian/mcp-everything-search)** - Fast file searching capabilities across Windows (using [Everything SDK](https://www.voidtools.com/support/everything/sdk/)), macOS (using mdfind command), and Linux (using locate/plocate command). diff --git a/package-lock.json b/package-lock.json index 34253af3..0dcbfbbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1573,11 +1573,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/node-fetch": { @@ -4774,9 +4775,10 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" }, "node_modules/universalify": { "version": "2.0.1", @@ -5015,20 +5017,11 @@ "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" } }, - "src/aws-kb-retrieval-server/node_modules/@types/node": { - "version": "20.17.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", - "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/brave-search": { "name": "@modelcontextprotocol/server-brave-search", "version": "0.6.2", @@ -5040,7 +5033,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" } @@ -5055,16 +5048,6 @@ "zod": "^3.23.8" } }, - "src/brave-search/node_modules/@types/node": { - "version": "20.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", - "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/duckduckgo": { "name": "@modelcontextprotocol/server-duckduckgo", "version": "0.2.0", @@ -5080,7 +5063,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "@types/node": "^20.10.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5099,20 +5082,11 @@ "mcp-server-everart": "dist/index.js" }, "devDependencies": { - "@types/node": "^20.11.0", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.3.3" } }, - "src/everart/node_modules/@types/node": { - "version": "20.17.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", - "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/everart/node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -5201,7 +5175,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" } @@ -5216,16 +5190,6 @@ "zod": "^3.23.8" } }, - "src/filesystem/node_modules/@types/node": { - "version": "20.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", - "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/filesystem/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -5298,7 +5262,7 @@ "mcp-server-gdrive": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5313,22 +5277,13 @@ "zod": "^3.23.8" } }, - "src/gdrive/node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.8" - } - }, "src/github": { "name": "@modelcontextprotocol/server-github", "version": "0.6.2", "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", @@ -5352,14 +5307,6 @@ "zod": "^3.23.8" } }, - "src/github/node_modules/@types/node": { - "version": "20.17.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", - "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/github/node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -5501,7 +5448,7 @@ "mcp-server-memory": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5516,15 +5463,6 @@ "zod": "^3.23.8" } }, - "src/memory/node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.8" - } - }, "src/postgres": { "name": "@modelcontextprotocol/server-postgres", "version": "0.6.2", @@ -5591,21 +5529,12 @@ "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" } }, - "src/sequentialthinking/node_modules/@types/node": { - "version": "20.17.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", - "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, "src/slack": { "name": "@modelcontextprotocol/server-slack", "version": "0.6.2", @@ -5617,7 +5546,7 @@ "mcp-server-slack": "dist/index.js" }, "devDependencies": { - "@types/node": "^22.9.3", + "@types/node": "^22", "shx": "^0.3.4", "typescript": "^5.6.2" } @@ -5631,15 +5560,6 @@ "raw-body": "^3.0.0", "zod": "^3.23.8" } - }, - "src/slack/node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.8" - } } } } diff --git a/src/aws-kb-retrieval-server/Dockerfile b/src/aws-kb-retrieval-server/Dockerfile new file mode 100644 index 00000000..a173a606 --- /dev/null +++ b/src/aws-kb-retrieval-server/Dockerfile @@ -0,0 +1,22 @@ +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 + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["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..bcd9fc2f 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", "-e", "AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION", "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 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..fefeca68 --- /dev/null +++ b/src/brave-search/Dockerfile @@ -0,0 +1,23 @@ +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 + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["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..39f73535 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", + "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 mcp/brave-search:latest -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..c27f9542 --- /dev/null +++ b/src/everart/Dockerfile @@ -0,0 +1,24 @@ +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 + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] + +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..57dab4d0 100644 --- a/src/everart/README.md +++ b/src/everart/README.md @@ -10,6 +10,24 @@ 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", "mcp/everart"], + "env": { + "EVERART_API_KEY": "your_key_here" + } + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -71,3 +89,9 @@ Generation details: You can also click the URL above to view the image again. ``` + +## Building w/ Docker + +```sh +docker build -t 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..56267937 --- /dev/null +++ b/src/everything/Dockerfile @@ -0,0 +1,22 @@ +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 + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +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..7e8824c4 --- /dev/null +++ b/src/fetch/Dockerfile @@ -0,0 +1,36 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# 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 --no-editable + +# 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 --no-editable + +FROM python:3.12-slim-bookworm + +WORKDIR /app + +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# 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 ["mcp-server-fetch"] diff --git a/src/fetch/README.md b/src/fetch/README.md index bc8f0f61..0e58b3de 100644 --- a/src/fetch/README.md +++ b/src/fetch/README.md @@ -61,6 +61,19 @@ Add to your Claude settings: ``` +
+Using docker + +```json +"mcpServers": { + "fetch": { + "command": "docker", + "args": ["run", "-i", "--rm", "mcp/fetch"] + } +} +``` +
+
Using pip installation diff --git a/src/filesystem/Dockerfile b/src/filesystem/Dockerfile new file mode 100644 index 00000000..12e5bcf4 --- /dev/null +++ b/src/filesystem/Dockerfile @@ -0,0 +1,25 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + + +FROM node:22-alpine AS release + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "/app/dist/index.js"] \ No newline at end of file diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 79c2b0f3..05c915ad 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -105,6 +105,34 @@ 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 +Note: all directories must be mounted to `/projects` by default. + +```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", + "mcp/filesystem", + "/projects", + ] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -121,6 +149,14 @@ Add this to your `claude_desktop_config.json`: } ``` +## Build + +Docker build: + +```bash +docker build -t 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..8a3458f4 --- /dev/null +++ b/src/gdrive/Dockerfile @@ -0,0 +1,29 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json +COPY src/gdrive/replace_open.sh /replace_open.sh + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +RUN sh /replace_open.sh + +RUN rm /replace_open.sh + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/gdrive/README.md b/src/gdrive/README.md index 9a795f0c..2d153815 100644 --- a/src/gdrive/README.md +++ b/src/gdrive/README.md @@ -49,6 +49,33 @@ To authenticate and save credentials: To integrate this server with the desktop app, add the following to your app's server configuration: +#### Docker + +Authentication: + +Assuming you have completed setting up the OAuth application on Google Cloud, you can now auth the server with the following command, replacing `/path/to/gcp-oauth.keys.json` with the path to your OAuth keys file: + +```bash +docker run -i --rm --mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json -v mcp-gdrive:/gdrive-server -e GDRIVE_OAUTH_PATH=/gcp-oauth.keys.json -e "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json" -p 3000:3000 mcp/gdrive auth +``` + +The command will print the URL to open in your browser. Open this URL in your browser and complete the authentication process. The credentials will be saved in the `mcp-gdrive` volume. + +Once authenticated, you can use the server in your app's server configuration: + +```json +{ + "mcpServers": { + "gdrive": { + "command": "docker", + "args": ["run", "-i", "--rm", "-v", "mcp-gdrive:/gdrive-server", "-e", "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json", "mcp/gdrive"] + } + } +} +``` + +#### NPX + ```json { "mcpServers": { diff --git a/src/gdrive/index.ts b/src/gdrive/index.ts index b9c6d910..575c350c 100644 --- a/src/gdrive/index.ts +++ b/src/gdrive/index.ts @@ -152,13 +152,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { const userQuery = request.params.arguments?.query as string; const escapedQuery = userQuery.replace(/\\/g, "\\\\").replace(/'/g, "\\'"); const formattedQuery = `fullText contains '${escapedQuery}'`; - + const res = await drive.files.list({ q: formattedQuery, pageSize: 10, fields: "files(id, name, mimeType, modifiedTime, size)", }); - + const fileList = res.data.files ?.map((file: any) => `${file.name} (${file.mimeType})`) .join("\n"); @@ -175,7 +175,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { throw new Error("Tool not found"); }); -const credentialsPath = path.join( +const credentialsPath = process.env.GDRIVE_CREDENTIALS_PATH || path.join( path.dirname(new URL(import.meta.url).pathname), "../../../.gdrive-server-credentials.json", ); @@ -183,7 +183,7 @@ const credentialsPath = path.join( async function authenticateAndSaveCredentials() { console.log("Launching auth flow…"); const auth = await authenticate({ - keyfilePath: path.join( + keyfilePath: process.env.GDRIVE_OAUTH_PATH || path.join( path.dirname(new URL(import.meta.url).pathname), "../../../gcp-oauth.keys.json", ), @@ -206,7 +206,7 @@ async function loadCredentialsAndRunServer() { auth.setCredentials(credentials); google.options({ auth }); - console.log("Credentials loaded. Starting server."); + console.error("Credentials loaded. Starting server."); const transport = new StdioServerTransport(); await server.connect(transport); } 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/gdrive/replace_open.sh b/src/gdrive/replace_open.sh new file mode 100644 index 00000000..6727854b --- /dev/null +++ b/src/gdrive/replace_open.sh @@ -0,0 +1,5 @@ +#! /bin/bash + +# Basic script to replace opn(authorizeUrl, { wait: false }).then(cp => cp.unref()); with process.stdout.write(`Open this URL in your browser: ${authorizeUrl}`); + +sed -i 's/opn(authorizeUrl, { wait: false }).then(cp => cp.unref());/process.stderr.write(`Open this URL in your browser: ${authorizeUrl}\n`);/' node_modules/@google-cloud/local-auth/build/src/index.js diff --git a/src/git/Dockerfile b/src/git/Dockerfile new file mode 100644 index 00000000..2746d634 --- /dev/null +++ b/src/git/Dockerfile @@ -0,0 +1,38 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# 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 --no-editable + +# 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 --no-editable + +FROM python:3.12-slim-bookworm + +RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# 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 ["mcp-server-git"] diff --git a/src/git/README.md b/src/git/README.md index 8f3afdc7..cb22629e 100644 --- a/src/git/README.md +++ b/src/git/README.md @@ -120,6 +120,21 @@ Add this to your `claude_desktop_config.json`: ```
+
+Using docker + +* Note: replace '/Users/username' with the a path that you want to be accessible by this tool + +```json +"mcpServers": { + "git": { + "command": "docker", + "args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/Users/username", "mcp/git"] + } +} +``` +
+
Using pip installation @@ -193,18 +208,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", + "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 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..4a054d65 --- /dev/null +++ b/src/github/Dockerfile @@ -0,0 +1,23 @@ +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.12-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/github/README.md b/src/github/README.md index 1898f9e1..14bab491 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", + "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 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..ce8823ca --- /dev/null +++ b/src/gitlab/Dockerfile @@ -0,0 +1,24 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22.12-alpine AS release + +WORKDIR /app + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/gitlab/README.md b/src/gitlab/README.md index fdf82552..e2b16fe1 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", + "-e", + "GITLAB_API_URL", + "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..62949680 --- /dev/null +++ b/src/google-maps/Dockerfile @@ -0,0 +1,25 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["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..c0fd576e 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", + "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..d5af8471 --- /dev/null +++ b/src/memory/Dockerfile @@ -0,0 +1,24 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/memory/README.md b/src/memory/README.md index 66bdbb41..e405a0d4 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", "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 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..f390ec0e --- /dev/null +++ b/src/postgres/Dockerfile @@ -0,0 +1,24 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/postgres/README.md b/src/postgres/README.md index 9a16af77..aaace581 100644 --- a/src/postgres/README.md +++ b/src/postgres/README.md @@ -24,6 +24,29 @@ 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 + +* when running docker on macos, use host.docker.internal if the server is running on the host network (eg localhost) +* username/password can be added to the postgresql url with `postgresql://user:password@host:port/db-name` + +```json +{ + "mcpServers": { + "postgres": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "mcp/postgres", + "postgresql://host.docker.internal:5432/mydb"] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -41,6 +64,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 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. diff --git a/src/puppeteer/Dockerfile b/src/puppeteer/Dockerfile new file mode 100644 index 00000000..d0f58a3a --- /dev/null +++ b/src/puppeteer/Dockerfile @@ -0,0 +1,26 @@ +FROM node:22-bookworm-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 + +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file diff --git a/src/puppeteer/README.md b/src/puppeteer/README.md index a951a9a3..7c7e8160 100644 --- a/src/puppeteer/README.md +++ b/src/puppeteer/README.md @@ -65,6 +65,23 @@ 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 + +**NOTE** The docker implementation will use headless chromium, where as the NPX version will open a browser window. + +```json +{ + "mcpServers": { + "puppeteer": { + "command": "docker", + "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"] + } + } +} +``` + +### NPX + ```json { "mcpServers": { @@ -76,6 +93,14 @@ Here's the Claude Desktop configuration to use the Puppeter server: } ``` +## Build + +Docker build: + +```bash +docker build -t 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..fda97164 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -108,7 +108,9 @@ const screenshots = new Map(); async function ensureBrowser() { if (!browser) { - browser = await puppeteer.launch({ headless: false }); + const npx_args = { headless: false } + const docker_args = { headless: true, args: ["--no-sandbox", "--single-process", "--no-zygote"] } + browser = await puppeteer.launch(process.env.DOCKER_CONTAINER ? docker_args : npx_args); const pages = await browser.pages(); page = pages[0]; @@ -399,3 +401,8 @@ async function runServer() { } runServer().catch(console.error); + +process.stdin.on("close", () => { + console.error("Puppeteer MCP Server closed"); + server.close(); +}); diff --git a/src/sentry/Dockerfile b/src/sentry/Dockerfile new file mode 100644 index 00000000..a706a15e --- /dev/null +++ b/src/sentry/Dockerfile @@ -0,0 +1,37 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# 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 --no-editable + +# 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 --no-editable + +FROM python:3.12-slim-bookworm + +WORKDIR /app + +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# 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 ["mcp-server-sentry"] + diff --git a/src/sentry/README.md b/src/sentry/README.md index aae44568..4f02bb58 100644 --- a/src/sentry/README.md +++ b/src/sentry/README.md @@ -69,6 +69,22 @@ Add this to your `claude_desktop_config.json`:
+ +
+Using docker + +```json +"mcpServers": { + "sentry": { + "command": "docker", + "args": ["run", "-i", "--rm", "mcp/sentry", "--auth-token", "YOUR_SENTRY_TOKEN"] + } +} +``` +
+ +
+ Using pip installation ```json diff --git a/src/sequentialthinking/Dockerfile b/src/sequentialthinking/Dockerfile new file mode 100644 index 00000000..08a4282a --- /dev/null +++ b/src/sequentialthinking/Dockerfile @@ -0,0 +1,24 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] diff --git a/src/sequentialthinking/README.md b/src/sequentialthinking/README.md index 0b299c3f..77ccb454 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", + "mcp/sequentialthinking" + ] + } + } +} +``` + +## Building + +Docker: + +```bash +docker build -t 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..6df0be52 --- /dev/null +++ b/src/slack/Dockerfile @@ -0,0 +1,25 @@ +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 + +RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev + +FROM node:22-alpine AS release + +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +ENV NODE_ENV=production + +WORKDIR /app + +RUN npm ci --ignore-scripts --omit-dev + +ENTRYPOINT ["node", "dist/index.js"] diff --git a/src/slack/README.md b/src/slack/README.md index b3d80a21..970cba66 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", + "-e", + "SLACK_TEAM_ID", + "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 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..2edc34b0 --- /dev/null +++ b/src/sqlite/Dockerfile @@ -0,0 +1,37 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# 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 --no-editable + +# 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 --no-editable + +FROM python:3.12-slim-bookworm + +WORKDIR /app + +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# 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 ["mcp-server-sqlite"] + diff --git a/src/sqlite/README.md b/src/sqlite/README.md index 2b2bea80..e194c6bf 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", + "mcp/sqlite", + "--db-path", + "/mcp/test.db" + ] + } +} +``` + +## Building + +Docker: + +```bash +docker build -t 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..bd62ea84 --- /dev/null +++ b/src/time/Dockerfile @@ -0,0 +1,36 @@ +# Use a Python image with uv pre-installed +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv + +# 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 --no-editable + +# 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 --no-editable + +FROM python:3.12-slim-bookworm + +WORKDIR /app + +COPY --from=uv /root/.local /root/.local +COPY --from=uv --chown=app:app /app/.venv /app/.venv + +# 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 ["mcp-server-time"] diff --git a/src/time/README.md b/src/time/README.md index 8f80e415..eed504bb 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", "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 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.