Skip to Content

Managing GitHub Issues with Claude Code

Claude Code can create, search, and update GitHub Issues directly. Great for turning verbal instructions or vague requests into well-structured Issues.


GitHub’s official command-line tool. Claude Code can use it directly.

Setup

# Install (Mac) brew install gh # Authenticate gh auth login # Verify gh --version

Using with Claude Code

"Create a GitHub Issue: login page shows error when submitting empty fields" "List all open issues in this repository" "Add a comment to Issue #42" "Show all issues labeled 'bug'"

Claude Code formats the content (title, body, labels), asks for confirmation, then creates the Issue. Always review the title, labels, and body in the confirmation dialog before approving.


Option 2: GitHub MCP Server

GitHub’s official MCP server. Supports more operations than gh CLI.

Setup

Requires Docker. Add to .mcp.json:

{ "mcpServers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" } } } }

Create a token at GitHub Settings > Developer settings > Personal access tokens .

Comparison

gh CLIGitHub MCP
SetupSimpleRequires Docker
ScopeIssues, PRs, releasesBroader GitHub API
RecommendationStart hereWhen gh CLI isn’t enough

References

Last updated on