SetupInstallation

Mesrai Installation Guide

Video Walkthrough

Watch the complete installation and setup process:

Quick Start

Get started in 60 seconds:

Login to Mesrai

Visit mesrai.com → Click Console → Sign in with GitHub

Connect Repositories

Click Connect Repositories on the setup page

Select Your Repositories

Choose which repositories to enable (or select All repositories)

Complete Installation

Click Install and you’re done!

Start Reviewing

Open any pull request and get your first AI review automatically in ~60 seconds


Detailed Installation

Prerequisites

Before installing Mesrai, ensure you have:

  • GitHub account (personal or organization)
  • Admin access to repositories you want to review
  • Modern browser (Chrome, Firefox, Safari, or Edge)

Installation Steps

Step 1: Access Mesrai Console

  1. Navigate to mesrai.com
  2. Click the Console button (top-right corner)
  3. You’ll be redirected to app.mesrai.com

Step 2: Sign In with GitHub

Click Continue with GitHub to authenticate.

First-time users:

  • GitHub will ask you to authorize Mesrai
  • Review the permissions (read code, post comments, etc.)
  • Click Authorize to continue

Returning users:

  • If you’ve already authorized Mesrai, you’ll skip this step
  • You’ll go directly to the Mesrai setup page

Privacy Note: Mesrai never stores your source code. All analysis happens in memory and is deleted immediately after review.

Step 3: Choose Setup Option

On the setup page, you’ll see two options:

OptionDescriptionBest For
Connect RepositoriesInstalls the GitHub App immediately. Start reviewing code instantly.Fastest setup (Recommended)
Skip for NowTakes you to the dashboard. Install the GitHub App later.Exploring settings first

For this guide, we’ll choose Connect Repositories for the fastest setup. Click the Connect Repositories button.

Step 4: Install GitHub App

You’ll be redirected to GitHub’s official installation page for the Mesrai App.

Select Organization/Account:

Choose where to install Mesrai:

  • Personal Account — For your personal repositories
  • Organization — For team/company repositories (requires admin access)

If installing for a team, select your organization from the dropdown.

Step 5: Choose Repositories

Next, select which repositories Mesrai should review:

Option A: All Repositories (Recommended)

  • Mesrai reviews all current repositories
  • Automatically includes future repositories
  • Simplest setup for teams
  • You can exclude specific repos later in settings

Option B: Only Select Repositories

  • Choose specific repositories
  • More granular control
  • Add more repositories anytime
  • Good for testing or sensitive projects

For this guide, select All repositories to enable Mesrai everywhere.

Step 6: Complete Installation

Click the blue Install button at the bottom of the page.

What happens next:

  1. GitHub installs the Mesrai App (takes 2-3 seconds)
  2. Webhooks are automatically configured
  3. You’re redirected back to app.mesrai.com

Step 7: View Your Connected Repositories

You’re now on the Mesrai Dashboard!

You’ll see:

  • List of all connected repositories
  • Installation status: Active
  • Repository sync status
  • Ready to review PRs

Click Sync Repositories if you don’t see all your repos immediately — this refreshes the connection.


What Happens After Installation

Automatic Reviews Start Immediately

From now on, Mesrai will automatically review:

  • Every new pull request opened
  • Every commit pushed to an existing PR
  • All code changes in connected repositories

Review Timeline

When a PR is opened:

StageTime
Detection — Mesrai receives webhook from GitHub1-2 seconds
Analysis — AI reviews code changes8-10 seconds
Findings Posted — Comments appear on GitHub2-3 seconds
Total Time~12-15 seconds

What You’ll See on GitHub

Mesrai posts:

  • Inline comments on specific code lines with issues
  • Severity levels (Critical, High, Medium, Low)
  • Fix suggestions with one-click apply (when possible)
  • Summary comment with overall quality score

Verification

Verify Installation

Check your Mesrai dashboard at app.mesrai.com/dashboard:

  • Installation status: Active
  • Repositories: List of connected repos
  • GitHub: Connected (green indicator)

Verify Webhooks

Webhooks are automatically configured by GitHub during installation.

To verify (optional):

  1. Go to any connected GitHub repository
  2. Navigate to Settings → Webhooks
  3. Find the Mesrai webhook

Expected configuration:

SettingValue
Payload URLhttps://api.mesrai.com/webhooks/github
Content typeapplication/json
EventsPull requests, Push, Pull request reviews
StatusRecent deliveries successful (green checkmark)

Test Your First Review

Create a test pull request:

  1. Make a small code change in any connected repository
  2. Open a pull request
  3. Wait 10-15 seconds
  4. Check the PR for Mesrai’s review comments

Example test change:

// Add this to any .js file
function test() {
  const user = db.query(`SELECT * FROM users WHERE id = ${userId}`);
}

Mesrai will detect the SQL injection vulnerability and post a comment with a fix suggestion!


Troubleshooting

Installation Issues

Problem: “Authorize” button doesn’t work

Solution:

  1. Disable browser extensions (especially ad blockers)
  2. Try incognito/private mode
  3. Clear browser cache and cookies
  4. Try a different browser

Problem: Stuck on “Redirecting…”

Solution:

  1. Check if pop-ups are blocked (allow pop-ups for mesrai.com)
  2. Wait 30 seconds — sometimes GitHub authorization takes time
  3. Refresh the page and try again
  4. Check browser console for errors (F12 → Console tab)

Problem: Don’t see repositories after installation

Solution:

  1. Click the Sync Repositories button on the dashboard
  2. Wait 10-20 seconds for sync to complete
  3. Refresh the page
  4. Verify you have admin access to the repositories
  5. Check that repositories aren’t archived or private (if on free plan)

Review Not Appearing

Problem: No review comments on PR

Possible causes & solutions:

1. Repository not synced

  • Go to Mesrai dashboard → Repositories
  • Verify repository shows Active status
  • Click Sync if status is Pending

2. Webhook delivery failed

  • Go to GitHub repo → Settings → Webhooks
  • Click on Mesrai webhook → “Recent Deliveries”
  • Check if deliveries show errors
  • Solution: Re-install the GitHub App

3. PR from forked repository

  • GitHub security prevents automatic triggers from forks
  • Solution: Manually approve workflow in GitHub (coming soon)

4. First review taking longer

  • First reviews can take 20-30 seconds (codebase indexing)
  • Solution: Wait a bit longer, refresh PR page

5. Only non-code files changed

  • Mesrai skips PRs with only README, config, or documentation changes
  • This is expected behavior

Permission Errors

Problem: “Insufficient permissions” or “Access denied”

1. Verify admin access

  • You need admin/owner role on the repository
  • Check: Repository → Settings → Manage Access
  • Solution: Ask repo admin to grant you access or install Mesrai

2. Organization restrictions

  • Your organization may restrict third-party apps
  • Check: Organization Settings → Third-party application access policy
  • Solution: Ask org admin to approve Mesrai

3. Re-authorize the app

Webhook Issues

Problem: Webhook shows errors in GitHub

Check webhook status:

  1. GitHub repo → Settings → Webhooks
  2. Click on Mesrai webhook
  3. Go to Recent Deliveries tab
  4. Click on any delivery to see details

Common errors:

ErrorCauseSolution
Connection timeoutTemporary network issueGitHub retries automatically, wait a few minutes
404 Not FoundWebhook URL incorrect or outdatedRe-install the GitHub App
401 UnauthorizedAuthentication expiredRe-authorize Mesrai in your dashboard settings
500 Internal Server ErrorTemporary server issueCheck status.mesrai.com or contact support

Advanced Configuration

Organization-Wide Settings

For organization admins:

  1. Go to app.mesrai.com/settings
  2. Navigate to Organization Settings
  3. Configure:
    • Default review behavior
    • Auto-labeling preferences
    • Notification settings
    • Team member access

Repository-Specific Settings

Customize per repository:

  1. Go to Mesrai Dashboard → Repositories
  2. Click on a specific repository
  3. Configure:
    • Review triggers (every push vs. PR open only)
    • Severity threshold (which issues to report)
    • Excluded file paths
    • Custom rules

Need Help?

Support Channels

When Contacting Support

Please include:

  • GitHub username or organization name
  • Repository name (if applicable)
  • Pull request number (if applicable)
  • Screenshot of any errors
  • Webhook delivery details (from GitHub Settings → Webhooks)

Typical response time: Within 24 hours (weekdays)


Next Steps

Now that Mesrai is installed:

  • Explore Features — Try @mesrai mentions for AI chat in PR comments, use one-click fix suggestions, review the dashboard analytics
  • Invite Your Team — Add team members in Organization Settings, share this guide with your team, set up team notification preferences
  • Customize Settings — Configure review behavior, set up auto-labeling, define excluded file patterns
  • Monitor Code Quality — Check dashboard for quality trends, review team analytics, identify high-risk areas

Summary: Installation Flow

1
Visit mesrai.com
2
Click Console
3
Continue with GitHub
4
GitHub Authorization
5
Connect Repositories
6
GitHub App Installation
7
Select Organization
8
Choose Repositories
9
Click Install
10
Redirected to Dashboard
11
View Connected Repos
12
Installation Complete

Next: Learn about GitHub Integration →