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

@jakobjoachim/gitlab-mr-mcp-client

v1.0.3

Published

MCP server for GitLab MR discussions

Readme

GitLab MR Discussions MCP Server

Local MCP server (stdio) for reading merge request discussions and replying to them.

What it does

  • Resolves GitLab project from local git origin remote.
  • Lists unresolved MR discussion comments in an actionable format.
  • Prepares dry-run reply payloads.
  • Posts replies to a discussion only when confirm=true.
  • Resolves and reopens MR discussion threads explicitly.
  • Resolves merge request IID from current branch when mr_iid is omitted.

Requirements

  • Node.js 20+
  • A GitLab Personal Access Token
    • read_api for read-only usage
    • api to post replies

Setup (local development)

npm install
npm run build

Set environment variables (see .env.example):

  • GITLAB_TOKEN (required)
  • GITLAB_BASE_URL (optional fallback, for self-managed instances)
  • GITLAB_TIMEOUT_MS (optional, default 10000)

Setup (npm, recommended for users)

No clone/build required for users. Configure your MCP client to run the package via npx.

MCP client setup

Claude Code

Add this to your Claude Code MCP config:

{
  "mcpServers": {
    "gitlab-mr": {
      "command": "npx",
      "args": ["-y", "@jakobjoachim/gitlab-mr-mcp-client"]
    }
  }
}

OpenCode

Add this to your opencode.json:

{
  "mcp": {
    "gitlab-mr": {
      "type": "local",
      "command": ["npx", "-y", "@jakobjoachim/gitlab-mr-mcp-client"]
    }
  }
}

If your client supports env on server config, pass at least GITLAB_TOKEN.

Token injection examples

Use a shell wrapper so GITLAB_TOKEN is scoped to the MCP process invocation.

Claude Code + 1Password:

{
  "mcpServers": {
    "gitlab-mr": {
      "command": "sh",
      "args": [
        "-c",
        "GITLAB_TOKEN=\"$(op read 'op://vault/secret/field')\" npx -y @jakobjoachim/gitlab-mr-mcp-client"
      ]
    }
  }
}

OpenCode + 1Password:

{
  "mcp": {
    "gitlab-mr": {
      "type": "local",
      "command": [
        "sh",
        "-c",
        "GITLAB_TOKEN=\"$(op read 'op://vault/secret/field')\" npx -y @jakobjoachim/gitlab-mr-mcp-client"
      ]
    }
  }
}

Claude Code + KeePassXC CLI:

{
  "mcpServers": {
    "gitlab-mr": {
      "command": "sh",
      "args": [
        "-c",
        "GITLAB_TOKEN=\"$(keepassxc-cli show -a Password '/path/to/vault.kdbx' 'gitlab-api-key')\" npx -y @jakobjoachim/gitlab-mr-mcp-client"
      ]
    }
  }
}

OpenCode + KeePassXC CLI:

{
  "mcp": {
    "gitlab-mr": {
      "type": "local",
      "command": [
        "sh",
        "-c",
        "GITLAB_TOKEN=\"$(keepassxc-cli show -a Password '/path/to/vault.kdbx' 'gitlab-api-key')\" npx -y @jakobjoachim/gitlab-mr-mcp-client"
      ]
    }
  }
}

Host and project resolution

Resolution precedence:

  1. tool input gitlab_base_url (optional override)
  2. host inferred from git remote get-url origin
  3. GITLAB_BASE_URL
  4. https://gitlab.com

Project path is inferred from the same remote (group/subgroup/project). You can override with project_path.

MCP tool reference

mr_list_unresolved_comments

Input:

{
  "mr_iid": 123,
  "include_resolved": false,
  "gitlab_base_url": "https://gitlab.example.com",
  "project_path": "group/subgroup/project"
}

mr_iid is optional. If omitted, the server resolves it from the current git branch and the opened MR source branch.

mr_prepare_reply

Input:

{
  "mr_iid": 123,
  "discussion_id": "abc123...",
  "body": "Thanks, fixed in latest commit"
}

Always dry-run. No GitLab write action.

mr_post_reply

Input:

{
  "mr_iid": 123,
  "discussion_id": "abc123...",
  "body": "Thanks, fixed in latest commit",
  "confirm": true
}

Rejects when confirm is not true.

mr_resolve_thread

Input:

{
  "mr_iid": 123,
  "discussion_id": "abc123...",
  "gitlab_base_url": "https://gitlab.example.com",
  "project_path": "group/subgroup/project"
}

Calls the GitLab resolve discussion endpoint and marks the thread resolved.

mr_reopen_thread

Input:

{
  "mr_iid": 123,
  "discussion_id": "abc123...",
  "gitlab_base_url": "https://gitlab.example.com",
  "project_path": "group/subgroup/project"
}

Calls the GitLab resolve discussion endpoint with resolved=false.

Example MCP config (local checkout)

Use your MCP client's local stdio server config and point it to this command:

node /absolute/path/to/gitlab-mr-mcp-client/dist/index.js

If your client supports env on server config, pass at least GITLAB_TOKEN.

Publishing

npm login
npm publish --access public --provenance=false

Smoke test before publish:

npm pack
npx -y --package ./jakobjoachim-gitlab-mr-mcp-client-1.0.1.tgz gitlab-mr-mcp-client

Development

npm run dev

Notes

  • Uses GitLab Discussions API endpoints under /api/v4/projects/:id/merge_requests/:merge_request_iid/discussions.
  • Pagination is supported for listing discussions.