SonarQube for VS Code in Cursor
SonarQube for VS Code helps bring analysis of AI-generated code to your IDE. This page has installation and migration instructions in addition to features designed specifically for Cursor.
Installation
The SonarQube for VS Code extension can easily be installed in Cursor from either the Open VSX registry or by using Cursor’s Profile Migration tool.
To install the SonarQube for VS Code extension in Cursor:
Open the Extensions view by pressing
Ctrl + Shift + X
(orCmd + Shift + X
on Mac).Search for
sonarqube
.Finish the installation by selecting the Install button
Once installed, we recommended using connected mode and setting up the SonarQube MCP server with SonarQube Server or SonarQube Cloud to strengthen your AI integration with SonarQube. Note that although Cursor has migrated your extension, your SonarQube token is in secure storage and will not be migrated; you will be prompted to reauthenticate your connection.
SonarQube MCP Server
The SonarQube MCP Server is a Model Context Protocol (MCP) server that runs locally and enables a seamless connection between your AI agents and your SonarQube platform. The tools are designed to bridge the divide between productivity and quality. Please see the full details on the SonarQube MCP Server page.
Setup the SonarQube MCP Server
When you're using an AI-enabled IDE such as Cursor, Windsurf, or VS Code with Copilot enabled, and have already completed your Connected mode setup in SonarQube for IDE with SonarQube Server or SonarQube Cloud, a quick select button is available.
Select the
icon, Configure MCP Server from the CONNECTED MODE view window to use your connected mode credentials to start using the SonarQube MCP Server. The same workflow is available in the AI AGENTS CONFIGURATION view.

More information about the available tools can be found on the SonarQube MCP Server page.
Configure your AI agent
The AI AGENTS CONFIGURATION view is only available when running an AI-enabled agent and offers two tools to help your AI agent engage with SonarQube (Server, Cloud).
Select Configure SonarQube MCP Server to use your connected mode credentials to install the SonarQube MCP Server. You will be prompted to complete your Connected mode setup if none exists.
Available in Cursor only: Select Introduce SonarQube Rules File to create explicit instructions for your AI-powered IDE to produce secure, reliable, and maintainable code.
The file provides SonarQube MCP Server instructions to your AI Agent. As an example, it instructs the agent to disable SonarQube automatic analysis before starting code generation, and to enable it after the generation is complete. It also asks the agent to analyze changed files in batches, once the changes are done.
Related pages
SonarQube and AI agents in your IDE
Getting started with other Supported IDEs
Last updated
Was this helpful?