Windsurf

Set up the SonarQube MCP Server in Windsurf and start using Sonar tools from your agent.

Windsurfarrow-up-right is an agentic IDE from Codeium. Use this setup when you want Sonar tools available within the Cascade AI agent in Windsurf.

Windsurf lists the SonarQube MCP Server as a security-focused extensionarrow-up-right.

Set up MCP for Windsurf

Environment variables

The following Common variables are required. Note that SONARQUBE_TOKEN applies to stdio transport only. For HTTP, HTTPS, or the embedded SonarQube Cloud MCP server, use the Authorization: Bearer <YourSonarQubeUserToken> header instead.

  • SONARQUBE_TOKEN: Your SonarQube user token (stdio transport).

  • SONARQUBE_ORG: Your SonarQube Cloud organization key. Required for SonarQube Cloud only.

  • SONARQUBE_URL: Your SonarQube Server or Community Build URL. Also required for SonarQube Cloud in the US region (https://sonarqube.us). Not needed for SonarQube Cloud in the EU region.

triangle-exclamation

Connection and transport

Automatic MCP configuration

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.

If you've connected to a SonarQube Cloud organization in the US region, the configuration details will be shared.

Check out our YouTube demo to watch the Windsurf & SonarQube MCP Server integration in action.

circle-info

Windsurf subscribers on Team & Enterprise plans should add the SonarQube MCP Server to the list of allowed servers. See the Windsurf documentation about Admin Controlsarrow-up-right.

With an HTTP transport server

Please see the Transport mode article for details and code samples.

Manual configuration

The SonarQube MCP Server is available in the Windsurf MCP Marketplace for the Cascade MCP clientarrow-up-right. Follow these instructions:

  1. Open Windsurf Settings > Cascade > MCP Servers and select Open MCP Marketplace.

  2. Search for sonarqube on the Cascade MCP Marketplace.

  3. Choose the SonarQube MCP Server and select Install.

  4. Add the required SonarQube user token. Then add an organization key if you want to connect with SonarQube Cloud, or the SonarQube URL if you want to connect to SonarQube Server or SonarQube Community Build.

circle-check
circle-exclamation

Use Sonar tools from Windsurf

Once connected, you can use the tools provided by the SonarQube MCP Server in the Windsurf agent mode. See the Tools page for the full list of available tools.

See also the Windsurf documentationarrow-up-right for information on adding explicit context.

circle-info

Concrete workflow examples for this IDE will be added after engineering review.

Last updated

Was this helpful?