github
MCP server from infracloudio/github-mcp-server
claude mcp add --transport stdio infracloudio-github-mcp-server docker run -i infracloud/github-mcp-server \ --env GITHUB_TOKEN="your_github_token"
How to use
The GitHub MCP Server provides a collection of secure, stateless tools for interacting with GitHub data. It exposes facilities to list pull requests and issues, search issues by keyword, retrieve pending PR reviews, create new issues, and analyze issue priority. These tools are designed to be integrated with LLM agents and automation workflows, enabling you to automate repository maintenance, triage, and collaboration tasks with consistent, permission-checked access to your GitHub data. To start using the server, ensure you have a valid GitHub token and run the server in your preferred environment (e.g., via Docker).
Once running, you can invoke the available tools by referencing their names (list_prs, list_issues, search_issues, get_pending_reviews, create_issue, analyze_issue_priority) in your MCP client or agent. Each tool requires authentication and enforces permission checks to protect your repository data. The server is designed to be easily integrated into automation pipelines, chat-based assistants, or agent-based workflows that need structured access to GitHub information and actions.
How to install
Prerequisites:
- Docker installed and running (or adapt to your deployment method)
- A valid GitHub token with the necessary scopes (stored securely as GITHUB_TOKEN)
- Optional: Docker image infracloud/github-mcp-server if using the provided container
Option A: Run with Docker (recommended)
-
Pull and run the server image, providing your GitHub token: docker run -i -e GITHUB_TOKEN=your_github_token infracloud/github-mcp-server
-
Verify the server is responding (the MCP protocol handshake should succeed as part of your client integration).
Option B: Build and run from source (Go)
- Install Go 1.20+ and ensure your environment is configured.
- Clone the repository: git clone https://github.com/himanshusharma89/github-mcp-server.git
- Build the binary: cd github-mcp-server go build -o bin/github-mcp-server main.go
- Run the server with the required environment variable: export GITHUB_TOKEN=your_github_token ./bin/github-mcp-server
Note: If you choose to run via Docker, replace the image name with the appropriate image tag if needed and ensure GITHUB_TOKEN is supplied to the container.
Additional notes
Environment variable suggestions:
- GITHUB_TOKEN: Personal access token for authenticating to GitHub.
- Optional: GITHUB_TOKEN_EXPIRY or token scopes customization depending on your security requirements.
Common issues:
- Invalid or missing GITHUB_TOKEN leading to authentication failures.
- Insufficient GitHub token scopes for certain operations (e.g., repo scope for managing issues/PRs).
- Network/firewall restrictions preventing Docker from pulling images or contacting GitHub.
Security tips:
- Do not hard-code tokens in code or configuration files; use environment variables or secret management.
- Rotate tokens regularly and revoke unused tokens.
- Ensure MCP server instances run with least privilege necessary for their tasks.
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