Skip to content
AgentQuadrant

Last verified

G

GitHub MCP Server

Editor's Pick

Interact with GitHub repos, issues, PRs, and code search directly from Claude

Developer Tools

Install

docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server

Tools exposed

  • get_file_contents
  • search_repositories
  • create_issue
  • create_pull_request
  • list_commits
  • search_code
  • create_or_update_file
  • fork_repository

Requires env vars

  • GITHUB_PERSONAL_ACCESS_TOKEN
"Authoring a PR description from a diff is one command away once GitHub MCP is wired up."

GitHub MCP Server

The GitHub MCP Server is an official MCP integration maintained by GitHub that exposes GitHub’s API surface — repositories, issues, pull requests, commits, code search — as callable tools to any MCP-compatible AI client. It is the standard way to give Claude direct read/write access to GitHub resources.

How does it work?

The server runs over stdio transport, typically via Docker or npx. It reads a GITHUB_PERSONAL_ACCESS_TOKEN from the environment and uses it to authenticate every GitHub API call. Claude can then invoke tools like create_issue or search_code during a conversation, with results returned as structured JSON.

For developer tools workflows, GitHub MCP works best alongside a local file server. The Filesystem MCP server handles local edits while GitHub MCP handles the remote repository state — creating the branch, opening the PR, and linking the issue.

When to use it

Use the GitHub MCP server when you want Claude to act on a repository directly: triaging issues, reviewing diffs, searching for usages across a codebase, or automating release notes. It cuts the round-trip of copying GitHub URLs into chat and waiting for Claude to describe what it finds.

Frequently asked questions

What GitHub token scopes does the GitHub MCP server need?

For read-only access you need the `repo:read` scope. To create issues and pull requests you need `repo`. For org-level operations add `read:org`. Scope your personal access token to the minimum needed for your workflow to limit exposure.

Does the GitHub MCP server support GitHub Enterprise?

Yes. Set the `GITHUB_HOST` environment variable to your enterprise hostname (e.g., `github.company.com`) and the server will route all API calls there instead of github.com, with the same tool interface.

Can I use the GitHub MCP server with the npm runner instead of Docker?

Yes. GitHub also ships an npm-based runner. Run `npx @modelcontextprotocol/server-github` with the token in your environment. Docker is recommended for production because it pins the image digest and avoids accidental updates.

Recently verified