gh
A GitHub CLI extension that seamlessly runs the github-mcp-server using your existing gh authentication. Eliminates manual PAT setup by automatically retrieving GitHub credentials and launching the MCP server with proper authentication.
claude mcp add --transport stdio shuymn-gh-mcp gh mcp
How to use
gh-mcp is a GitHub CLI extension that bundles and runs the github-mcp-server using your existing gh authentication. It eliminates the need to manually generate or manage GitHub Personal Access Tokens for MCP by retrieving your credentials from gh and launching a bundled github-mcp-server binary on your current platform. The server then exposes MCP capabilities (via the MCP client) using the credentials obtained from gh, enabling toolsets to query and interact with GitHub data through the MCP protocol.
To use it, install the extension and start the server either directly or by configuring your MCP client to point at the gh mcp server. You can run the server directly with gh mcp, which will automatically handle credential extraction, integrity checks for the bundled binary, and process I/O streaming. For Claude Code or other MCP clients, add the server via your MCP configuration by specifying command: "gh" and args: ["mcp"], with optional environment variables to tailor toolsets (for example enabling repos, issues, and pull_requests) or to enable read-only mode.
How to install
Prerequisites:
- GitHub CLI (gh) installed and authenticated (gh auth login)
- This extension package repo released assets containing a bundled github-mcp-server binary for your platform
Installation steps:
- Install the extension from the GitHub CLI extension registry:
gh extension install shuymn/gh-mcp
- Verify installation:
gh mcp --help
- (Optional) Update to the latest version when available:
gh extension upgrade gh-mcp
Notes:
- The extension fetches and verifies a pinned SHA256 of the bundled server binary before execution.
- It forwards only a minimal set of environment variables to the server (authentication-related GITHUB_* vars plus a controlled allowlist from the parent process).
- If your platform is not supported by the bundled binaries, you will see an appropriate error message and should use a supported target or build from source if available.
Additional notes
- Platform support is limited to architectures where bundled github-mcp-server binaries exist (darwin/amd64, darwin/arm64, linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, windows/arm64).
- If you encounter "Not logged in to GitHub" ensure you have run gh auth login and that gh can access a default host.
- Read-Only mode and dynamic toolset discovery are configurable via GITHUB_READ_ONLY, GITHUB_TOOLSETS, and GITHUB_DYNAMIC_TOOLSETS environment variables when starting the server.
- If you see "no bundled github-mcp-server for platform", this indicates the current platform target is not supported by the bundled assets; use a supported platform or compile a compatible binary if available.
Related MCP Servers
claude-historian
📜 An MCP server for conversation history search and retrieval in Claude Code
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
kratos
🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
mcp-sdk
Official Radius MCP SDK for token-gating Model Context Protocol tools, resources, and prompts.
ruvscan
🧠 The AI that finds the code you didn't know you needed - Sublinear-intelligence MCP server for discovering GitHub leverage
mcp-tidy
CLI tool to visualize and manage MCP server configurations in Claude Code. List servers, analyze usage statistics, and clean up unused servers