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

gitlab-local-mcp

v0.1.0

Published

MCP server for GitLab merge request workflows — review, comment, create, approve and merge MRs from your AI assistant.

Readme

gitlab-local-mcp

License: MIT npm version

An MCP (Model Context Protocol) server for GitLab merge request workflows. Lets AI assistants list, create, review, and comment on merge requests. All tools that operate on a specific MR accept an optional merge_request_iid — omit it and the server auto-detects the open MR from the current git branch so you don't need to specify project or MR IDs.

Quick Start

npx gitlab-local-mcp

Or install globally:

npm install -g gitlab-local-mcp

Setup

git clone https://github.com/AlexShul/gitlab-local-mcp.git
cd gitlab-local-mcp
npm install

Environment Variables

| Variable | Required | Description | |---|---|---| | MR_MCP_GITLAB_TOKEN | Yes | GitLab personal access token (needs api scope) | | MR_MCP_GITLAB_HOST | Yes | GitLab instance URL (e.g. https://gitlab.com) | | MR_MCP_PROJECT_ID | No | Default project ID — used when project_id is omitted from tool calls | | MR_MCP_REPO_DIR | No | Path to your local git repo — enables auto-detection of the project ID and current-branch MR when IDs are omitted |

Copy .env.example to .env and fill in your values for local development.

Running

npm start

The server communicates over stdio, so it's designed to be launched by an MCP client rather than run standalone.

Client Configuration

This server works with any MCP-compatible client. Below are examples for popular clients.

Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "gitlab-local-mcp": {
      "command": "npx",
      "args": ["-y", "gitlab-local-mcp"],
      "env": {
        "MR_MCP_GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
        "MR_MCP_GITLAB_HOST": "https://gitlab.com",
        "MR_MCP_REPO_DIR": "/path/to/your/repo"
      }
    }
  }
}

Or if you cloned the repo locally:

{
  "mcpServers": {
    "gitlab-local-mcp": {
      "command": "node",
      "args": ["/path/to/gitlab-local-mcp/index.mjs"],
      "env": {
        "MR_MCP_GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
        "MR_MCP_GITLAB_HOST": "https://gitlab.com",
        "MR_MCP_REPO_DIR": "/path/to/your/repo"
      }
    }
  }
}

Other MCP Clients

Any client that supports the MCP stdio transport can launch this server. Point it at npx gitlab-local-mcp (or node /path/to/index.mjs) and pass the environment variables listed above.

Configuration Notes

MR_MCP_REPO_DIR is the recommended way to configure the server. It enables auto-detection of the project ID from the git remote URL and the current MR from the active branch, so MR_MCP_PROJECT_ID is no longer needed in most cases. You can still set MR_MCP_PROJECT_ID as a fallback for repos without a GitLab remote, or pass repo_dir / project_id / merge_request_iid per tool call instead of relying on environment variables.

Available Tools

Project Discovery

| Tool | Description | |---|---| | get_projects | Get projects visible to the current token. Useful for discovering project IDs. |

Merge Requests

All tools below accept optional project_id and repo_dir parameters. Tools that act on a specific MR also accept an optional merge_request_iid — when omitted, the server resolves the open MR whose source branch matches the current git branch (requires repo_dir or MR_MCP_REPO_DIR).

| Tool | Description | |---|---| | list_open_merge_requests | List merge requests for a project. Defaults to state=opened. Can filter by source_branch. | | create_merge_request | Create a new merge request. Omit source_branch to use the current git branch. | | get_merge_request_details | Get full details for a merge request. | | get_merge_request_diff | Get file-level diffs for a merge request. | | get_merge_request_comments | Get MR discussion notes. Returns unresolved notes only by default. | | add_merge_request_comment | Add a general (non-line-specific) comment to an MR. | | add_merge_request_diff_comment | Add a line-specific review comment on an MR diff. | | reply_to_merge_request_thread | Reply to an existing discussion thread in a merge request. | | resolve_merge_request_discussion | Resolve or unresolve a merge request discussion thread. | | approve_merge_request | Approve a merge request. | | merge_merge_request | Merge (accept) a merge request. Optionally squash commits or provide a custom merge commit message. |

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT