Provider REST API
Developer toolsConnect Claude to SonarQube
Read code-quality issues, quality gates, measures and security hotspots from SonarQube Cloud or SonarQube Server, and triage them. Toolspoke puts 16 of its actions behind one MCP endpoint that Claude, Cursor, and Codex all speak.
- Connection
- Provider REST API
- Authentication
- User token
- Actions exposed
- 16
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
Connected in three steps
- 1
Install SonarQube
Open the marketplace in your workspace, add SonarQube to the project your agents work in, and it appears on the gateway immediately.
- 2
Connect the credential
Authenticate with user token. Where to get one, and what it has to be able to reach, is the next section.
- 3
Point your agent at the gateway
Give your client one address, https://toolspoke.com/mcp. Claude Code takes it as a command, Claude and Claude Desktop add it as a custom connector, and Cursor, Codex and VS Code each read it from a config file of their own.
.mcp.json{
"mcpServers": {
"toolspoke": {
"type": "http",
"url": "https://toolspoke.com/mcp"
}
}
}One block covers every tool you have installed. SonarQube shows up in the client as soon as your policy allows it, and so does everything else you install later.
Where the address goes, per client
- Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcp- Claude and Claude Desktop
Settings, then Connectors, then Add custom connector
https://toolspoke.com/mcp- Cursor
~/.cursor/mcp.json, or .cursor/mcp.json for one project
{ "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }- Codex
~/.codex/config.toml
[mcp_servers.toolspoke] url = "https://toolspoke.com/mcp"- VS Code
.vscode/mcp.json, or the MCP: Add Server command
{ "servers": { "toolspoke": { "type": "http", "url": "https://toolspoke.com/mcp" } } }
What SonarQube asks for
User token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- User tokenRequired
- SonarQube Cloud: avatar → My Account → Security → Generate Tokens. SonarQube Server: avatar → My Account → Security → Generate Tokens, type User Token. A project or global analysis token cannot read issues, so use a User token. It sees exactly what your account sees.
- squ_… or a 40-character SonarQube Cloud token
- SonarQube URLOptional
- Leave blank for SonarQube Cloud (EU). Use https://sonarqube.us for a SonarQube Cloud US organization, or the base URL of your self-hosted SonarQube Server (it has to be publicly reachable).
- https://sonarcloud.io
What Claude can do in SonarQube
16 actions, each one declared and named by the connector rather than discovered at runtime. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
- Reads
- 12Reads
- Writes
- 4Writes
- Destructive
- 0Destructive
Reads
12Fetches data and changes nothing.
list_favoritesList the projects the token's user has marked as favourite. Takes no required arguments and works the same on SonarQube Cloud and Server, so it is what an install tests itself with - it fails for an invalid token and for an analysis token, which cannot read anything else here either.
search_projectsSearch the projects this account can browse, by name or key. This is where project keys come from - every other read takes one. On SonarQube Cloud the organization key is required.
get_componentRead one project, directory or file by its component key, with its ancestors. Use it to resolve a key from an issue into a readable path and project.
get_quality_gate_statusRead whether a project, branch or pull request passes its quality gate, with each condition, its threshold and the actual value. This is the answer to "is this mergeable".
search_issuesSearch issues across one or more projects, filtered by status, severity, software quality, tag, assignee or creation date. Returns each issue's key, rule, message, file and line - the issue key is what transition_issue, assign_issue and add_issue_comment take.
get_measuresRead metric values for a project or file - coverage, bugs, vulnerabilities, code smells, duplicated lines, lines of code and so on. Name the metrics wanted; common keys are coverage, ncloc, bugs, vulnerabilities, code_smells, duplicated_lines_density, security_hotspots and sqale_index.
search_hotspotsList a project's security hotspots - code that needs a human to decide whether it is a vulnerability - filtered by review status. Returns the hotspot keys get_hotspot and review_hotspot take.
get_hotspotRead one security hotspot with its rule, the risk it describes, its location, and the review comments people have left on it.
list_analysesList a project's past analyses with their dates, versions and events (quality gate changes, new versions). Use it to find when a project's state changed.
list_branchesList a project's branches with each one's quality gate status and the date of its last analysis.
list_pull_requestsList a project's analysed pull requests with each one's quality gate status.
get_ruleRead one rule - what it checks, why it matters and how to fix it. The rule key comes from an issue or hotspot, e.g. typescript:S1854. On SonarQube Cloud the organization key is required.
Writes
4Creates or updates something on the other side.
transition_issueChange an issue's status: confirm, accept, falsepositive, resolve, reopen and so on. A write rather than destructive, because every transition can be reversed with reopen. Accepting or marking false positive does change whether a quality gate passes, so do it only when asked.
assign_issueAssign an issue to a user by login, or unassign it by leaving assignee out.
add_issue_commentAdd a comment to an issue. Visible to everyone who can browse the project.
review_hotspotRecord a review of a security hotspot - mark it REVIEWED with a resolution (FIXED, SAFE or ACKNOWLEDGED), or put it back to TO_REVIEW. Reversible, so a write; it needs the Administer Security Hotspots permission on the project.
What it will not do
Enforced by the gateway rather than left to convention, which is why each of these can be stated flatly.
- It cannot call anything else
- The 16 actions above are the whole of it. A call to any other name is refused before it reaches SonarQube rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- Nothing here deletes
- This connector writes to SonarQube, but nothing in it deletes or permanently alters anything.
- It reaches no further than your credential
- Toolspoke holds no access to SonarQube of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from SonarQube
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in SonarQube. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around SonarQube's own rate limits. A call that SonarQube refuses comes back to the agent as a failed call.
Before you connect it
What can Claude do in SonarQube?
16 named actions: 12 that only read and 4 that write. They include list_favorites, search_projects and get_component. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the SonarQube connector need?
User token. The connector asks for user token, and optionally sonarqube url. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.
Does the SonarQube connector work with Cursor and Codex, or only Claude?
Any client that speaks MCP, and every one of them gets the same 16 actions. There is a single address, https://toolspoke.com/mcp. Claude Code adds it with claude mcp add --transport http, Claude and Claude Desktop take it as a custom connector in settings, Cursor reads it from .cursor/mcp.json, Codex from ~/.codex/config.toml, and VS Code from .vscode/mcp.json. Each of them signs in to the gateway itself, so there is no key to paste.
What does the SonarQube connector not do?
The 16 actions above are the whole of it. A call to any other name is refused before it reaches SonarQube rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. This connector writes to SonarQube, but nothing in it deletes or permanently alters anything. Toolspoke holds no access to SonarQube of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in SonarQube. An agent has to ask. Toolspoke does not retry, queue or back off around SonarQube's own rate limits. A call that SonarQube refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches SonarQube's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls SonarQube?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.