ReviewGuard — Claude Code MCP server: PR reviews without token exposure
Keeps the write-enabled GitHub token on the server side and hands the agent review operations only. Draft comments stay invisible until a human submits.
claude mcp add review-guard -e GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y @eclipsesource/review-guard-mcpWhat ReviewGuard does
Leaving review comments in a pull request takes a GitHub token with write access. Handing that token straight to an agent opens the door to prompt-injected approvals, change requests, or edits in unrelated repositories. ReviewGuard sits in between: the token never reaches the agent, and the permitted operations are locked in when the server starts. The agent cannot renegotiate them.
Pending mode is what you get by default. The agent reads the PR discussion and builds a draft review; none of it becomes visible until someone opens the pull request and submits the review themselves. The submit tool is not registered at all in this mode, and the client refuses every submit call. That fits IDE workflows where the agent drafts inline notes and a person stays the reviewer of record.
Autonomous posting is opt-in through --allow-submit with a list of allowed actions (approve, comment, reject). The submit tool appears, yet every posted review opens with a fixed disclaimer the agent can neither edit nor drop. Add --allow-resolve and the agent may close its own threads only; --repo and --pr pin the server to a single pull request. Node.js >= 22 is required, and the server will not start without GITHUB_TOKEN.
What it helps with
- let an agent comment on PRs without handing it a write token
- build a draft review a human submits later
- run a bot that posts comments and never approves
- resolve your own stale threads after a new push
- keep the agent scoped to one pull request
Example prompts for the agent
- Pull the review context for this PR and add a comment about error handling in
src/api.ts - Draft a review of the latest commit, don't submit anything
- Submit the review with comments only, no approval
How to install ReviewGuard
Platform CLI
claude mcp add review-guard -e GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y @eclipsesource/review-guard-mcpReplace <…> with your own values
Platform CLI
codex mcp add reviewguard --env GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y @eclipsesource/review-guard-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"reviewguard": {
"command": "npx",
"args": [
"-y",
"@eclipsesource/review-guard-mcp"
],
"env": {
"GITHUB_TOKEN": "<GITHUB_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"reviewguard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@eclipsesource/review-guard-mcp"
],
"env": {
"GITHUB_TOKEN": "<GITHUB_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GITHUB_TOKEN=<GITHUB_TOKEN> reviewguard npx -y @eclipsesource/review-guard-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ReviewGuard
How do I install ReviewGuard in Claude Code?
Run claude mcp add review-guard -e GITHUB_TOKEN=<GITHUB_TOKEN> -- npx -y @eclipsesource/review-guard-mcp. Use your own token, scoped to the repository you need.
What does ReviewGuard do?
It holds the GitHub write token server-side and exposes review operations to the agent. By default the agent produces a draft that a human submits.
How do I let the agent post reviews itself?
Start the server with --allow-submit and the actions you allow, for example --allow-submit approve,comment. Each posted review carries a fixed disclaimer the agent cannot remove.