GitHub and GitLab both ship official MCP servers that let AI assistants work with repositories, issues, merge or pull requests and CI. If your code lives on one platform, the choice is made for you, but how each server works is worth knowing.
GitHub's server is open source, written in Go, in the github/github-mcp-server repository. It replaced the old npm reference server. GitHub hosts a remote version at api.githubcopilot.com/mcp with OAuth for clients that support it, or you run the binary or Docker image with a personal access token, which is the only option for GitHub Enterprise Server. Tools are grouped into toolsets such as repos, issues, pull_requests, actions and code_security, and you enable only what you need. A read-only flag removes all write tools, and lockdown mode hides content from users without push access to reduce prompt injection.
GitLab's server is built into GitLab itself at /api/v4/mcp, on GitLab.com, Self-Managed and Dedicated, and is generally available on all tiers including Free. Clients connect over HTTP, or over stdio through mcp-remote, and authenticate with OAuth dynamic client registration or a fine-grained token. Toolsets cover core project work, merge requests, work items, repository, CI, wikis and security, plus GitLab Duo Agent Platform sessions. GitLab.com applies per-user rate limits.
Both are capable. The differences are mostly in deployment and safety controls.
How they compare
| Aspect | GitHub MCP Server | GitLab MCP Server |
|---|---|---|
| Where it runs | Hosted endpoint or a local binary or Docker image. | Built into GitLab at /api/v4/mcp. |
| Self-hosted platform | Enterprise Server needs the local server. | Works on Self-Managed and Dedicated instances. |
| Authentication | OAuth on the hosted endpoint, or a personal access token. | OAuth dynamic client registration, or a fine-grained token. |
| Tool groups | repos, issues, pull_requests, actions, code_security and more. | core, merge_requests, work_items, repository, ci, wikis, code_security. |
| Write protection | Read-only flag removes all write tools. | Choose toolsets per client with a header. |
| Prompt injection | Lockdown mode hides untrusted users' content. | Docs warn to use tools only on trusted objects. |
| Extras | Dependabot, discussions and notifications toolsets. | GitLab Duo agent sessions; some security tools need Ultimate. |
| Limits | Token scope is the real permission boundary. | GitLab.com rate limits; files returned up to 32 KiB. |
Choose GitHub MCP Server if…
- Your code is on github.com or GitHub Enterprise
- You want a read-only mode for exploring code
- You work with public repositories and want lockdown mode
- You want to run the server yourself
Choose GitLab MCP Server if…
- Your code is on GitLab, including self-managed instances
- You want nothing extra to install on the server side
- You use GitLab Duo agents and want to start them from your assistant
- You manage work items and pipelines in GitLab
Researched November 2026 from each product's official documentation and pricing pages. Prices and features change often, so check the vendors' sites before you decide.
Sources
- github.com /github/github-mcp-server
- github.com /github/github-mcp-server/blob/main/docs/server-configuration.md
- docs.gitlab.com /user/model_context_protocol/mcp_server
- docs.gitlab.com /user/model_context_protocol/mcp_server_tools