gitlab-mcp
Provides tools for interacting with GitLab's API, enabling AI agents to manage issues, merge requests, code review, pipelines, milestones, releases, search, and file access across GitLab instances.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gitlab-mcplist open merge requests in my group"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gitlab-mcp
MCP server for GitLab API. Works with self-hosted GitLab instances and gitlab.com.
Provides tools for issues, merge requests, code review, pipelines, milestones, releases, search, and file access.
Prerequisites
Node.js >= 18
npm
GitLab Personal Access Token with
apiscope
Installation
git clone <repo-url> gitlab-mcp
cd gitlab-mcp
npm install
npm run buildConfiguration
Create config.json in the project root:
{
"token": "glpat-your-token-here",
"apiUrl": "https://your-gitlab-instance.com/api/v4"
}For gitlab.com, use "apiUrl": "https://gitlab.com/api/v4" or omit the field entirely.
Alternatively, set environment variables instead of using config.json:
export GITLAB_PERSONAL_ACCESS_TOKEN="glpat-your-token-here"
export GITLAB_API_URL="https://your-gitlab-instance.com/api/v4"Creating a GitLab token
Go to GitLab > Settings > Access Tokens
Create a token with
apiscopeCopy the token into
config.json
Adding to Claude Code
Add the server to your Claude Code MCP settings (~/.claude/settings.json or project-level .claude/settings.local.json):
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": ["/absolute/path/to/gitlab-mcp/index.js"]
}
}
}Restart Claude Code or run /mcp to connect.
Available tools
Issues
Tool | Description |
| Get a single issue by project and IID |
| List issues in a group with filters (state, labels, assignee, search, milestone) |
| List issues in a milestone |
| Create a new issue |
| Update issue (state, title, description, labels, assignee, milestone) |
| Add a comment to an issue |
Merge Requests
Tool | Description |
| List MRs with filters (state, author, reviewer, assignee, date, target branch). Project is optional — omit for cross-project search. |
| Get a single MR by project and IID |
| Get the diff / changed files of an MR |
| List comments/notes on an MR |
| Add a general comment to an MR |
| Create an inline diff comment on a specific file and line |
Projects, Milestones, Releases
Tool | Description |
| List projects in a group |
| List milestones in a group |
| List releases for a project |
Search & Files
Tool | Description |
| Search within a project (code, issues, MRs, commits, notes) |
| Get file contents from a repository |
| List CI/CD pipelines with filters (status, ref) |
Generic escape hatch
Tool | Description |
| Call any GitLab REST API endpoint directly. Use when no dedicated tool exists. Takes |
Example — edit an existing MR note:
gitlab_api_request({
method: "PUT",
path: "/projects/93/merge_requests/2387/notes/74875",
body: { body: "Updated comment text" }
})Example usage in Claude Code
> Review MR !2397 in octopus/reunion/client
Claude will use gitlab_get_merge_request, gitlab_get_mr_changes,
and gitlab_create_mr_discussion to review and leave inline comments.Development
# Edit index.ts, then rebuild
npm run build
# Reconnect in Claude Code
/mcpThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/EllGree/gitlab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server