GitHub MCP

v1.0.0Version Controlstable

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

ai-toolsauthenticationclaudecli-tooldeveloper-tools
Share:
31
Stars
0
Downloads
0
Weekly
0/5

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

Query GitHub repositories
Manage pull requests
Access repository data
promplate

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gh

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 login
2

Verify GitHub CLI authentication

Confirm that the gh CLI is properly authenticated before configuring the MCP server.

gh auth status
3

Test the server directly

Run the server once with uvx to confirm it starts correctly and can reach the GitHub API.

uvx gh-mcp
4

Configure your MCP client

Add the server to your MCP client configuration file pointing to the uvx command.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "gh": { "command": "npx", "args": ["-y", "gh"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides