When to pick GitHub MCP Server
- Your code review starts with GitHub issues and pull requests. Use
get_pull_requestto inspect a change andcreate_pull_request_reviewto submit a review, alongside repository search and file access. - You investigate GitHub Actions failures alongside security findings. The server exposes Actions tools, job logs, code scanning alerts and Dependabot toolsets, so you can select the capabilities your investigation needs.
- Your MCP client needs a local process, or your repositories live on GitHub Enterprise Server. Run the server locally over stdio; use
GITHUB_HOSTor--gh-hostto target your enterprise installation. - You want an assistant limited to inspection. GitHub's
--read-onlyoption skips write tools even when you explicitly request them, while--toolsetsand--toolslet you narrow the exposed capabilities.
When to pick GitLab MCP Server
- Your team reviews changes through GitLab merge requests. Use
create_merge_request,get_merge_request_diffsandget_merge_request_pipelinesto work with the proposed change and its pipeline results. - You need to trace a failed GitLab pipeline into a job log.
get_job_logcomplements merge request pipeline access and repository file retrieval during an investigation. - You want keyword and semantic code search in your GitLab workflow. The server lists
searchandsemantic_code_search; wiki access is also available when you enable the opt-inwikistoolset. - You use GitLab.com, Self-Managed or Dedicated and want to connect directly to the existing instance. Its HTTP endpoint avoids a separate local server installation, provided MCP access is enabled for your group or instance.
Main differences
- Hosting and transport differ. GitHub offers a local stdio server and a GitHub-hosted HTTP endpoint. GitLab serves MCP from the GitLab instance over HTTP; stdio clients can connect through
mcp-remote, which requires Node.js. - Authentication has different requirements. GitHub supports personal access tokens and OAuth, including local OAuth on github.com. Remote OAuth depends on the host application's integration. GitLab supports OAuth dynamic registration or a pre-registered application, plus fine-grained personal access tokens with MCP tool execution permission. Legacy GitLab personal access tokens are rejected.
- Tool selection uses different controls. GitHub exposes
--toolsets,--toolsand a read-only mode. GitLab usesX-Gitlab-Enabled-Mcp-Server-ToolsetsandX-Gitlab-Enabled-Mcp-Server-Toolsheaders. Selecting a GitLab tool does not override project permissions or feature requirements. - Investigation follows each platform's services. GitHub tools cover pull request reviews, Actions and Dependabot findings. GitLab tools cover merge request diffs, pipelines, job logs, semantic code search and wiki pages. Choose around where your team's records and automation already live.
- Enterprise deployment changes the connection path. GitHub Enterprise Server requires the local server because remote hosting is unsupported. GitLab Self-Managed exposes
/api/v4/mcpon the instance itself, with MCP access controlled at instance level.
Setup
For GitHub, start Docker and set GITHUB_PAT to your personal access token. The documented Claude Code command is claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server. Grant the token only the permissions your selected operations need.
For GitLab.com, run claude mcp add --transport http gitlab https://gitlab.com/api/v4/mcp, then open Claude Code and use /mcp to authorize through your browser. Replace the hostname for a self-managed instance. Add -s user if you want the configuration available across projects; without it, Claude Code adds the server at local scope.
· github.com/github/github-mcp-server, docs.gitlab.com/user/model_context_protocol/mcp_server
