Install guide · Cursor
Install Sonar MCP Server for Cursor
Cursor reads ~/.cursor/mcp.json. A project can also commit .cursor/mcp.json.
Add to Cursor: Sonar MCP ServerInstall in VS Code: Sonar MCP ServerInstall in VS Code Insiders: Sonar MCP Server
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
Open ~/.cursor/mcp.json on macOS, %USERPROFILE%\.cursor\mcp.json on Windows, or ~/.cursor/mcp.json on Linux.
Paste the JSON config below.
Replace placeholder secrets, then restart the client if it does not reload on its own.
{ "mcpServers": { "igorolv-sonar-mcp-server": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/igorolv/sonar-mcp-server:0.1.0" ], "env": { "SONAR_URL": "", "SONAR_TOKEN": "YOUR_SONAR_TOKEN", "SONAR_DEFAULT_PROJECT_KEY": "" } } }}
Where the config lives
| System | Path |
|---|---|
| macOS | ~/.cursor/mcp.json |
| Windows | %USERPROFILE%\.cursor\mcp.json |
| Linux | ~/.cursor/mcp.json |