Mcp server error when validating my class

I created the mcp server on Kubernetes.

 containers:
  - env:
    - name: STORAGE_PATH
      value: /data
    - name: SONARQUBE_MCP_IN_CONTAINER
      value : "true"
    - name: SONARQUBE_TOKEN
      value: "squ_xxxx"
    - name: SONARQUBE_URL
      value: http://xxxx:9000
    - name: SONARQUBE_HTTP_HOST
      value: "0.0.0.0"
    - name: SONARQUBE_HTTP_PORT
      value: "8080"
    - name: SONARQUBE_TRANSPORT
      value: "http"
    image: xxx/sonarqube-mcp:1.25.0.3221

My settings vscode:

{

    "servers": {

        "my-mcp-server-IMI-83b992a3": {

            "url": "https://xxxxxxxxxxxx/mcp",

            "type": "http",

            "headers": {

        "Authorization": "Bearer xxxxxxxxx",

        "SONARQUBE_TOOLSETS": "analysis,issues,security-hotspots,quality-gates,rules,duplications,measures,dependency-risks,coverage,agentic-readiness,languages"

      }

        }

      },

    "inputs": []

}

I validated this class:

public class Adder {
 public int add(int a, int b) {
 System.setProperty("lalal", "lololo");
 return a + b;

}

 public String processString(String input) {
  return input.toUpperCase();
 }
}

I’m getting an error:

I tried to validate the new version on the MCP server with:

Project: demos-sonar:poc-java-maven-multi-module–integration
Language: Java
Scope: MAIN
The server cancels the analysis again with a CancellationException, so it doesn’t return the profile issues.

If you ask this other question:

Do I have any open issues for this class?

I’m going to filter the open issues for the demos-sonar project by the exact path to Adder.java, to specifically check this class and not the rest of the module.

No. You don’t have any open issues registered in SonarQube for Adder.java.

The 3 open issues for the project belong to other files:

Mashup.java, line 8: Adder visibility.

Mashup.java, line 9: Subtracter visibility.

MashupTest.java, line 10: Mashup visibility.

I will check the open issues for the demos-sonar project using the identified key. In the demos-sonar project, you have 3 open issues:

Because it doesn’t validate the class?, I don’t see an error.

Hey @AlbertoL, welcome to the Community! So the MCP invocation is telling you that there are no open issues in SonarQube for this class. Have you check if indeed there aren’t any? If you check this file on SonarQube, do you see any issues?

The server cancels the analysis again with a CancellationException, so it doesn’t return the profile issues.

Where do you see this error? In the MCP server’s logs? In the client (IDE, AI agent…)? In the Sonar Scanner logs?

Hi, it’s resolved.

I didn’t have SONARQUBE_TOOLSETS configured correctly, which was causing the error. Thanks.