Cursor
Install SonarQube for VS Code in Cursor, set up connected mode, and configure SonarQube MCP Server or CLI integration.
Installation
The SonarQube for VS Code extension can easily be installed in Cursor from either the Open VSX registry or by using Cursor’s VS Code Migration tools.
To install the SonarQube for VS Code extension in Cursor:
Open the Extensions view by pressing
Ctrl + Shift + X(orCmd + Shift + Xon Mac).Search for
sonarqube.Finish the installation by selecting the Install button
Once installed, set up connected mode if you want to configure a self-hosted SonarQube MCP Server for Cursor. Open the AI Integrations view to set up your CLI integration for a supported agent.
Migrate extensions from VS Code
Cursor provides a workflow to import your VS Code settings, including your extensions.
If you were using connected mode or the SonarQube MCP Server, your SonarQube token will not be migrated but you will be prompted to reauthenticate any connections you created in VS Code.
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 in the SonarQube SonarQube MCP Server documentation.
Setup the SonarQube MCP Server
Set up a connected-mode connection to SonarQube Server or SonarQube Cloud
Open SonarQube Setup > AI Integrations, and expand Manage agents in the SonarQube MCP Server card. The Cursor row shows the configuration file that will be updated
Select Set up in the Cursor row, then select the IDE connection to use if you have more than one. The extension updates only Cursor's configuration file
Use Open configuration to inspect an existing entry. Select MCP configuration guide, at the bottom of the card, for manual setup instructions
Self-hosted MCP setup does not require SonarQube CLI installation or CLI authentication. This view only configures a self-hosted MCP server, not the SonarQube Server-hosted or SonarQube Cloud-hosted MCP server. Its status describes the file it inspected:
Not configured: Select Set up to create the SonarQube entry
Configured: A self-hosted SonarQube entry exists. Select Open configuration to inspect it
Managed by CLI: The inspected file contains an entry managed by the SonarQube CLI. Open the file to inspect it; self-hosted setup does not change that entry
Needs attention: The file is malformed or its
sonarqubeentry cannot be managed by this view. Select Open configuration to inspect the diagnostic. An existing MCP connection may still work
At startup, the extension refreshes SONARQUBE_IDE_PORT only in a recognized self-hosted entry that already has that key. It does not add a missing key or change the server URL, token, or other settings.
The view currently checks for an MCP entry named sonarqube. A URL-based, cloud-hosted entry with that name may show Needs attention, but the extension does not replace it. An entry under another name remains untouched but is not recognized as the SonarQube entry, so Set up may create a separate sonarqube entry.
The extension preserves unrelated configuration when it updates a supported file. It does not replace malformed configuration with an empty file or overwrite an entry managed by the SonarQube CLI. If it detects legacy agent instructions in your workspace, Open file opens those instructions for review.
Self-hosted MCP setup is unavailable in remote IDE windows. Use the documentation links or open an existing configuration file.
For manual setup, see the Cursor quickstart guide. More information about the available tools can be found in the SonarQube MCP Server documentation, on the SonarQube MCP Server tools page.
Configure your AI agent
Open SonarQube Setup > AI Integrations to see detected agents and the available SonarQube CLI and self-hosted MCP actions. Expand Manage agents in either card to see each agent's status. Detection alone does not confirm that SonarQube integration has been completed. See the MCP quickstart guides for manual setup instructions.
Related pages
Getting started with other Supported IDEs
Related online courses
Last updated
Was this helpful?

