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
- Navigate to mesrai.com
- Click the Console button (top-right corner)
- 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:
| Option | Description | Best For |
|---|---|---|
| Connect Repositories | Installs the GitHub App immediately. Start reviewing code instantly. | Fastest setup (Recommended) |
| Skip for Now | Takes 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:
- GitHub installs the Mesrai App (takes 2-3 seconds)
- Webhooks are automatically configured
- 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:
| Stage | Time |
|---|---|
| Detection â Mesrai receives webhook from GitHub | 1-2 seconds |
| Analysis â AI reviews code changes | 8-10 seconds |
| Findings Posted â Comments appear on GitHub | 2-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):
- Go to any connected GitHub repository
- Navigate to Settings â Webhooks
- Find the Mesrai webhook
Expected configuration:
| Setting | Value |
|---|---|
| Payload URL | https://api.mesrai.com/webhooks/github |
| Content type | application/json |
| Events | Pull requests, Push, Pull request reviews |
| Status | Recent deliveries successful (green checkmark) |
Test Your First Review
Create a test pull request:
- Make a small code change in any connected repository
- Open a pull request
- Wait 10-15 seconds
- 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:
- Disable browser extensions (especially ad blockers)
- Try incognito/private mode
- Clear browser cache and cookies
- Try a different browser
Problem: Stuck on âRedirectingâŚâ
Solution:
- Check if pop-ups are blocked (allow pop-ups for mesrai.com)
- Wait 30 seconds â sometimes GitHub authorization takes time
- Refresh the page and try again
- Check browser console for errors (F12 â Console tab)
Problem: Donât see repositories after installation
Solution:
- Click the Sync Repositories button on the dashboard
- Wait 10-20 seconds for sync to complete
- Refresh the page
- Verify you have admin access to the repositories
- 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
- Go to github.com/settings/installations
- Find Mesrai â Click Configure
- Add missing repositories
- Click Save
Webhook Issues
Problem: Webhook shows errors in GitHub
Check webhook status:
- GitHub repo â Settings â Webhooks
- Click on Mesrai webhook
- Go to Recent Deliveries tab
- Click on any delivery to see details
Common errors:
| Error | Cause | Solution |
|---|---|---|
| Connection timeout | Temporary network issue | GitHub retries automatically, wait a few minutes |
| 404 Not Found | Webhook URL incorrect or outdated | Re-install the GitHub App |
| 401 Unauthorized | Authentication expired | Re-authorize Mesrai in your dashboard settings |
| 500 Internal Server Error | Temporary server issue | Check status.mesrai.com or contact support |
Advanced Configuration
Organization-Wide Settings
For organization admins:
- Go to app.mesrai.com/settings
- Navigate to Organization Settings
- Configure:
- Default review behavior
- Auto-labeling preferences
- Notification settings
- Team member access
Repository-Specific Settings
Customize per repository:
- Go to Mesrai Dashboard â Repositories
- Click on a specific repository
- Configure:
- Review triggers (every push vs. PR open only)
- Severity threshold (which issues to report)
- Excluded file paths
- Custom rules
Need Help?
Support Channels
- Email: support@mesrai.com
- Discord: discord.gg/mesrai
- Documentation: docs.mesrai.com
- Bug Reports: github.com/mesrai/issues
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
Next: Learn about GitHub Integration â