# Gerrit MCP for AI Agents AI Agent Connect

> Gerrit MCP lets you manage code reviews and patch sets from any AI agent. Query changes with status filters, track reviewer progress, and audit branch structures without jumping between tabs. It handles the manual heavy lifting of navigating Gerrit's complex repository data.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_1L2um2puyGWUtZ39TYLOCAA2Zurxj3pUPXHkxEEj/ai-agent-connect
- **Tags:** code-review, git-management, patch-sets, version-control, software-development, pull-requests

## Description

This Gerrit MCP connects your code review instance to your AI agent so you can manage the entire lifecycle of a pull request through a chat interface. Instead of hunting through nested menus or complex URLs, you can just ask your agent to find specific changes based on status, owner, or project name. It handles the grunt work of digging through patch sets to find specific commit SHAs or checking who has already signed off on a piece of code. You can also use it to map out your project structure, list branches, and audit group permissions across your organization. When you use this through the Vinkius catalog, you get a unified way to keep your repository clean and your team moving faster. It turns Gerrit from a separate destination into a reachable extension of your primary workspace.

## Tools

### list_projects
Get a list of every project repository currently hosted on your Gerrit instance.

### query_changes
Search for code reviews using filters like status:open or owner:self to see subjects and owners.

### get_change
Pull the full details of a specific Gerrit change to see its current state.

### get_project
Retrieve detailed metadata and default branch info for a specific project.

### list_branches
See every branch inside a project along with their latest commit SHAs.

### get_account
Fetch the profile information for the currently authenticated user.

### list_emails
Get all verified email addresses associated with your authenticated account.

### list_reviewers
See everyone assigned to review a change and their specific approval labels.

### list_patchsets
List all revisions of a change to track commit history and uploader info.

### list_groups
Identify all groups and their owners to audit organizational permissions.

## Prompt Examples

**Prompt:** 
```
What's the status of my open changes in the 'web-app' project?
```

**Response:** 
```
I've checked the 'web-app' project for your open changes. You have 2 active:

* **#402** 'Update auth logic'
* **#405** 'Fix header styling'

Would you like me to pull the reviewer status for either of those?
```

**Prompt:** 
```
Who has approved change #402 yet?
```

**Response:** 
```
Here is the reviewer status for #402:

| Reviewer | Label | Status |
| :--- | :--- | :--- |
| Alice | Code-Review (+2) | Approved |
| Bob | Code-Review (+1) | Approved |
| Charlie | Verified (+1) | Verified |

It looks like the change is still waiting on one more 'Verified' label to be ready for merging.
```

**Prompt:** 
```
List all the branches in the 'api-gateway' project.
```

**Response:** 
```
I found 4 branches in 'api-gateway':

* **master** (SHA: a1b2c3d)
* **develop** (SHA: e5f6g7h)
* **hotfix-login** (SHA: i9j0k1l)
* **release-v2** (SHA: m2n3o4p)
```

## Capabilities

### Filter changes by status or owner
Find specific code reviews using filters like status:open or owner:self.

### Pull full change details
Get all the information for a specific Gerrit change in one request.

### List all projects
See every project repository currently hosted on your Gerrit instance.

### View project metadata
Retrieve detailed info including states and default branches for a project.

### Fetch user profiles
Get authenticated user information and verified email addresses.

### Monitor reviewer labels
Check who has approved or verified a specific change.

### Audit group permissions
Identify groups and their owners to see who controls project access.

## Use Cases

### Finding open changes for a specific project
A maintainer needs to find all open changes for a project. They ask the agent to search for 'core' and 'open' to get a clean list of active reviews.

### Checking the history of a specific commit
An engineer wants to see the history of a specific change. They use the tool to list all revisions and uploader info to see the full version history.

### Identifying blockers on a release
A manager needs to know who is blocking a release. They ask the agent to see who has signed off and who still needs to provide a label.

### Verifying branch structures
A DevOps lead needs to check branch structures. They ask the agent to list all branches and extract the latest commit SHAs for a specific project.

## Benefits

- Stop tab-switching by filtering open pull requests directly in your chat window to find what needs your attention.
- Track commit history faster by viewing every revision of a change in one view without clicking through multiple pages.
- Monitor team progress by seeing exactly who has signed off and who still needs to take a look at your code.
- Audit repository health by seeing the state of your entire codebase and default branch configurations in seconds.
- Verify access levels quickly by seeing which teams have permission to specific projects from a single prompt.
- Save time on identity checks by fetching user profile data and verified emails instantly during audits.

## How It Works

The bottom line is you get a direct line to your Gerrit data without leaving your chat or IDE.

1. Subscribe to the Gerrit MCP via the Vinkius marketplace.
2. Enter your Gerrit URL, Username, and HTTP Password into your client settings.
3. Ask your agent to find open changes or list project branches.

## Frequently Asked Questions

**Can I use the Gerrit MCP to see who is reviewing my code?**
Yes, you can use it to see every reviewer assigned to a specific change along with their approval labels. This helps you see exactly who has signed off and who still needs to take a look.

**How does the Gerrit MCP help with project auditing?**
It lets you list all projects and retrieve detailed metadata like their current states and default branches. This is great for getting a bird's-eye view of your repository structure.

**Can I filter my Gerrit changes with specific criteria?**
Yes, you can ask your agent to find changes based on status, owner, or project name. It supports syntax like 'status:open' or 'owner:self' to narrow down the results.

**Does the Gerrit MCP show me the history of a specific change?**
You can use it to list all patch sets for a change. This shows you every revision, the uploader info, and the commit SHAs for a complete version history.

**Can I use this to manage group permissions in Gerrit?**
You can list all groups to see their names, IDs, owners, and descriptions. This makes it much easier to audit who has access to which projects in your organization.

**Can I see the branches for a specific project?**
Yes, you can list all branches within any Gerrit project. The agent will also pull the latest commit SHAs for each branch so you can verify the current state.

**How do I get my account info using this Connector?**
You can fetch your authenticated user profile and list all verified email addresses associated with your account. This is useful for verifying account contexts during audits.

**Can my agent list open changes across all Gerrit projects?**
Yes. Use the 'query_changes' tool with the query 'status:open'. The agent will retrieve the global array of all matching changes, including subjects, numbers, and owners natively.

**How do I see the approval labels (Code-Review, Verified) for a specific change via chat?**
Use the 'get_change' tool. It retrieves the full details of a Gerrit change, including the 'labels' section where you can see the Code-Review and Verified scores assigned by reviewers natively.

**Can I check which groups have access to a specific project through the agent?**
Absolutely. Use the 'list_groups' tool to identify existing groups. While project access rules are often defined in the project settings, the agent can help you verify group definitions and ownership within your organizational tree flawlessly.