GitHub, GitLab & PR Code Review MCP Servers: Claude Code & Cursor Setup Guide
Exact, vendor-verified commands and config files to connect GitHub, GitLab, Graphite, Greptile, Linear and Sentry MCP servers to Claude Code and Cursor for pull request review.
Every command here comes from the vendor's own documentation and was cross-checked on 25 Oct 2026. Claude Code uses claude mcp add; Cursor uses a .cursor/mcp.json file. Start with GitHub's official remote server on a read-only toolset URL, add GitLab's built-in server if you use GitLab, then add Graphite, Greptile, Linear or Sentry as needed. Ignore older guides that use the deprecated @modelcontextprotocol/server-github package.
Verified Capabilities Benchmarked in This Guide
Inspect Live JSON Feed ↗GitHub Official MCP — Repositories, Pull Requests, Actions & Code Search
Official GitHub MCP server for searching repositories, inspecting PR diffs and review comments, triaging issues, and reading GitHub Actions workflow runs.
GitLab Merge Requests, CI Pipelines & Issue Tracker MCP Server
Connect AI coding agents to GitLab self-hosted or cloud instances: inspect Merge Request diffs, debug failed GitLab CI jobs, and update issues.
Graphite MCP
Create, restack, submit, and merge stacked Git pull requests alongside Diamond AI code reviews via Graphite MCP.
Greptile MCP
Query full-repository semantic graphs, review pull requests with full codebase context, and trace cross-repo dependencies via MCP.
Linear Official Remote MCP — Issues, Cycles, Triage & Roadmaps
Official Linear Streamable HTTP MCP server: search and create engineering issues, update sprint cycle states, link GitHub PRs, and synthesize project statu
Sentry Official MCP — Stack-Trace Root-Cause & Seer Issue Triage
Official Sentry MCP server: inspect production exceptions, resolve source-mapped stack traces, query release regression metrics, and invoke Seer root-cause
GitHub Actions Matrix Caching, OIDC & Fast CI Pipeline Skill
Cut GitHub Actions CI runtimes by 60%: configure pnpm/Cargo/Docker layer caching, concurrency cancel-in-progress groups, and keyless OIDC cloud deployments
1. Claude Code: GitHub (official)
Use a fine-grained PAT stored in an environment variable. The first form uses the read-only pull request toolset; the second gives the full default toolsets.
2. Claude Code: GitLab (built-in server)
Replace the host with your GitLab instance (gitlab.com or self-managed). HTTP transport was introduced in GitLab 18.6, and an administrator must enable MCP for your top-level group or instance. Claude Code will run the OAuth flow; the token needs the mcp scope.
3. Claude Code: Graphite, Greptile, Linear and Sentry
Graphite runs locally through its CLI (gt 1.6.7 or newer; the MCP server is in beta). The others are remote servers with OAuth.
4. Cursor: .cursor/mcp.json
Put this file in your project root (or ~/.cursor/mcp.json for all projects). Cursor reads the env var reference from your shell; never commit a literal token.
5. Verify the connection
Before you ask for a review, confirm each server is connected and exposing the tools you expect.
- Claude Code: run /mcp inside a session to see connection status and authenticate OAuth servers.
- Cursor: open Settings, then the MCP section, and check each server shows its tools.
- Ask the agent: "List the GitHub MCP tools you have." With the read-only URL you should see read tools such as pull_request_read but no merge or write tools.
- Try one real call: "Use pull_request_read with method get_files on owner/repo PR 123."
6. Your first review prompt
Pair the connection with a repeatable procedure. The SKILL.md playbook in this series gives a full review skill; this prompt is the short version. When the PR has failing checks, hand off to the GitHub Actions CI skill.
Frequently Asked Questions
How do I add the GitHub MCP server to Claude Code?
Run claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $GITHUB_PAT". For read-only pull request tools, use https://api.githubcopilot.com/mcp/x/pull_requests/readonly as the URL.
How do I add the GitHub MCP server to Cursor?
Add a github entry to .cursor/mcp.json with url https://api.githubcopilot.com/mcp/ (or a toolset URL) and an Authorization header set to Bearer followed by your PAT, referenced from an environment variable.
Does GitLab's MCP server work with Claude Code?
Yes. Use claude mcp add -s user --transport http GitLab https://<your-gitlab>/api/v4/mcp. It requires GitLab 18.6 or later for HTTP transport and MCP enabled for your group or instance.
Why does my old GitHub MCP config stop working?
Older guides use the @modelcontextprotocol/server-github npm package, which is deprecated. Switch to GitHub's official server (remote URL or the ghcr.io/github/github-mcp-server image).