Mesrai
All integrations
GitHub · Pull requests

AI code review for GitHub pull requests.

Install the Mesrai GitHub App and every pull request gets an automatic AI code review — bugs, security risks, performance problems and architecture impact, posted as inline comments with suggested fixes, by specialised agents that understand your whole repository, not just the diff.

Platform
GitHub pull requests
Connects with
GitHub App
Reviews
Every PR, or on demand
GitHubExample
#1842Add team invite endpointfeat/team-invites → main
src/routes/invites.ts
31const team = await db.team.findUnique({ where: { id: req.params.teamId } });
MesraiSecurity agentMUST_FIX

Any signed-in user can create invites for any team: the handler loads the team by id but never checks that the caller is a member with the admin role. Verify membership before creating the invite.

I.

Why GitHub teams add AI code review

  • 01

    Pull requests wait hours or days for a reviewer, and the waiting slows every release.

  • 02

    Reviewers read the diff, so changes that break code outside the diff slip through.

  • 03

    Authorization gaps, injection risks and leaked secrets look like ordinary code in a busy review.

  • 04

    AI-written code arrives faster than people can review it carefully.

II.

What Mesrai reviews on every pull request

Bugs and logic errors

Incorrect conditions, unhandled errors, race conditions and broken edge cases in the changed code.

Security risks

Missing authorization, injection, secrets committed to the repository and other vulnerability patterns.

Performance problems

N+1 queries, unbounded loads and expensive work in hot paths, each with a suggested fix.

Architecture impact

A repository graph built from the syntax tree shows how the change reaches code outside the diff.

Your team's rules

Mesrai Rules turn your conventions into automatic checks, written in plain English or YAML, per repository or for the whole organization.

Linked tasks

Business logic validation compares the pull request with the requirements in its linked task or ticket.

III.

How Mesrai works with GitHub

  1. 01

    The Mesrai GitHub App receives an event when a pull request is opened or updated.

  2. 02

    Mesrai reads the changes and builds context from the repository graph.

  3. 03

    Specialised agents review the change in parallel: general, bugs, security, performance and Mesrai Rules.

  4. 04

    Findings are posted as inline comments with code suggestions directly on the pull request.

  5. 05

    Comment @mesrai start-review on any pull request to run a review on demand.

  6. 06

    A mesrai-config.yml file in the repository root overrides the web settings for that repository.

IV.

Set up in a few minutes

GitHub connects through the Mesrai GitHub App. Organizations with stricter permissions can use a fine-grained personal access token instead.

  1. 1

    Create a Mesrai account and choose GitHub.

  2. 2

    Install the Mesrai GitHub App when prompted.

  3. 3

    Select the repositories Mesrai should review.

  4. 4

    Open a pull request — Mesrai reviews it automatically and posts comments.

Full GitHub setup guide

Fine-grained token permissions (optional)

Contents · Pull requests
Read and write — read the code and post review comments
Webhooks
Read and write — receive pull request events
Actions · Commit statuses · Deployments · Issues · Metadata
Read only — context for the review
Organization members
Read only — identify reviewers and authors
Pricing
Every feature is free for 14 days with no credit card. After the trial, Pro is ₹499 / $6 per developer per month on your own LLM key (BYOK) — you pay your AI provider directly, with no markup.

Only needed when you connect with a fine-grained personal access token instead of the GitHub App. Choose an expiry of 180 days or more.

V.

Mesrai for GitHub — frequently asked

6 questions
  • How do I add AI code review to GitHub?

    +

    Create a Mesrai account, install the Mesrai GitHub App, and select the repositories to review. From then on every pull request is reviewed automatically and the findings appear as inline comments on the pull request.

  • Can I run a review only when I ask for it?

    +

    Yes. Besides automatic reviews on every pull request, you can comment @mesrai start-review on a pull request to start a review on demand.

  • Does Mesrai work with private repositories and organizations?

    +

    Yes. Install the GitHub App on your organization and choose which repositories Mesrai can access. Organizations with stricter permission policies can connect with a fine-grained personal access token instead.

  • Can each repository have its own review settings?

    +

    Yes. Add a mesrai-config.yml file to a repository's root to customise review behaviour for that repository. It overrides the web settings automatically.

  • Which AI model reviews our code?

    +

    You choose. Mesrai is BYOK: connect your own key from OpenAI, Anthropic, Google, AWS Bedrock or any OpenAI-compatible provider, and you pay that provider directly.

  • Is our code used to train AI models?

    +

    No. Your code is never used to train any model. See the data usage page in the docs for how code is processed during a review.

Try Mesrai on your next pull request.

14-day free trial · every feature unlocked · no credit card required.

Start free