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 diff --git a/README.md b/README.md index 81df12b..cf0a694 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,22 @@ # @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. gitlab mcp MCP 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 ``` 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 } })