- A practical guide to connecting Grok Bot to Claude Code so it reviews the work via Git branches, Pull Requests, the GitHub connector, or the official MCP server, without direct agent-to-agent control.
Yes, you can get Grok Bot to review Claude Code's work, but not through a direct connection between the agents. The approach that actually works goes through Git: Claude Code works on a separate branch and opens a Pull Request, and Grok Bot, connected to GitHub via a built-in connector or an official MCP server, reads the changes and posts a review as a comment. There is no interface that lets one agent control the other, and that is exactly the first thing to internalize before you start.
This question came up in a Facebook group I am a member of, and the hidden assumption behind it is more interesting than the answer itself. The person asking imagined a manager giving orders to an employee. In reality, neither of these agents talks to the other at all. They both talk to GitHub, and GitHub is the shared channel. That is also why this works better than the asker had planned, not worse.
In short
| Question | Short answer |
|---|---|
| Can you connect the agents directly? | No. There is no API that lets Grok Bot control Claude Code or vice versa. |
| What actually connects them? | A Git branch and a Pull Request. Claude Code writes, Grok Bot reads and reviews. |
| How does Grok Bot access the code? | A built-in GitHub connector, or an official MCP server as a Custom Connector. |
| Who approves between steps? | You. No step runs automatically without an explicit request. |
| What must Grok Bot never be given? | Merge permissions and write access to the content itself. Read and comment only. |
| Why not just use Claude's own code review? | Because that is the same company reviewing itself. Grok Bot is a second opinion from a different model. |
Why not connect the two agents directly to each other
There is no product today, neither from Anthropic nor from SpaceXAI, that allows one AI agent to take managerial control over another AI agent from a different company. Claude Code is a CLI tool that runs on a local machine or in a cloud environment and receives instructions from a conversation or a workflow. Grok Bot is an agent with a persistent cloud environment and connectors to applications. Both have a tool interface (MCP), but MCP is a protocol for connecting external tools, not a framework designed to let one agent run commands inside another. I covered that mechanism in depth in the guide to MCP with Claude Code, and the pattern there is identical: the tool receives limited permission, not full control.
This is not just a technical limitation. Even if you could connect the two directly, it would be a bad idea. An agent that reviews another agent needs to see a finished output, not browse through the process that created it in real time. The separation between "who writes" and "who reviews" is precisely what makes the review worth anything.
The right architecture: Git as the intermediary
The pattern that works is built on three layers, each of which stands on its own:
- Claude Code writes on a branch. It receives a task, works on a branch that is not main, and commits.
- Claude Code opens a Pull Request. The PR is the output the review addresses, not the conversation that produced it.
- Grok Bot reads the PR and writes a review. It does not enter Claude Code's conversation and sees nothing that has not been exposed in GitHub.
This is a structure every human developer recognizes: two colleagues do not need access to each other's internal process to work together, they need a shared repo. I broke down a closely related pattern, two AI agents on the same repo with separate branches, in the guide on Claude Code and Codex with Git Worktrees. The only difference here: the second agent does not write code at all, it only reads and evaluates.
Step 1: Claude Code opens the Pull Request
The documented way to set up this infrastructure is the /install-github-app command, which you run from inside Claude Code in the repo you want to connect. It installs Claude's official GitHub App, adds an authorization secret to the repo named ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN, and opens a Pull Request containing the ready-made workflow file. Once you approve and merge that PR, any @claude mention in a pull request or issue activates the agent. From that point, Claude Code can receive a task, work on a branch, and open a new Pull Request waiting for review.
For the purposes of this guide, the only thing that matters is this: at the end of Claude Code's work, there is an open Pull Request in GitHub with a real diff. That is what Grok Bot is going to read.
Step 2: Connect Grok Bot to GitHub
There are two ways, and each has its place.
Method A: The built-in connector
According to SpaceXAI's announcement about connectors in Grok, Grok "can search code, summarize pull requests, and review changes," with the connection made from the Plugins menu in the grok.com interface, under the Connectors tab. This is the fast option, suitable for a first stage where you want Grok Bot to read and summarize PRs without needing to set up an additional server.
The limitation: the official announcement does not detail which write permissions the connector receives, meaning it is not clear from the announcement alone whether it can post a comment on a PR or only read and summarize inside the Grok chat. Anyone who wants the review to actually appear as a comment on the Pull Request, not just in the conversation with the bot, will need the second method.
Method B: GitHub's official MCP server, for precise control
GitHub publishes its own official MCP server, which you can connect to Grok Bot as a Custom Connector just like any other MCP server. Its remote address is https://api.githubcopilot.com/mcp/. Authentication is done via OAuth (browser login with no need to create a token), or with a Personal Access Token passed in an Authorization header.
Two permission mechanisms make it the safer choice for code review:
GITHUB_TOOLSETS: An environment variable that determines which tool groups are active. The default includescontext,repos,issues,pull_requests, andusers. Set it topull_requests,issuesso the bot only sees pull requests and issues, not general repo tools that are unnecessary for review.--read-only: A flag that overrides everything. When it is on, write tools are blocked even if explicitly requested. If you want the bot to actually post a review comment, do not enable this flag, but restrict the Toolset so that the only write-enabled tool exposed is the comments tool, such asadd_pull_request_review_commentoradd_issue_comment.
Comparison table: built-in connector vs. custom MCP
| Criterion | Built-in connector | Official MCP server |
|---|---|---|
| Setup time | Minutes, a click in Plugins | Slightly more, server address and auth |
| Permission control | As defined by SpaceXAI | Precise, via GITHUB_TOOLSETS and --read-only flag |
| Actually posting a comment on a PR | Not documented in the official announcement | Documented, with a specific write tool |
| Best suited for | Initial reading and summarizing | Code review with actual comments, under controlled permissions |
Step 3: A mandate for Grok Bot, what it may and may not do
Just like an AI employee managing WhatsApp, a Grok Bot that reviews code needs an explicit mandate, not just a technical connection. This list takes five minutes and is the difference between useful review and real risk:
It may:
- Read the diff of an open Pull Request.
- Read additional files in the repo for context.
- Post one review as a comment on the PR, with findings and a priority rating.
- Respond to an explicit request to re-review after a commit is pushed.
It may not, without exception:
- Merge a Pull Request.
- Push a commit or modify a file in the repo.
- Delete a branch.
- Approve a PR on behalf of a human reviewer.
The second list is the one that matters. Just as the calendar permission I examined in the guide on a first AI employee with Grok Bot separates reading from writing, here the separation between "read and evaluate" and "actually change" is what keeps control in your hands.
Step 4: From Grok Bot's review back to Claude Code
Here is what the full loop looks like, end to end:
- Claude Code finishes a task on a branch and opens a Pull Request.
- You ask Grok Bot to review the specific PR, by name or URL.
- Grok Bot reads the diff through its GitHub connection and posts a review as a comment on the PR itself.
- You read the review and decide: merge as is, request a fix, or dismiss a finding you believe is incorrect.
- If a fix is needed, you ask Claude Code to fix it on the same branch, not a new one, and push an additional commit.
- Return to step 2 and ask Grok Bot to review again, until the review comes back clean.
No step here runs without a request from you. That is exactly the difference between "two agents managing a process between themselves" and "two tools you operate in sequence, with Git as their shared rulebook."
What about Claude's own built-in code review?
It is worth knowing that Anthropic itself offers a service called Code Review, which runs automatically on every Pull Request and posts findings as inline comments tagged by severity (🔴 critical, 🟡 note, 🟣 pre-existing bug), at an average cost of 15 to 25 dollars per review, on the Team and Enterprise plans. There is also a more local and free option, the /code-review command, which runs in the terminal and can post findings as a comment on a PR with the --comment flag.
That service is good, but it is exactly the case the original question was trying to work around: Claude reviewing Claude. Grok Bot, which is based on a model from a different company with a completely independent perspective, provides a second opinion that does not share the same biases. The real value is running both methods side by side, not choosing just one.
Common mistakes
- Giving Grok Bot write access to the content "so it can fix things too." This eliminates the entire advantage of independent external review and turns it into a second developer with no oversight.
- Waiting for the review to run automatically on every PR. Without a GitHub Action of your own, every new check requires an explicit request to Grok Bot.
- Asking Claude Code to open a new branch for the fix. This breaks the history. The fix needs to land on the same branch the PR is open against.
- Settling for the built-in connector when you need an actual comment on the PR. If the official announcement does not specify write permissions, do not assume they exist. Test with the official MCP server instead.
- Not reading the finding before triggering a fix. AI reviews make mistakes too, and without a human read-through you are passing one error to a second agent that will fix it as if it were correct.
Frequently Asked Questions
Can Grok Bot control Claude Code directly, like a manager giving orders to an employee?
No, and there is no official interface for that. There is no API connecting one AI agent to directly control another. The approach that actually works is indirect: Claude Code works on a Git branch and opens a Pull Request, Grok Bot reads the changes through its GitHub connection and posts a review as a comment, and you, not either of the agents, decide what happens next. Git is the intermediary, not a direct link between agents.
What permissions should Grok Bot have on GitHub so it can review without putting the code at risk?
Read permissions on the content and history, and write permissions only on Pull Request messages and comments, with no write permissions on the content itself and no merge permissions. With the official GitHub MCP server, this is done using the GITHUB_TOOLSETS environment variable, restricted to pull_requests and issues, and without the --read-only flag if you want the bot to be able to write comments. The --read-only flag overrides everything: when it is on, all write tools are blocked even if explicitly requested.
What is the difference between Grok's built-in GitHub connector and the official GitHub MCP server?
The built-in connector connects with one click from Plugins in Grok, and according to the SpaceXAI announcement it allows Grok to search code, summarize Pull Requests, and review changes, without specifying exact write permissions. The official GitHub MCP server, connected as a Custom Connector, gives explicit control: which tool sets are active, and whether write tools are permitted at all. Anyone who wants to ensure the bot can post a review comment and not much else is better off with the official MCP server.
How does Claude Code itself create the Pull Request that Grok Bot will review?
Claude Code works on a separate branch from main, and at the end of the task it opens a Pull Request on GitHub. Anthropic's documented way to install this infrastructure is the /install-github-app command from within Claude Code, which installs the official Claude GitHub App, adds an authorization secret to the repository, and opens a Pull Request with the ready-made workflow file. From there, every @claude tag in a Pull Request or issue triggers the agent.
Can you use Claude's own built-in review service instead of Grok Bot?
Yes, and Anthropic offers such a service called Code Review, which runs automatically on every Pull Request and publishes findings tagged by severity, at an average cost of 15 to 25 dollars per review. But that is exactly the same company that wrote the code with Claude Code reviewing it with Claude. Grok Bot provides a second opinion from a model made by a different company, and that is precisely the value of running both methods side by side rather than choosing only one.
What do you do when Grok Bot finds a bug in the review it posted?
Read the comment Grok Bot posted on the Pull Request, and ask Claude Code to fix it on the same branch, not on a new branch. Claude Code pushes an additional commit, and you ask Grok Bot to review the change again, as a new comment on the same PR. Nothing in this flow happens automatically without a request from you, and that is exactly the principle this guide is built on: human approval between every two steps.
The Bottom Line
The answer to the question from the group is short: there is no way to connect Grok Bot to directly manage Claude Code, and there should not be. There is a more nuanced approach, one where Git serves as the intermediary. Claude Code writes on a branch and opens a Pull Request, Grok Bot reads and posts a review, and you are in the middle of every step. This is not a limitation, it is exactly the architecture that human development teams use as well.
Anyone who wants to go one level deeper and understand how to build a full charter for Grok Bot, with approval boundaries and output verification, will find it in the Grok Bot 2026 Course: From Agent to Employee, for 9.90 ILS.
Sources
- SpaceXAI: Grok Connectors Announcement (checked 2026-09-29)
- Official Documentation: Connectors in Grok (checked 2026-09-29)
- GitHub: Official GitHub MCP Server (checked 2026-09-29)
- Anthropic, Official Documentation: Claude Code GitHub Actions (checked 2026-09-29)
- Anthropic, Official Documentation: Code Review (checked 2026-09-29)
- Anthropic: claude-code-action tool (checked 2026-09-29)
