How to connect to the GitHub MCP with Claude Code (5 steps)
.png)
By using Merge Agent Handler's GitHub connector with Claude Code, your agents can create and manage issues, search across repositories, add comments, update workflows and more directly from the terminal.
This guide walks through the set up.
Prerequisites
Before getting started, you’ll need:
- Merge Agent Handler account
- Claude Code installed and configured
- GitHub account with appropriate repository permissions
Related: A guide to using the Notion MCP in Claude Code
How it works
Merge Agent Handler functions as a secure intermediary between your agent and GitHub's API.
You'll set up a Tool Pack (a scoped collection of connectors) and a Registered User (representing your agent's identity), which together generate a unique MCP URL that Claude Code communicates with via HTTP.
This URL, coupled with the API key you’d generate in Agent Handler, lets you craft the full command for connecting to our GitHub MCP server.
Here’s how the command looks before adding your unique MCP URL and API key:
Steps for connecting to the GitHub MCP
Take the following measures to get your MCP URL and API key and to access the GitHub MCP from Claude Code.
1. Create a Tool Pack
Navigate to the Merge Agent Handler dashboard, click on Tool Packs, and select Create Tool Pack.
Provide a descriptive name like "Engineering Agent," add a description, and select GitHub as your connector.

You can specify which GitHub tools to include and choose between individual or shared authentication.

2. Add a Registered User
Go to the Registered Users section and click Add Registered User. This establishes the identity context for your agent's operations and generates the unique MCP URL that Claude Code will use.

Step 3: Authenticate GitHub
From the Registered User details page, select Add Connector and complete the GitHub OAuth authentication process.

This grants your agent access to the repositories and organizations you authorize.
4. Gather your credentials
Collect two items from Merge Agent Handler:
- MCP URL (from Tool Pack details):
- API key (from Settings > API Keys > Create new key)

5. Add GitHub MCP to Claude Code
Run the following command in your terminal, replacing the placeholders with your actual values:
Verify the connection by running <code class="blog_inline-code">claude mcp list</code>.
You should see agent-handler listed with a connected status.

Once connected, you can prompt Claude Code to take action in GitHub directly. For example: "Search open issues in the backend repo labeled 'bug' and assign them to me.”

Or get updates from GitHub: What’s the latest on the issue in the API repo titled 'Rate limiter not resetting on token refresh?"

{{this-blog-only-cta}}
GitHub MCP FAQ
In case you have more questions about connecting GitHub to Claude Code or using it in the terminal, we've answered a few more below.
What can agents do with a GitHub MCP server?
- Risk and policy enforcement: Automatically require the right approvals/checks for sensitive changes (auth/billing/infra), and enforce PR hygiene (linked ticket, changelog, labels, signed commits, etc.)
- CI/build failure triage: Summarize failures, identify likely culprit commits/owners, and route fixes fast with smart alerts instead of noisy pings
- Release readiness and release notes automation: Roll up merged PRs into ship-ready checklists and customer-friendly changelog/release note drafts, then publish updates to Slack/Notion
- Issue SLA and escalation management: Track aging/stale issues (bugs, security, escalations), auto-retriage, and escalate based on priority/time-in-state with clear owner asks
- Incident response coordination: When severity spikes, auto-create the incident workflow (channel, roles, timeline), and keep status updates synced from GitHub activity
Why use Merge Agent Handler's GitHub MCP server?
Merge Agent Handler's GitHub connector includes enterprise-grade security controls, data loss prevention, and real-time observability over every tool call. You can scope exactly which repositories your agent can access and set custom guardrails to control what it can read or write.
Why connect GitHub MCP to Claude Code?
GitHub is where engineering work is tracked, and Claude Code is where engineers already are. Connecting the two means your agents can surface relevant issues, log new bugs, update existing tickets as part of your coding workflows, and more without switching tabs or losing context.
.png)
.png)


