This week, I was planning to build an MCP server for GitHub issue management. Claude Code, however, already has GitHub integration built in—no custom tooling needed.
(I discovered this about 15 minutes into researching the MCP architecture. Who knew!)
The Problem
Managing GitHub workflows from Claude Code felt like it needed custom infrastructure. I wanted my robot buddy to create issues, open PRs, and handle repository automation. My first instinct was building an MCP server to expose GitHub’s REST API as Claude-friendly tools.
Turns out that’s solving a problem that doesn’t exist.
The Solution
That’s why you should use Claude Code’s built-in GitHub capabilities instead.
Claude Code integrates with GitHub through two approaches:
- Terminal workflow: Uses the
ghCLI directly—no setup beyond authentication - GitHub Actions: Mention
@claudein PRs/issues to trigger automated workflows
I tested both on my blog repository this afternoon. Here’s what actually works.
Terminal Workflow: gh CLI
Claude Code can use GitHub’s official CLI tool right out of the box. I verified this by creating a test issue and PR:
| |
The workflow I use now: describe what I want to Claude, it writes the code, commits with a proper message, and runs gh pr create automatically. The PR links back to the original issue without me touching the command line.
Here’s a real PR creation command that worked:
| |
Reading over those examples, this feels way simpler than building a custom MCP server to do the same thing.
GitHub Actions Workflow: @claude Mentions
The second approach uses GitHub Actions. Install the Claude GitHub app, and you can mention @claude in any PR or issue comment to trigger automated workflows.
Setup takes about 5 minutes:
| |
This guides you through installing the app and configuring secrets. Then add ANTHROPIC_API_KEY to your repository secrets and copy the workflow file to .github/workflows/.
Now you can do things like:
- Comment
@claude review this PRfor automated code review - Comment
@claude implement this featureon an issue to generate a PR - Comment
@claude fix the failing teststo debug CI failures
(The GitHub Actions approach runs Claude in isolated containers on GitHub’s infrastructure, which sidesteps the “should I let AI agents modify my repo?” question nicely.)
Creative Uses from the Community
People are doing interesting things with these workflows:
Auto-documentation: A workflow that triggers on PR merge, has Claude analyze the changes, and opens a follow-up PR with updated documentation. The documentation lives in docs/prs/ as markdown files, creating a searchable history.
Design review automation: Specialized sub-agents check PRs for responsive design, accessibility, and style guide compliance using Playwright for browser automation.
Dual-loop code review: One agent reviews for syntax and completeness, another for architecture and patterns. Both comment on PRs with specific line-level feedback.
These use the @claude mention pattern with custom CLAUDE.md files that define review criteria and coding standards.
When You Actually Need an MCP Server
You’d build a custom MCP server for GitHub when:
- You need operations
ghCLI doesn’t support (custom webhooks, advanced GraphQL queries) - You’re integrating multiple services beyond GitHub
- You want specialized triage logic that requires custom state management
- You’re building a tool for non-CLI users
For standard GitHub workflows—issues, PRs, comments, reviews—the built-in tools cover it.
What I’m Using Now
I’ve been using the terminal workflow for the past few weeks. My typical session:
- Claude reads the issue with
gh issue view <number> - We discuss the approach
- Claude writes code, tests it, commits
- Runs
gh pr createwith proper formatting and issue linking
No MCP server, no custom infrastructure, no authentication handling. Just Claude Code and gh CLI working together.
The GitHub Actions workflow is on my list to try for automated PR reviews, but I haven’t needed it yet. The terminal approach handles my use cases.
If you’re thinking about building GitHub automation for Claude Code, check what gh CLI already does first. You might not need custom tooling.