From 2b0c9836b6bb243da770375c0581f27bf048f956 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 13 Feb 2025 00:02:12 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..58878ab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use an official Node.js image as the base image +FROM node:16-alpine AS builder + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json files +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm install --ignore-scripts + +# Copy the rest of the application code +COPY . . + +# Build the application +RUN npm run build + +# Use a smaller image for the runtime +FROM node:16-alpine AS runner + +# Set the working directory +WORKDIR /app + +# Copy the build output and package.json +COPY --from=builder /app/build ./build +COPY --from=builder /app/package.json ./ + +# Set environment variables +ENV GITLAB_API_URL=https://gitlab.com/api/v4 + +# Define the command to run the application +ENTRYPOINT ["node", "build/index.js"] + +# This image requires the following environment variable at runtime: +# - GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token From f18a1163633ef98ea6b5ac11d7814bcc5fe4d7e1 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 13 Feb 2025 00:02:13 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..4adef2d --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,21 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - gitlabPersonalAccessToken + properties: + gitlabPersonalAccessToken: + type: string + description: Your GitLab personal access token. + gitlabApiUrl: + type: string + default: https://gitlab.com/api/v4 + description: "Your GitLab API URL. Default: https://gitlab.com/api/v4" + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['build/index.js'], env: { GITLAB_PERSONAL_ACCESS_TOKEN: config.gitlabPersonalAccessToken, GITLAB_API_URL: config.gitlabApiUrl } }) From 0f9b84dcdfb8d3d06966ce4a856c89e144f39711 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 13 Feb 2025 00:02:14 +0800 Subject: [PATCH 3/3] Update README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f9f7737..a3de3cb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,20 @@ # @zereight/mcp-gitlab +[![smithery badge](https://smithery.ai/badge/@zereight/gitlab-mcp)](https://smithery.ai/server/@zereight/gitlab-mcp) + GitLab MCP(Model Context Protocol) Server. ## Installation and Execution +### Installing via Smithery + +To install GitLab MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@zereight/gitlab-mcp): + +```bash +npx -y @smithery/cli install @zereight/gitlab-mcp --client claude +``` + +### Manual Installation ```bash npx @zereight/mcp-gitlab ```