IDE SetupVS Code

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:

AgentWhat It Catches
SecuritySQL injection, XSS, hardcoded secrets, auth flaws
PerformanceN+1 queries, memory leaks, unnecessary re-renders
ArchitectureSOLID violations, circular dependencies, tight coupling
Code QualityDead code, duplicated logic, naming issues
Best PracticesAnti-patterns, deprecated API usage, missing edge cases
Error HandlingUnhandled promises, swallowed exceptions, missing validation
MaintainabilityComplex 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

ModeCommandUse Case
Review & CommitMesrai: Review & CommitGate your commits with an AI review
Review UncommittedMesrai: Review Uncommitted ChangesCheck all working tree changes
Review UnpushedMesrai: Review Unpushed CommitsReview everything before pushing
Review Current FileRight-click > Mesrai: Review Current FileQuick check on a single file

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-vscode

Sign 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

SettingDefaultDescription
mesrai.apiUrlhttps://app.mesrai.comMesrai API endpoint
mesrai.tokenIDE access token (msr_...) for manual auth
mesrai.preCommitReviewtruePrompt for AI review before each commit
mesrai.severityThresholdlowMinimum severity level to display findings

Requirements

RequirementDetails
VS Code1.85 or later
GitInstalled and a Git repository open in your workspace
Mesrai AccountCreate one for free

Uninstall

To remove the Mesrai extension:

  1. Open Extensions panel (Cmd+Shift+X / Ctrl+Shift+X)
  2. Search for “Mesrai”
  3. Click Uninstall

Or via command line:

code --uninstall-extension MesraiDev.mesrai-vscode

Next Steps


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