# code-review MCP server

> Enables AI assistants to review GitHub and GitLab pull requests and merge requests by fetching diffs and posting inline comments.

- Repository: https://github.com/folay-git/code-review-mcp
- Page: https://hostedmcp.org/servers/folay-git/code-review-mcp
- Transport: —
- Stars: 4
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CODE_REVIEW_RULES_DIR` | no | no |  |
| `GITHUB_TOKEN` | no | no |  |
| `GITLAB_HOST` | no | no |  |
| `GITLAB_TOKEN` | no | no |  |

## Tools (7)

- `get_review_rules`
- `get_pr_info`
- `get_pr_changes`
- `extract_related_prs`
- `add_inline_comment`
- `add_pr_comment`
- `batch_add_comments`

## FAQ

### Does it work with self-hosted GitLab?

Yes, you can use self-hosted GitLab by setting the GITLAB_TOKEN and GITLAB_HOST environment variables.

### Which AI clients are supported?

It supports any MCP client, including Cursor, Claude Desktop, and custom integrations using stdio, SSE, or WebSocket.

### Can I add project-specific review rules?

Yes, you can add custom rules by running the init-rules command with the custom flag or by setting the CODE_REVIEW_RULES_DIR environment variable.

### Is my code stored on a server?

No, the server does not use persistent storage; it fetches diffs on demand from GitHub or GitLab APIs using environment variable tokens.
