SonarQube Cloud-hosted

The SonarQube Cloud-hosted configuration ensures you use the most up to date version of the SonarQube MCP Server and gives you access to a subset of tools.

To always use the most up to date version of the SonarQube MCP Server, connect directly to the SonarQube Cloud-hosted MCP server. No local setup is required.

Use the SonarQube MCP server embedded in SonarQube Cloud to avoid running and maintaining your own MCP infrastructure while always using the current server version. The embedded server exposes a smaller, fixed subset of tools.

Use the SonarQube Cloud-hosted MCP server to connect your MCP client directly to the SonarQube Cloud API.

Use the configuration generator

Use the official SonarQube MCP Server configuration generator to get a configuration snippet. To do this:

  1. Identify your agent.

  2. Find your common variables.

  3. Enter the information into the SonarQube MCP Server configuration generator with the SonarQube Cloud (embedded) configuration.

  4. Paste the generated configuration into your configuration file.

Manual setup

Add this configuration to your mcp.json file in your AI-enabled client config folder.

Set SONARQUBE_READ_ONLY to false to allow write operations (default is true). Use SONARQUBE_TOOLSETS to restrict which toolsets are loaded; omitting it loads the full default set.

Note: Replace your "url" with https://api.sonarqube.us/mcp if you're connecting to a SonarQube Cloud organization in the US region.

Optional headers include:

  • SONARQUBE_READ_ONLY: Boolean. Set to true to enable read-only mode (default) or false to allow write operations.

  • SONARQUBE_TOOLSETS: The embedded MCP server includes a default list of toolsets. A subset of this list can be defined:

    • analysis,coverage,dependency-risks,duplications,quality-gates,issues,measures,projects,rules,security-hotspots

    • The analysis toolset is only available to subscribers of the Agentic Analysis add-on.

    • For more details about the tools in each toolset, see the SonarQube MCP Server Tools page.

Warning: Using the optional headers replaces the default configuration. For example, when you add "SONARQUBE_TOOLSETS": "issues,projects", you won't load the security-hotspots and quality-gates toolsets.

Tool availability with SonarQube Cloud

When you use the SonarQube MCP Server through SonarQube Cloud, you get a smaller, fixed set of tools compared to running the MCP Server yourself. This is by design and can't be changed:

  • Heavy analysis tools are disabled to protect the shared SonarQube Cloud infrastructure.

  • Context Augmentation tools are not available because they require a local filesystem mount, which the hosted environment cannot provide. To use Context Augmentation tools, set up a local MCP Server using Stdio.

  • Rarely used, non-default tools are excluded to keep the MCP context small and focused.

For the complete list of tools supported by a self-hosted SonarQube MCP Server, see the Tools page.

Last updated

Was this helpful?