MCP server, by GitHub
GitHub MCP Server
Official GitHub MCP server that connects AI tools to repositories, issues, pull requests, Actions, and code analysis on GitHub.
Quick facts
What it does
The GitHub MCP Server connects AI tools to the GitHub platform. Agents, assistants, and chatbots can read repositories and code files, manage issues and pull requests, analyze code, and automate workflows through natural-language interactions.
The README groups use cases into repository management, issue and PR automation, CI/CD and workflow intelligence, code analysis including security findings and Dependabot alerts, and team collaboration. Two deployment forms are documented: a remote server hosted by GitHub at https://api.githubcopilot.com/mcp/ and a local server, including a Docker image at ghcr.io/github/github-mcp-server, with OAuth or Personal Access Token authentication.
Configuration
Remote: configure type http with url https://api.githubcopilot.com/mcp/ and authenticate with OAuth or a GitHub PAT header. Local: run the Docker image ghcr.io/github/github-mcp-server, or build from source, with GITHUB_PERSONAL_ACCESS_TOKEN. GitHub Enterprise Server does not support remote hosting. Use the local server with GITHUB_HOST.
{"servers":{"github":{"type":"http","url":"https://api.githubcopilot.com/mcp/"}}}Source: https://github.com/github/github-mcp-server. Placeholders only. Replace them in your own environment, and never commit real keys to a repository.
| Environment variable | Required | Purpose |
|---|---|---|
GITHUB_PERSONAL_ACCESS_TOKEN | Optional | GitHub Personal Access Token for local server authentication. Takes precedence over OAuth when set. OAuth is the default on github.com for the local Docker flow. |
GITHUB_HOST | Optional | Hostname for GitHub Enterprise Server, or GitHub Enterprise Cloud with data residency (ghe.com). Used with the --gh-host flag. |
Tools and features on record
Repository Management Config checked
Browse and query code, search files, analyze commits, and map project structure in any repository the credential can access.
Issue and PR Automation Config checked
Create, update, and manage issues and pull requests, with AI assistance for triage, code review, and project boards.
CI/CD and Workflow Intelligence Config checked
Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and inspect the delivery pipeline.
Code Analysis Config checked
Examine security findings, review Dependabot alerts, and analyze code patterns across the codebase.
Harness notes: scope the server before the model runs
From the Harness pillar: what the vendor documentation says about running this server inside an agent harness.
- The --read-only flag (or GITHUB_READ_ONLY=1) restricts the server to read tools, and read-only wins over --tools selections. A wrapper cannot widen what the flag closed. Permission gating sits in the server, not the prompt.
- Tool selection is validated at startup. An invalid tool name fails the launch, so configuration errors surface before the first model call.
- Pagination varies by tool: some take page/perPage (default 30, max 100), others take a cursor. Budget result volume per tool rather than assuming one scheme.
Source: GitHub MCP server README (configuration, pagination), checked 2026-10-08.
Security notes
- Follow the README token practices: grant minimum scopes, use separate tokens per project or environment, rotate regularly, never commit tokens, and restrict config file permissions.
- The remote server supports OAuth or PAT authentication, varying by MCP host. Each host needs a GitHub App or OAuth App to support remote OAuth.
- GitHub Enterprise Server requires HTTPS for GITHUB_HOST so credentials are never sent over cleartext, except loopback localhost for local development.
An MCP server runs with the permissions of the process you start it from. Scope credentials to the narrowest access the job needs, and review what the client will send before connecting anything sensitive.
Sources and freshness
- Official source: https://github.com/github/github-mcp-server
- Repository: https://github.com/github/github-mcp-server
Checked 2026-10-29. Config-checked means the configuration and feature list trace to the official source above; it does not mean AgentsUse ran the server. Send corrections through the contact page. Back to the MCP server index.