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.