For the complete documentation index, see llms.txt. This page is also available as Markdown.
Developer

Vortex with the MCP server

How to install Vortex by configuring the SonarQube MCP server into any agent

Vortex can be used through the SonarQube MCP server if the CLI does not offer a specific integration for your agent.

Prerequisites

  • Vortex can only be used through MCP with the local (stdio) version of the SonarQube MCP server, because it needs access to local files to perform the analysis. The SonarQube-hosted MCP server, reached over HTTP, cannot be used for Vortex.

  • The SonarQube MCP Server requires a Docker-compatible installation, for example Docker Desktop or Colima on macOS.

Step 1: Export the SonarQube token environment variable

Export the SONARQUBE_TOKEN Common variables with a valid Personal Access Token (PAT) for your project.

# macOS/Linux (Bash/Zsh)
export SONARQUBE_TOKEN="{<YourUserToken>}"

Step 2: Add or edit your MCP configuration file

MCP settings files are located at the following paths:

  • .cursor/mcp.json for Cursor IDE

  • .mcp.json for Claude Code

  • ~/.gemini/config/mcp_config.json for Antigravity

  • .codex/config.toml for Codex

    • use a TOML config instead of JSON

  • .vscode/mcp.json for Copilot in Visual Studio Code

Note: Replace the placeholders above with appropriate values. ⚠️ The path format is critical:

  • Paths must be absolute. Relative paths like ./ or ../ are not accepted.

  • On Windows, use forward slashes, for example C:/Users/john/projects/myapp. Don't use back slashes, for example C:\\Users\\john\\projects\\myapp.

The SONARQUBE_TOOLSETS value determines which MCP toolsets are enabled. The configuration below enables the analysis, cag and projects toolsets required for Sonar Vortex.

Note: Optional configurations:

  • Include default SonarQube MCP tools: To include the default SonarQube MCP tools in addition to the Agentic Workflow tools, change the SONARQUBE_TOOLSETS value to: "analysis,issues,projects,quality-gates,rules,duplications,measures,security-hotspots,dependency-risks,coverage,cag".

  • Read-only volume mounting of the project workspace: The project workspace can be mounted in read-only mode by specifying ro instead of rw. Some tools may work in degraded mode.

Tool usage can be inconsistent depending on available tools, context, and agent behavior. To ensure the agent follows the Guide-and-Verify workflow consistently, explicitly guide your AI agent to use the Sonar Vortex tools appropriately.

Add the directive to your agent's system prompt or instructions file.

Example directive:

Step 4: Restart your agent

Restart your agent and make sure that your MCP configuration is taken into account and applied correctly.

Step 5: Verify your setup

  1. Ask your agent "What is Guide and Verify?" You should see a description of the SonarQube Agentic workflow as configured in step 3.

Example response

  1. Ask your agent "Verify the file path/to/file.java." You should see it invoke the run_advanced_analysis tool (it might ask for confirmation). You should see a report of which issues are currently present in the file, broken down by severity.

Example response

Last updated

Was this helpful?