github
https://github.com/github/github-mcp-server
claude mcp add --transport stdio masx200-github-mcp-server docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server \
--env GITHUB_PERSONAL_ACCESS_TOKEN="${input:github_token}"How to use
This MCP server connects AI tools directly to GitHub, enabling natural language driven queries and actions against your GitHub repositories. It enables AI agents, assistants, and chatbots to read repository contents, explore code, manage issues and pull requests, analyze code, and automate CI/CD workflows. Typical use cases include repository management (browsing code, searching files, analyzing commits), automating issues and PRs (creating, updating, labeling, or assigning items), monitoring GitHub Actions workflows and build statuses, performing security and dependency analysis, and assisting team collaboration by tracking discussions and activities. You can interact with the server using natural language prompts, and the underlying tools translate those prompts into GitHub API operations.
How to install
Prerequisites:
- Docker installed and running on your machine or host environment.
- A GitHub Personal Access Token (PAT) with appropriate scopes for your use case (repo, read:packages, etc.).
Step-by-step:
- Ensure Docker is installed and running:
- Windows/macOS: install Docker Desktop.
- Linux: install docker and ensure the daemon is active.
- Create a GitHub PAT with the required permissions for your usage and copy it to your environment as GITHUB_PAT (recommended) or provide it directly when prompted by MCP tooling.
- Run the MCP server locally via Docker using the following command (replace the placeholder with your PAT or use environment injection as shown):
# Example using an environment variable
export GITHUB_PAT=your_token_here
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT \
ghcr.io/github/github-mcp-server
-
If your MCP host supports remote servers, you can configure a remote GitHub MCP server via the provided host configuration in your IDE or Copilot setup, pointing to the remote URL as described in the README. For local usage with VS Code, ensure your environment variables are exposed to the MCP configuration as needed.
-
When prompted by your MCP host, provide the GitHub PAT securely (or reference a saved environment variable) to authorize API access.
Additional notes
Tips and considerations:
- Security: store PATs securely (environment variables or secret managers) and avoid committing tokens. Follow token least-privilege practices (e.g., only grant necessary scopes).
- If using Docker locally, ensure the host can access ghcr.io/github/github-mcp-server. If you encounter token or authentication errors, refresh tokens or logout/login as recommended by GitHub/COPilot tooling.
- For remote MCP hosts, you may pass the token via env as GITHUB_PERSONAL_ACCESS_TOKEN or through host-specific secret handling. Check your host's documentation for exact token handling.
- The server supports typical GitHub operations through natural language prompts, including file browsing, issue/PR management, workflow monitoring, and code analysis. Consider combining multiple steps into a single multi-turn prompt to leverage AI orchestration.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go