Environment
- SonarQube Server or Cloud? Server
- Deployment type (STDIO/HTTP, Docker/JAR): HTTP Docker
- Client / AI tool using MCP (if applicable): Github Copilot (CLI & Eclipse
Description
I’m trying to setup the Sonarqube MCP Server to be used by multiple people/agents. I have it running in a docker container in HTTP mode.
docker compose file:
services:
sonarqube-mcp:
init: true
pull_policy: always
ports:
- 18080:18080
environment:
- SONARQUBE_TRANSPORT=http
- SONARQUBE_HTTP_PORT=18080
- SONARQUBE_TOKEN=squ_xxxxxx
- SONARQUBE_URL=http://xxxxx:9000/
- SONARQUBE_HTTP_HOST=0.0.0.0
image: mcp/sonarqube
The server starts without an issues and downloads everything from our Sonarqube server. But when I try to connect to it I get redirected to a not working OAuth authentication. From what I have gathered the OAuth authentication is currently getting implemented and shouldn’t be part of the current docker image.
"sonarqube-http": {
"url": "http://localhost:18080/mcp",
"headers": {
"Authorization": "Bearer squ_xxxxx"
}
}
Using the server in stdio mode works fine.
"sonarqube": {
"command": "docker",
"args": [
"run",
"--init",
"--pull=always",
"-i",
"--rm",
"-e",
"SONARQUBE_TOKEN",
"-e",
"SONARQUBE_URL",
"-e",
"SONARQUBE_IDE_PORT",
"mcp/sonarqube"
],
"env": {
"SONARQUBE_TOKEN": "squ_xxxxx",
"SONARQUBE_URL": "http://xxxxxxx:9000/",
"SONARQUBE_IDE_PORT": "64120"
}
}
Any idea what causes this strange behavior?