GitHub MCP Server
OFFICIAL SERVERLets an assistant read code and manage repositories, issues, pull requests and Actions on GitHub.
Works GitLab merge requests, issues, pipelines and repositories from an MCP client
By zereight (individual) TypeScript Local · stdio Git and code hostingDevOps and monitoring
91 popularity score ★ 2.1k ↓ 208k/wk
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GITLAB_PERSONAL_ACCESS_TOKEN. Replace each <NAME> with your value.
claude mcp add gitlab -e GITLAB_PERSONAL_ACCESS_TOKEN=<GITLAB_PERSONAL_ACCESS_TOKEN> -- npx -y @zereight/mcp-gitlab@latest{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab@latest"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab@latest"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}{
"servers": {
"gitlab": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab@latest"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}[mcp_servers.gitlab]
command = "npx"
args = ["-y", "@zereight/mcp-gitlab@latest"]
[mcp_servers.gitlab.env]
GITLAB_PERSONAL_ACCESS_TOKEN = "<GITLAB_PERSONAL_ACCESS_TOKEN>"gemini mcp add --scope user -e GITLAB_PERSONAL_ACCESS_TOKEN=<GITLAB_PERSONAL_ACCESS_TOKEN> gitlab npx -- -y @zereight/mcp-gitlab@latestOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GITLAB_PERSONAL_ACCESS_TOKEN. Replace each <NAME> with your value.
claude mcp add gitlab -e GITLAB_PERSONAL_ACCESS_TOKEN=<GITLAB_PERSONAL_ACCESS_TOKEN> -- docker run -i --rm -e GITLAB_PERSONAL_ACCESS_TOKEN zereight050/gitlab-mcp{
"mcpServers": {
"gitlab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITLAB_PERSONAL_ACCESS_TOKEN",
"zereight050/gitlab-mcp"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}{
"mcpServers": {
"gitlab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITLAB_PERSONAL_ACCESS_TOKEN",
"zereight050/gitlab-mcp"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}{
"servers": {
"gitlab": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITLAB_PERSONAL_ACCESS_TOKEN",
"zereight050/gitlab-mcp"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}[mcp_servers.gitlab]
command = "docker"
args = ["run", "-i", "--rm", "-e", "GITLAB_PERSONAL_ACCESS_TOKEN", "zereight050/gitlab-mcp"]
[mcp_servers.gitlab.env]
GITLAB_PERSONAL_ACCESS_TOKEN = "<GITLAB_PERSONAL_ACCESS_TOKEN>"gemini mcp add --scope user -e GITLAB_PERSONAL_ACCESS_TOKEN=<GITLAB_PERSONAL_ACCESS_TOKEN> gitlab docker -- run -i --rm -e GITLAB_PERSONAL_ACCESS_TOKEN zereight050/gitlab-mcp| Set together: auth | |
|---|---|
GITLAB_PERSONAL_ACCESS_TOKEN secret |
Required: GitLab personal access token. Alternatives: GITLAB_PERSONAL_ACCESS_TOKEN_FILE, GITLAB_USE_OAUTH, GITLAB_JOB_TOKEN, GITLAB_AUTH_COOKIE_PATH, REMOTE_AUTHORIZATION or GITLAB_MCP_OAUTH. |
GITLAB_PERSONAL_ACCESS_TOKEN_FILE |
Optional: Path to a file holding the token, instead of the token itself. |
GITLAB_USE_OAUTH |
Optional: Sign in through a browser OAuth flow instead of a token; needs GITLAB_OAUTH_CLIENT_ID. |
GITLAB_API_URL |
Optional: Address of the GitLab instance; required when GITLAB_MCP_OAUTH is on. |
GITLAB_PERMISSION_MODE |
Optional: full, modify (no deletes or teardown) or readonly; an invalid value stops it at start. |
GITLAB_TOOLSETS |
Optional: Comma-separated toolsets to expose, or all; replaces the core set. |
GITLAB_TOOLS |
Optional: Extra single tools to expose on top of the chosen toolsets. |
GITLAB_DENIED_TOOLS_REGEX |
Optional: Regular expression of tool names to hide. |
GITLAB_ALLOWED_PROJECT_IDS |
Optional: Comma-separated project IDs the tools may touch. |
STREAMABLE_HTTP |
Optional: Serve Streamable HTTP on PORT instead of stdio. |
GITLAB_MCP_COMPACT_RESULTS |
Optional: Shorten large tool results to save context. |
GITLAB_MCP_LIST_SUMMARY_DEFAULT |
Optional: When true, list tools and mr_discussions return summaries unless a call sets summary to false. |
In a container, a setting goes in with -e NAME=value after docker run.
GitLab MCP Server, published by zereight as the npm package @zereight/mcp-gitlab, gives an assistant working access to a GitLab account on GitLab.com or on a self-managed instance. Through the GitLab REST and GraphQL APIs it can browse and edit repository files, branches and commits, open, review, comment on and merge merge requests, file and update issues and work items, and start, retry, cancel and read CI/CD pipelines and job logs. Further toolsets reach wikis, milestones, iterations and their cadences, releases, tags, snippets, deployments and environments, CI/CD variables, webhooks, vulnerability findings and code search.
Its tool registry holds 288 tools. Out of the box it exposes 40 of them: the core set of 38, plus discover_tools and a help tool that returns short GitLab workflow guides. That keeps the tool list short. The assistant can switch on another category mid-session through discover_tools, or the operator picks sets up front with GITLAB_TOOLSETS or single tools with GITLAB_TOOLS. A raw REST passthrough, gitlab_api_request, exists but loads only when its toolset is named explicitly. The server also offers three prompts (merge request review, pipeline failure triage, vulnerability triage) and three short help documents as resources.
By default it talks over stdio. With STREAMABLE_HTTP=true (or the older SSE=true) it serves HTTP instead, which is the route for remote, shared deployments and for Claude.ai through its built-in MCP OAuth proxy (GITLAB_MCP_OAUTH). GITLAB_PERMISSION_MODE can hold it to read-only calls or to edits without deletes. Long list results can be trimmed: with GITLAB_MCP_LIST_SUMMARY_DEFAULT=true the list tools and mr_discussions return summaries unless a call asks for full output. The same package doubles as a command-line GitLab client with auth, doctor and setup commands.
| Runtime | Node.js 20+Docker |
|---|---|
| Runs on | macOS, Windows, Linux |
| GitLab | FreeGitLab.com or a self-managed instance; the token's own scopes and the user's roles bound what it can do |
Node 20 or later runs the npx command. Docker runs the image instead. Make a GitLab personal access token (User settings > Access tokens), with the read_api scope for reading only or api for changes, and pass it as GITLAB_PERSONAL_ACCESS_TOKEN. For a self-managed instance also set GITLAB_API_URL. Without a token or one of the other sign-in settings it stops at start.
Suits developers who want an assistant to do day-to-day GitLab work, from reviewing and merging merge requests to filing issues and chasing failed pipelines, on GitLab.com or on a self-managed instance, using a personal token they already control. Because it can also run over HTTP with each caller's own token or OAuth, it suits teams that host one shared endpoint. Those who only want an assistant to look should set GITLAB_PERMISSION_MODE=readonly and a read_api token. It is not GitLab's own product; where an organisation prefers a vendor-run endpoint with no extra process, the README points to GitLab's built-in MCP server at /api/v4/mcp on recent GitLab versions.
33 only read, 23 change things, 4 can delete or overwrite.
discover_toolshealth_checkwhoamilist_projectsget_projectsearch_repositorieslist_project_membersget_file_contentsget_repository_treecreate_or_update_file changespush_files changesget_file_blamelist_branchescreate_branch changesdelete_branch deleteslist_commitsget_commitget_commit_difflist_merge_requestsget_merge_requestget_merge_request_approval_statelist_merge_request_changed_filesget_merge_request_file_difflist_merge_request_diffsmr_discussionscreate_merge_request changesupdate_merge_request changesmerge_merge_request changesrebase_merge_request changescreate_merge_request_thread changesresolve_merge_request_thread changescreate_draft_note changesbulk_publish_draft_notes changeslist_issuesmy_issuesget_issuecreate_issue changesupdate_issue changesdelete_issue deletescreate_issue_note changesupdate_issue_description_patch changesreorder_issue changeslist_labelslist_pipelinesget_pipelinecreate_pipeline changesretry_pipeline changescancel_pipeline changesget_pipeline_job_outputwait_for_pipelinelist_deploymentslist_environmentscreate_project_variable changesdelete_project_variable deletescreate_webhook changeslist_project_vulnerabilitiessearch_codedownload_attachment changesexecute_graphql changesgitlab_api_request deletesgitlab-mcp://docs/auth-setupgitlab-mcp://docs/toolsetsgitlab-mcp://docs/permission-modesreview_merge_requesttriage_pipeline_failuretriage_vulnerabilities