GitHub MCP
Refined MCP server for GitHub GraphQL API. GitHub's official MCP Server exposes dozens of low-level tools that bloat token usage and are mostly impractical for LLMs. gh-mcp achieves the best of both worlds by providing a single, powerful interface: G
What is GitHub MCP?
GitHub MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to refined mcp server for github graphql api. github's official mcp server exposes dozens of low-level tools that bloat token usage and are mostly impractical for llms. gh-mcp achieves the best of both w...
Refined MCP server for GitHub GraphQL API. GitHub's official MCP Server exposes dozens of low-level tools that bloat token usage and are mostly impractical for LLMs. gh-mcp achieves the best of both worlds by providing a single, powerful interface: G
This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Refined MCP server for GitHub GraphQL API. GitHub's official
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx ghConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use GitHub MCP
gh-mcp is a refined GitHub MCP server that provides a single, powerful interface to GitHub's GraphQL API and code search instead of exposing dozens of low-level REST endpoints. Rather than bloating the context window with numerous granular tools, it gives AI assistants direct access to GitHub's full GraphQL query power plus cross-repository code search — enabling complex queries about pull requests, issues, repositories, and code in a token-efficient way. It is distributed as a Go binary that integrates with the 'gh' GitHub CLI, using your existing authentication without requiring separate API tokens.
Prerequisites
- GitHub CLI ('gh') installed and authenticated via 'gh auth login'
- uvx (from uv) or Python with pipx available for running the server
- Go runtime is not required — the server ships as a pre-built binary via uvx
- An MCP-compatible client such as Claude Desktop
Install and authenticate the GitHub CLI
Install the 'gh' CLI tool and authenticate with your GitHub account. The MCP server relies on gh's stored credentials.
brew install gh
gh auth loginVerify GitHub CLI authentication
Confirm that the gh CLI is properly authenticated before configuring the MCP server.
gh auth statusTest the server directly
Run the server once with uvx to confirm it starts correctly and can reach the GitHub API.
uvx gh-mcpConfigure your MCP client
Add the server to your MCP client configuration file pointing to the uvx command.
Restart Claude Desktop and verify
Restart your MCP client and ask it to query a GitHub repository to confirm the connection is working.
GitHub MCP Examples
Client configuration
Add this to your claude_desktop_config.json to register gh-mcp. The server uses your existing 'gh' CLI authentication — no separate token needed.
{
"mcpServers": {
"gh": {
"command": "uvx",
"args": ["gh-mcp"]
}
}
}Prompts to try
Use these prompts to query GitHub repositories, pull requests, issues, and code through Claude.
- "Query GitHub GraphQL to list the last 10 open pull requests in the owner/repo repository"
- "Search GitHub for TypeScript files that use the MCP SDK"
- "Use GitHub GraphQL to get the status checks on PR #42 in owner/repo"
- "Find all open issues labeled 'bug' in the microsoft/vscode repository"
- "Search GitHub code for 'useEffect' in files named 'App.tsx'"Troubleshooting GitHub MCP
Server fails with 'gh: command not found' or authentication error
Ensure the GitHub CLI is installed and 'gh auth status' returns a valid authenticated session. The MCP server delegates authentication entirely to the gh CLI, so it must be set up first.
uvx gh-mcp fails to resolve or download the package
Confirm uv is installed ('pip install uv' or via the uv installer). Run 'uvx gh-mcp --help' in a terminal first to verify the package downloads correctly before adding it to your MCP config.
GraphQL queries return permission errors
Re-authenticate the gh CLI with the required scopes: 'gh auth login' and select the 'repo' and 'read:org' scopes. Private repository access requires the 'repo' scope to be granted during authentication.
Frequently Asked Questions about GitHub MCP
What is GitHub MCP?
GitHub MCP is a Model Context Protocol (MCP) server that refined mcp server for github graphql api. github's official mcp server exposes dozens of low-level tools that bloat token usage and are mostly impractical for llms. gh-mcp achieves the best of both worlds by providing a single, powerful interface: g It connects AI assistants to external tools and data sources through a standardized interface.
How do I install GitHub MCP?
Follow the installation instructions on the GitHub MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with GitHub MCP?
GitHub MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is GitHub MCP free to use?
Yes, GitHub MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
GitHub MCP Alternatives — Similar Version Control Servers
Looking for alternatives to GitHub MCP? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitMCP
★ 8.1kTransforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
Browse More Version Control MCP Servers
Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up GitHub MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use GitHub MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.