Connect your AI Agents to GitHub in minutes

Merge lets you securely connect your agents to GitHub and thousands of tools instantly

Available tools

list_workflows

List all workflows in a repository's .github/workflows directory. Returns workflow IDs needed for other Actions tools

get_workflow

Get a specific workflow by ID or filename (e.g. 'ci.yml'). Use list_workflows to discover workflow IDs and filenames

list_workflow_runs

List workflow runs for a repository or specific workflow. Filter by branch or status. Returns run history with status and conclusion

get_workflow_run

Get details for a specific workflow run including status, conclusion, and timing. Use list_workflow_runs to find run IDs

trigger_workflow

Trigger a workflow dispatch event to manually run a workflow. The workflow must have a workflow_dispatch trigger configured

list_workflow_jobs

List jobs for a workflow run. Each job represents a step in the workflow. Use get_job_logs to retrieve logs for a specific job

get_job_logs

Get the log content for a workflow job. Use list_workflow_jobs to find job IDs

list_discussion_categories

List discussion categories available in a repository. Categories are required when creating discussions

list_discussions

List discussions in a repository. Returns discussion metadata including category, comment count, and state

get_discussion

Get a specific discussion by number including body, category, and metadata. Use list_discussions to find discussion numbers

get_discussion_comments

Get comments on a discussion thread with pagination

create_discussion_comment

Add a comment to a discussion. Supports GitHub Markdown formatting

update_discussion_comment

Update an existing discussion comment. Use get_discussion_comments to find comment IDs

get_file_contents

Get file or directory contents from a repository. For files, returns base64-encoded content and metadata. For directories, returns a list of entries. Use ref to specify branch/tag/SHA

create_or_update_file

Create or update a single file in a repository. Provide sha of existing file to update it (get sha from get_file_contents). Content must be base64 encoded

delete_file

Delete a file from a repository. Requires the file's current blob SHA (get sha from get_file_contents). Cannot delete directories

push_files

Push multiple files in a single commit using the Git Data API. Creates or updates multiple files atomically. File content must be base64 encoded. More efficient than create_or_update_file for multiple files

get_repository_tree

Get the complete file tree for a repository. Use recursive=true (default) to get all files in all subdirectories. tree_sha can be a branch name, tag, or commit SHA

list_gists

List gists for the authenticated user or a specific user. Gists are public or secret code snippets stored on GitHub

get_gist

Get a specific gist by ID including all file contents

create_gist

Create a new gist with one or more files. Set public=true for a public gist visible to everyone, or public=false for a secret gist accessible only via its URL

update_gist

Update a gist's description or file contents. To delete a file, set its value to null in the files map. Only the gist owner can update it

delete_gist

Delete a gist permanently. Only the gist owner can delete it

get_issue

Get a single issue by number from a specific repository. Returns detailed issue information including comments, labels, and assignees

get_issues

Get a list of issues from a repository with filtering options by state, labels, assignee, creator, and more. Supports pagination and sorting

search_issues

Search for issues across all accessible repositories using GitHub's search syntax. Supports advanced filtering and sorting options

create_issue

Create a new issue in a repository with title, body, labels, assignees, and milestone. Returns the created issue

update_issue

Update an existing issue's title, body, state, labels, assignees, milestone, and other properties

close_issue

Close an issue by setting its state to closed. Optionally specify a reason for closing

reopen_issue

Reopen a closed issue by setting its state to open

get_issue_comments

Get comments for a specific issue. Supports filtering by date and pagination for issues with many comments

create_issue_comment

Create a new comment on an issue. Comments support GitHub markdown formatting

update_issue_comment

Update an existing issue comment's content. Only the comment author or repository owners can update comments

delete_issue_comment

Delete an issue comment. Only the comment author or repository owners can delete comments

add_labels_to_issue

Add labels to an issue. Labels must already exist in the repository

remove_label_from_issue

Remove a specific label from an issue

set_issue_labels

Set labels on an issue, replacing all existing labels with the new set

remove_all_labels_from_issue

Remove all labels from an issue

lock_issue

Lock an issue to prevent new comments. Only collaborators will be able to add new comments

unlock_issue

Unlock an issue to allow new comments from all users

list_labels

List labels for a repository with pagination

get_label

Get a single repository label by name. Use list_labels to browse all labels

create_label

Create a new label in a repository. Color must be a 6-character hex code without the # (e.g. 'f29513')

update_label

Update an existing repository label's name, color, or description. Use list_labels to find label names

delete_label

Delete a label from a repository. This removes the label from all issues and pull requests that have it

list_notifications

List notifications for the authenticated user. Set all=true to include read notifications. Filter to a specific repo by providing owner and repo

get_notification

Get details for a specific notification thread by ID. Use list_notifications to find thread IDs

mark_notification_read

Mark a notification thread as read

mark_all_notifications_read

Mark all notifications as read. Optionally scope to a specific repository

dismiss_notification

Unsubscribe from a notification thread so you no longer receive notifications for it

manage_notification_subscription

Subscribe to or mute a notification thread. Set subscribed=true to receive notifications, ignored=true to mute all notifications for this thread

manage_repo_notification_subscription

Manage repository-level notification subscription. Set subscribed=true to watch all notifications, ignored=true to ignore all notifications for this repository

get_pull_request

Get a single pull request by number from a specific repository. Returns detailed PR information including merge status, reviews, and file changes

get_pull_requests

Get a list of pull requests from a repository with filtering options by state, head/base branches, and sorting. Supports pagination

create_pull_request

Create a new pull request to merge changes from one branch into another. Supports creating draft PRs and setting reviewers

update_pull_request

Update an existing pull request's title, body, state, base branch, and other properties

merge_pull_request

Merge a pull request using specified merge method (merge, squash, or rebase). Verifies PR can be merged before attempting

close_pull_request

Close a pull request without merging it. The PR can be reopened later if needed

reopen_pull_request

Reopen a closed pull request. The PR must not be merged to be reopened

convert_to_draft

Convert a pull request to draft status, preventing it from being merged until marked ready for review

mark_ready_for_review

Mark a draft pull request as ready for review, allowing it to be merged once approved

get_pull_request_reviews

Get reviews for a pull request including approval status, comments, and reviewer information

create_pull_request_review

Create a review for a pull request with approval, change requests, or general comments

create_pull_request_comment

Create a review comment on a pull request for code review. Comments specific lines of code in pull request diffs

request_reviewers

Request specific users or teams to review a pull request. Reviewers will be notified of the request

remove_review_request

Remove review requests from specific users or teams for a pull request

get_pull_request_files

Get the files changed in a pull request with diff information, additions, deletions, and patch data

check_if_merged

Check if a pull request has been merged and get merge details if applicable

get_pull_request_commits

Get commits in a pull request showing the individual changes that make up the PR

update_pull_request_branch

Update the head branch of a pull request to include the latest changes from the base branch

get_commit_status

Get the combined status for a specific commit or ref (legacy statuses API)

get_check_runs

Get check runs for a specific commit or ref (Checks API)

get_pull_request_checks

Get an overall CI status summary for a PR's head commit, including checks and legacy status

add_reply_to_pull_request_comment

Reply to an existing review comment on a pull request. Use get_pull_request_reviews or create_pull_request_comment to find comment IDs

get_repository

Get a single repository by owner and name. Returns detailed repository information including stats, settings, and metadata

get_repositories

Get a list of repositories. Can filter by type, visibility, and sort options. Supports pagination for large result sets

create_repository

Create a new repository. Can create private or public repositories with various settings like issues, wiki, etc

create_organization_repository

Create a new repository in an organization. Can create private or public repositories with various settings like issues, wiki, etc

update_repository

Update an existing repository's settings, description, visibility, and other properties

delete_repository

Delete a repository permanently. This action cannot be undone. Use with extreme caution

get_branches

Get repository branches with optional filtering by protection status. Includes commit information for each branch

create_branch

Create a new branch from an existing commit. Requires the SHA of the commit to branch from

get_commits

Get repository commits with filtering options by author, date range, file path, and branch/SHA

get_commit

Get a single commit by SHA with detailed information including file changes, statistics, and parent commits

get_releases

Get repository releases including tags, assets, and release notes. Returns both published and draft releases

get_latest_release

Get the latest release for a repository. Returns the most recent non-prerelease, non-draft release

check_starred

Check if the authenticated user has starred a repository

star_repository

Star a repository for the authenticated user

unstar_repository

Unstar a repository for the authenticated user

fork_repository

Fork a repository into the authenticated user's account or a specified organization

list_repository_collaborators

List collaborators for a repository. Filter by affiliation: outside (external), direct, or all

get_release_by_tag

Get a release by its tag name (e.g. 'v1.0.0'). Use get_releases to list all releases

list_tags

List tags for a repository with pagination

search_orgs

Search for organizations on GitHub. Use qualifiers like location:, language:, repos:>N. Returns org profiles

search_repositories

Search GitHub repositories using search syntax. Supports qualifiers like language:python, stars:>100, topic:machine-learning, user:octocat, org:github

search_code

Search code across GitHub repositories. Must include a qualifier: repo:, org:, user:, language:, path:, or extension:. Example: 'addClass in:file language:js repo:jquery/jquery'

search_commits

Search commits across GitHub repositories. Use qualifiers like author:, committer:, author-date:, repo:, org:. Example: 'fix bug author:octocat'

search_users

Search GitHub users and organizations. Use qualifiers like type:user, type:org, location:, language:, followers:>N, repos:>N. Example: 'tom repos:>42 followers:>1000'

search_pull_requests

Search pull requests across GitHub repositories. Supports filtering by state, author, reviewer, label, base branch. Example: 'is:open review-requested:octocat base:main'

get_authenticated_user

Get the authenticated user's profile information including public and private details

get_user

Get detailed information about any GitHub user by their username

get_organization

Get detailed information about a GitHub organization by its name

get_followers

Get a list of users who follow a specific user. Supports pagination for users with many followers

get_following

Get a list of users that a specific user follows. Supports pagination for users who follow many people

check_following

Check if the authenticated user follows a specific user

follow_user

Follow a user as the authenticated user. The user will be notified of the follow

unfollow_user

Unfollow a user as the authenticated user

get_organization_members

Get members of an organization with filtering options by role and 2FA status

get_user_organizations

Get organizations that a user is publicly a member of

get_organization_teams

Get teams in an organization. Requires organization membership or public visibility

get_team_members

Get members of a specific team with filtering by role (member or maintainer)

check_team_membership

Check if a user is a member of a specific team

add_team_membership

Add a user to a team with specified role (member or maintainer). Requires admin permissions

remove_team_membership

Remove a user from a team. Requires admin permissions

create_team

Create a team in an organization. Requires org admin permissions

get_user_memberships

Get the authenticated user's organization memberships including private memberships

get_user_events

Get public events for a user showing their recent GitHub activity

get_user_starred_repos

Get repositories starred by a user. Shows what projects they have bookmarked

validate_credential

Validate GitHub credentials. Verifies credentials during setup.

View all tools by creating a free accountSee more tools

How to set up Merge Agent Handler

In an mcp.json file, add the configuration below, and restart Cursor.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5      "headers": {
6        "Authorization": "Bearer yMt*****"
7      }
8    }
9  }
10}
11
Copy Code

Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.

Make sure Claude is using the Node v20+.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "command": "npx",
5      "args": [
6        "-y",
7        "mcp-remote@latest",
8        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9        "--header",
10        "Authorization: Bearer ${AUTH_TOKEN}"
11      ],
12      "env": {
13        "AUTH_TOKEN": "yMt*****"
14      }
15    }
16  }
17}
Copy Code
Copied!

Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.

Learn more in the official documentation ↗

1{
2    "mcpServers": {
3      "agent-handler": {
4        "command": "npx",
5        "args": [
6          "-y",
7          "mcp-remote@latest",
8          "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9          "--header",
10          "Authorization: Bearer ${AUTH_TOKEN}"
11        ],
12        "env": {
13          "AUTH_TOKEN": "<ah-production-access-key>"
14        }
15      }
16    }
17  }
Copy Code

In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".

You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.

Learn more in the official documentation ↗

1{
2  "inputs": [
3    {
4      "type": "promptString",
5      "id": "agent-handler-auth",
6      "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7      "password": true
8    }
9  ],
10  "servers": {
11    "agent-handler": {
12      "type": "stdio",
13      "command": "npx",
14      "args": [
15        "-y",
16        "mcp-remote@latest",
17        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18        "--header",
19        "Authorization: Bearer ${input:agent-handler-auth}"
20      ]
21    }
22  }
23}
Copy Code

FAQs on using Merge's GitHub  MCP server

FAQs on using Merge's GitHub  MCP server

How can I use the GitHub MCP server?

Here are just a few use cases worth implementing:

  • Monitor pull request activity across repositories. Your agent can track all open pull requests across multiple repositories and send daily summaries to your team's Slack channel, highlighting PRs that need review, are blocked, or have been open longer than your team's SLA
  • Automate code review coordination. Your agent can analyze PR content, automatically request reviews from the appropriate team members based on file paths and code ownership, and send reminders to reviewers when PRs are waiting for feedback
  • Link development work to business objectives. Your agent can combine GitHub commit and PR data with your project management tool to show leadership how engineering work maps to product roadmap items, helping them understand resource allocation and velocity toward strategic goals
  • Streamline issue management from communication tools. Your agent can help users create, update, and track GitHub issues directly from Slack or Microsoft Teams, allowing developers to triage bugs, assign tasks, and update statuses without context-switching between tools

What are popular tools for GitHub’s MCP server?

Here are some popular tools across data types:

Issues

  • <code class="blog_inline-code">get_issues</code>
  • <code class="blog_inline-code">search_issues</code>
  • <code class="blog_inline-code">close_issue</code>
  • <code class="blog_inline-code">add_labels_to_issue</code>

Pull requests (PRs)

  • <code class="blog_inline-code">get_pull_requests</code>
  • <code class="blog_inline-code">create_pull_requests</code>
  • <code class="blog_inline-code">update_pull_requests</code>
  • <code class="blog_inline-code">reopen_pull_request</code>

Repositories

  • <code class="blog_inline-code">get_repository</code>
  • <code class="blog_inline-code">create_repository</code>
  • <code class="blog_inline-code">update_repository</code>
  • <code class="blog_inline-code">delete_repository</code>

What makes Merge Agent Handler’s GitHub MCP server better than alternative GitHub MCP servers?

Merge Agent Handler provides several platform-level advantages over standalone MCP servers:

  • Enterprise-grade security and DLP: All GitHub tool inputs and outputs are scanned by Merge Agent Handler’s Security Gateway, which can block, redact, or mask sensitive data based on configurable rules. This allows you to enforce data governance policies consistently across all agent interactions
  • Managed authentication and credential handling: Merge Agent Handler supports guided authentication flows, credential storage, and both individual and shared authentication models, removing the need to implement OAuth or token handling yourself
  • Real-time observability and audit trails: Every GitHub tool call is logged with a complete, fully-searchable audit trail, enabling debugging, compliance reviews, and performance optimization from a single dashboard
  • Tool Pack management and customization: GitHub tools can be bundled with other connectors into Tool Packs, allowing you to control exactly which tools an agent can access per use case, without changing agent logic

Can I set custom security rules for GitHub tool calls in Merge Agent Handler?

Yes, you can set custom security rules for any GitHub tool calls to block or redact sensitive data. You can also log tool calls, allowing the agent to make them while providing your team with real-time visibility whenever this happens.

Here are some specific examples:

  • Block your agents from creating or updating pull requests, issues, or commits with API keys, access tokens, or credentials in titles, descriptions, comments, or code content
  • Automatically redact sensitive data patterns like internal IP addresses, database connection strings, or proprietary algorithms when your agents retrieve or display code, PR descriptions, or issue details, so they only see masked versions
  • Monitor and log whenever your agents attempt to push code or create PRs containing sensitive terms like "password", "secret", or "private key" in file names or content, giving your security team visibility without blocking the action
  • Block your agents from creating GitHub issues or PR descriptions with confidential project codenames, customer names under NDA, or internal-only labels that shouldn't be visible in your repositories

How can I start using Merge Agent Handler’s GitHub MCP server?

Here are all the steps you’ll need to take to integrate your agent with the MCP server:

1. Create a free Agent Handler account. Sign up here to access the Agent Handler dashboard.

2. Create a Tool Pack. Tool Packs define which connectors and tools your agent can access. This involves navigating to Tool Packs in the dashboard, clicking Create Tool Pack, adding the GitHub connector, and choosing  your authentication mode (Individual or Shared).

3. Set up a Registered User. Go to Registered Users in the dashboard; each Registered User represents a person or system identity that your agent runs as. When a user needs to authenticate with GitHub, Merge Agent Handler will automatically display a guided authorization prompt—no custom OAuth code required.

4. Test in the Playground. Before integrating into your app, validate everything works. This means opening the Sandbox for your Tool Pack and testing GitHub tool calls.

5. Integrate with your application. Connect your agent to Agent Handler to access the tools. You can do this in two ways:

  • Via MCP config: Copy the MCP server configuration from your Tool Pack page and add it to your agent's MCP client settings. This gives your agent access to all configured tools through the Model Context Protocol
  • Via API: Use Agent Handler's REST API to list available tools and invoke them programmatically. You'll need your Agent Handler API key, Tool Pack ID, and Registered User ID to authenticate requests

Explore other MCP servers built and managed by Merge

activecampaign
ActiveCampaign
adobe_pdf_services
Adobe PDF Services
ahrefs
Ahrefs
airtable
Airtable
amadeus
Amadeus
amazon_s3
Amazon S3
amplitude
Amplitude
anaplan
Anaplan
apollo
Apollo
arize
Arize
articulate
Articulate Reach 360
asana
Asana
ashby
Ashby
attio
Attio
aviationstack
Aviationstack
axiom
Axiom
bamboohr
BambooHR
basecamp
Basecamp
biorxiv
bioRxiv
bitbucket
Bitbucket
bitly
Bitly
box
Box
calendly
Calendly
canva
Canva

Ready to try it out?

Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now