# GitLab MCP Server

> Agent-workflow-optimized GitLab MCP. Default list: 39 tools (38 `core` + `discover_tools`). 277 tools exist in total. Activate more at runtime with `discover_tools`.

Package: `@zereight/mcp-gitlab` · Binary: `zereight-mcp-gitlab` · License: MIT
Docs: https://zereight.github.io/gitlab-mcp/ · Full text: ./llms-full.txt

## Install

- Local IDE (stdio + PAT): Claude Code / Codex one-liners in the README; Cursor deeplink in the README
- Shared HTTP: Streamable HTTP at `https://mcp.example.com/mcp`
- Claude.ai: public HTTPS + `GITLAB_MCP_OAUTH`
- Equal non-MCP path: `npx skills add zereight/gitlab-mcp --skill gitlab-mcp-skill` + `zereight-mcp-gitlab` CLI

## Docs

- [Getting Started](getting-started/index.md): auth and transport
- [CLI without MCP](getting-started/cli-without-mcp.md): Skill + CLI
- [Claude Code](clients/claude-code.md)
- [Cursor](clients/cursor.md)
- [VS Code](clients/vscode.md)
- [Codex](clients/codex.md)
- [JSON clients](clients/json-clients.md)
- [OAuth2](auth/oauth-setup.md)
- [Environment variables](configuration/environment-variables.md)
- [Tools](tools/index.md): generated reference
- [Skill](https://github.com/zereight/gitlab-mcp/blob/main/skills/gitlab-mcp/SKILL.md)

## Agent rules

- `project_id` is a numeric ID or URL-encoded path (`group%2Fproject`). MR `!123` → `merge_request_iid=123`.
- MR review: `list_merge_request_changed_files` then batched `get_merge_request_file_diff`. Do not dump full `get_merge_request_diffs`.
- Shrink results with `jmespath` or `GITLAB_MCP_COMPACT_RESULTS`. Paginate job logs. Use the CLI for full payloads.
- Do not enable the `api` toolset unless you accept that `gitlab_api_request` bypasses allowlists and tool filters.
