Mesrai for VS Code
Mesrai doesn’t just lint your code — it understands context. Each file is analyzed by multiple specialized agents that examine different dimensions of quality, delivering findings as native editor diagnostics directly in your workflow.
Key Features
Intelligent Code Analysis
Each file is analyzed by multiple specialized agents that examine different dimensions of quality:
| Agent | What It Catches |
|---|---|
| Security | SQL injection, XSS, hardcoded secrets, auth flaws |
| Performance | N+1 queries, memory leaks, unnecessary re-renders |
| Architecture | SOLID violations, circular dependencies, tight coupling |
| Code Quality | Dead code, duplicated logic, naming issues |
| Best Practices | Anti-patterns, deprecated API usage, missing edge cases |
| Error Handling | Unhandled promises, swallowed exceptions, missing validation |
| Maintainability | Complex functions, poor abstractions, missing documentation |
Inline Diagnostics
Findings appear as native editor diagnostics — squiggly underlines in your code and entries in the Problems panel, just like ESLint or TypeScript errors.
- Red underline — Critical or High severity
- Yellow underline — Medium severity
- Blue underline — Low or Informational
One-Click Fixes
When Mesrai suggests a code fix, a lightbulb icon appears. Click Quick Fix to apply the suggestion automatically — no copy-pasting needed.
Inline Review Comments
Findings appear as review comments attached directly to the relevant lines, similar to GitHub PR review comments. Each comment includes severity, explanation, and suggested fix when available.
Four Review Modes
| Mode | Command | Use Case |
|---|---|---|
| Review & Commit | Mesrai: Review & Commit | Gate your commits with an AI review |
| Review Uncommitted | Mesrai: Review Uncommitted Changes | Check all working tree changes |
| Review Unpushed | Mesrai: Review Unpushed Commits | Review everything before pushing |
| Review Current File | Right-click > Mesrai: Review Current File | Quick check on a single file |
Sidebar Dashboard
The Mesrai sidebar gives you a complete overview:
- Account status — Plan tier, token usage, organization
- Review actions — One-click access to all review modes
- Findings list — Browse all issues with severity badges and click-to-navigate
- Review statistics — Files analyzed, issues found, severity breakdown
Status Bar Integration
The Mesrai indicator in your status bar shows the current state at a glance — idle, reviewing, or the number of open findings. Click it for quick access to all actions.
Getting Started
Install the Extension
Install Mesrai - AI Code Review from the VS Code Marketplace or search for “Mesrai” in the Extensions panel.
Via Command Line:
code --install-extension MesraiDev.mesrai-vscodeSign In
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and run Mesrai: Log In. You’ll be redirected to your Mesrai dashboard to authorize the extension.
Don’t have an account? Sign up for free — no credit card required.
Run Your First Review
Open any file with changes and right-click > Mesrai: Review Current File. Your code will be analyzed and findings will appear inline within seconds.
Extension Settings
| Setting | Default | Description |
|---|---|---|
mesrai.apiUrl | https://app.mesrai.com | Mesrai API endpoint |
mesrai.token | — | IDE access token (msr_...) for manual auth |
mesrai.preCommitReview | true | Prompt for AI review before each commit |
mesrai.severityThreshold | low | Minimum severity level to display findings |
Requirements
| Requirement | Details |
|---|---|
| VS Code | 1.85 or later |
| Git | Installed and a Git repository open in your workspace |
| Mesrai Account | Create one for free |
Uninstall
To remove the Mesrai extension:
- Open Extensions panel (
Cmd+Shift+X/Ctrl+Shift+X) - Search for “Mesrai”
- Click Uninstall
Or via command line:
code --uninstall-extension MesraiDev.mesrai-vscodeNext Steps
- Install the GitHub App — Get automatic PR reviews alongside your IDE
- AI Review Overview — Learn how Mesrai’s review engine works
- Privacy & Security — How Mesrai handles your code
Support
Need help with the VS Code extension?
- GitHub Issues — Report bugs and request features
- Discord — Chat with the community and Mesrai team
- Email — Reach our support team directly