npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wojtek1150/mcp-gitlab

v1.0.0-beta.1

Published

MCP server for GitLab merge request operations — read comments, diffs, and post replies

Readme

@wojtek1150/mcp-gitlab

MCP server for GitLab merge request operations. Enables AI agents (Claude Code, Claude Desktop) to read MR comments with file/line context, inspect diffs, and post replies — making it possible to automatically implement review feedback.

Features

| Tool | Description | |---|---| | list_merge_requests | List MRs with filtering by state, author, labels | | get_merge_request | Full details of a single MR | | get_mr_comments | All comments/threads with file path and line number | | get_mr_diff | Full diff or filtered to a specific file | | get_mr_versions | Commit SHAs needed for posting inline comments | | add_mr_comment | Post a general or inline (file+line) comment | | reply_to_comment | Reply to an existing discussion thread |

Works with both GitLab.com and self-hosted GitLab instances.

Requirements

  • Node.js 18+
  • GitLab Personal Access Token with api scope

Installation

Option A — use directly with npx (no install)

GITLAB_TOKEN=glpat-xxx npx @wojtek1150/mcp-gitlab

Option B — install globally

npm install -g @wojtek1150/mcp-gitlab

Option C — clone and build

git clone https://github.com/wojtek1150/mcp-gitlab.git
cd mcp-gitlab
npm install
npm run build

Configuration

The server is configured via environment variables:

| Variable | Required | Default | Description | |---|---|---|---| | GITLAB_TOKEN | ✅ | — | Personal Access Token (api scope) | | GITLAB_URL | ❌ | https://gitlab.com | Base URL of your GitLab instance | | GITLAB_DEFAULT_PROJECT | ❌ | — | Default project path (e.g. group/repo) |

Copy .env.example to .env and fill in your values:

cp .env.example .env

Generating a GitLab token

  1. Go to GitLab → User Settings → Access Tokens (or /-/user_settings/personal_access_tokens)
  2. Create a token with the api scope
  3. Copy the token — it will only be shown once

For self-hosted GitLab, the same path applies on your instance.

Claude Code integration

Add the server to your Claude Code MCP configuration:

# Via npx (always uses latest published version)
claude mcp add gitlab -- npx -y @wojtek1150/mcp-gitlab

# With environment variables
GITLAB_TOKEN=glpat-xxx GITLAB_URL=https://your.gitlab.com \
  claude mcp add gitlab -- npx -y @wojtek1150/mcp-gitlab

Or add it manually to ~/.claude/settings.json:

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@wojtek1150/mcp-gitlab"],
      "env": {
        "GITLAB_TOKEN": "glpat-xxx",
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_DEFAULT_PROJECT": "group/my-repo"
      }
    }
  }
}

Claude Desktop integration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@wojtek1150/mcp-gitlab"],
      "env": {
        "GITLAB_TOKEN": "glpat-xxx",
        "GITLAB_URL": "https://gitlab.com"
      }
    }
  }
}

Usage examples

Once the MCP server is connected, you can ask Claude:

"List open MRs in group/my-repo"

"Show me all unresolved review comments from MR !42 with their file and line info"

"Apply the review feedback from MR !42 — get the comments, make the fixes, then reply to each thread confirming what was changed"

"What files changed in MR !17? Show me the diff for src/auth.ts"

Typical agent workflow for implementing review feedback

1. get_mr_comments(mr_iid: 42, unresolved_only: true)
   → returns each comment with file path + line number

2. get_mr_diff(mr_iid: 42, file_path: "src/auth.ts")
   → shows the current diff for context

3. [Agent edits local files based on feedback]

4. get_mr_versions(mr_iid: 42)
   → fetches base_sha / start_sha / head_sha

5. reply_to_comment(discussion_id: "abc123", body: "Fixed — extracted validation to a helper function")
   → resolves the thread

Development

# Run in development mode (no build needed)
npm run dev

# Type check
npm run typecheck

# Build for production
npm run build

# Run built server
npm start

Publishing

npm login
npm publish --access public

License

MIT