This repository provides a production-ready Model Context Protocol (MCP) server for GitHub, maintained by InfraCloud and authored by Himanshu Sharma.
This MCP server exposes a set of secure, stateless tools for listing, searching, and creating GitHub issues and pull requests, and more. It is designed for easy integration with LLM agents and automation frameworks.
For a detailed walkthrough and best practices, see my blog post: Build your own MCP server (by Himanshu Sharma)
- Go 1.20+
- GitHub OAuth App credentials (for authentication)
- mcp-go library
- A valid GitHub token in your environment
git clone https://github.com/himanshusharma89/github-mcp-server.git
cd github-mcp-server
go build -o bin/github-mcp-server main.go
Set your environment variables:
export GITHUB_TOKEN=your_github_token
Start the server:
./bin/github-mcp-server
Tool Name | Description |
---|---|
list_prs |
List pull requests in a repository |
list_issues |
List issues in a repository |
search_issues |
Search issues by keyword/topic |
get_pending_reviews |
Get pull requests pending review |
create_issue |
Create a new GitHub issue |
analyze_issue_priority |
Analyze and rank issues by priority |
All tools require authentication and are protected by permission checks.
This repository is the official InfraCloud implementation for a GitHub MCP server, maintained by Himanshu Sharma. For a deep dive into the architecture, security, and best practices, read the full blog post:
The blog covers:
- How the MCP server is structured
- Tool registration and handler patterns
- Security and permissioning
- Real-world usage and integration tips
For questions, suggestions, or contributions, please open an issue or PR!