# SonarQube MCP Server vs Sourcegraph MCP Server

> SonarQube scores 66.9 (B) to Sourcegraph's 62.5 (B) for code repositories. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp
- Markdown: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp.md (~4,400 tokens)
- Slim: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp.min.md (~1,030 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-23

SonarQube MCP Server scores 66.9 (B) on agent readiness against Sourcegraph MCP Server's 62.5 (B), and leads in 5 of 7 scored categories. Sourcegraph MCP Server leads on reliability. Both do code repositories.

- SonarQube MCP Server: grade B, 66.9/100, rank #498 of 1654. Markdown https://www.anchorterminal.com/tools/sonarqube-mcp.md · JSON https://www.anchorterminal.com/api/v1/tools/sonarqube-mcp.json
- Sourcegraph MCP Server: grade B, 62.5/100, rank #728 of 1654. Markdown https://www.anchorterminal.com/tools/sourcegraph-mcp.md · JSON https://www.anchorterminal.com/api/v1/tools/sourcegraph-mcp.json
- Best code, repository and documentation tools for AI agents: https://www.anchorterminal.com/best/code/index.md
- All 90 code comparisons: https://www.anchorterminal.com/compare/code/index.md

## Which one, for what

### SonarQube MCP Server (B)

Good for: Coding agents in teams already on SonarQube, to read findings, check quality gates and coverage and triage issues.

Ahead on:
- Schema & documentation, 80 against 71
- Agent ergonomics, 80 against 72
- Payments & pricing, 45 against 23

Also in its favour:
- A hosted endpoint, with nothing to install
- Runs on your own machine
- Free to start without a card

Watch for: Every route needs a SonarQube account and a token or OAuth sign-in made by a person in a browser

### Sourcegraph MCP Server (B)

Good for: A company that already runs Sourcegraph and wants agents to search and navigate many repositories with compiler-accurate definitions and references.

Ahead on:
- Reliability, 60 against 50

Watch for: Enterprise plans only, from a $16,000 minimum annual contract through sales. A Cloud trial is by request and subject to eligibility


## Why the edge

### Payments & pricing: SonarQube MCP Server +22

- SonarQube MCP Server (45): No x402, MPP or L402 (0). Plan pricing is public, Team from $34 a month for 100k lines of code, with no per-call price since the server is free (15). SonarQube Cloud's free tier covers private projects up to 50k lines with no card and no expiry (30). A person signs up in a browser and makes the token or signs in with OAuth (0).
- Sourcegraph MCP Server (23): No x402, MPP or L402 (0). The pricing page publishes a starting figure, a $16K minimum annual contract, with no per-user or per-call price and a contact-sales button, so half of the plan-pricing credit (5). A free Sourcegraph Cloud trial exists by request, with eligibility reviewed and a wait of up to an hour in business hours. No card is mentioned, so half credit (10). An agent cannot gain access alone. A company needs a contract or an approved trial, and a user approves OAuth in a browser (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 15 is 23.

### Reliability: Sourcegraph MCP Server +10

- SonarQube MCP Server (50): Read with the hosted lines, since the SonarQube Cloud-hosted endpoint needs no install. status.sonarqube.com is an Atlassian Statuspage with an RSS history (20). The 90 days to 23 November hold about ten analysis incidents, each under about an hour (Automatic Analysis failures on 16 November, Bitbucket pull request analysis on 26 October, Quality Gates on 16 October, US analysis on 5 October, elevated errors on 17 September), none naming the MCP endpoint (20). No rate limits for the MCP endpoint found (0). No 429 or retry guidance found (0). No SLA found (0). The hosted server is generally available, not marked beta (10).
- Sourcegraph MCP Server (60): Scored with the hosted lines, because the server is an HTTP endpoint on a Sourcegraph Cloud or self-hosted instance. sourcegraphstatus.com, which didn't resolve on 8 October, loaded on 4 November 2026. It is an incident.io page with components for Sourcegraph Cloud, the self-hosted release, the model provider, accounts, workspaces, analytics, the Enterprise Portal and public code search. No component names MCP. The MCP endpoint is a path on each Cloud instance, but a vendor page with no MCP component takes 15, as honeycomb-mcp, sentry-mcp and slack-mcp do, whose MCP servers also sit on infrastructure the vendor's components cover (15). Its feed and incident pages show five Cloud incidents touching 6 August to 4 November. A us-central1 partial outage from 4 August 19:25 to 6 August 05:16 UTC, increased latency and errors from 31 August 17:56 to 1 September 08:41 UTC, degraded performance from Google Cloud issues on 1 and 2 September, a US Central regional incident from 4 to 9 September, and Europe latency and errors on 20 October. Each names one region or a degradation without a full outage, so each reads as partial (minor only, 20). No request rate limits for the MCP endpoints were found in the reviewed documentation, only result limits per tool (0). No 429 or backoff guidance was found. Releases 8.0.0 and 8.1.0 say search tools separate incomplete searches and timeouts from empty results so a client can retry, and every tool reads, so retries are safe (5, a partial kept from 8 October). The SLA page, read again on 4 November, commits to 99.5 per cent monthly uptime on Business and Enterprise plans (10). The server carries no beta label, and Code Finder became generally available on 20 August 2026 (10). 15+20+0+5+10+10 = 60.

### Schema & documentation: SonarQube MCP Server +9

- SonarQube MCP Server (80): Every tool takes a typed input schema built in the Java source, with readOnlyHint set on read tools (25). llms.txt at docs.sonarsource.com and every docs page as Markdown with a .md suffix (10). Descriptions say what each tool does and some say when to use it (`get_file_coverage_details` says to use it after finding a low-coverage file), with few when-not-to lines (13 of 20). Required fields and some enums (`status`, `scope`), but severities and qualities are free strings listed in the description (10 of 15). A prompt examples page and a troubleshooting page, and OAuth scope errors are documented, but no error catalogue (9 of 15). Versioned releases with notes and a deprecations page (15). 82 less 2 for the gaps between the README and the docs on the hosted subset, 80.
- Sourcegraph MCP Server (71): The docs list each tool's parameters with required and optional marks, defaults and maximums. We could not read the tool definitions themselves, because every endpoint needs an Enterprise instance, so the machine-readable contract earns partial credit (15). /llms.txt and /docs/llms.txt return 404, but every docs page is served as Markdown at its URL plus .md (10). Tool entries state use cases, `code_finder` has best practices and a contrast with `deepsearch`, and a matrix shows which endpoint carries which tool (14). Required fields, defaults and bounds are documented, while search filters travel inside one query string and `evaluator` takes a free Lua script (9). `list_refs` has JSON examples and the authentication page has a troubleshooting table for `invalid_scope`, 401, 403 and 404, with no catalogue of tool errors (8). Versioned releases with dated MCP entries in the changelog (15).

### Agent ergonomics: SonarQube MCP Server +8

- SonarQube MCP Server (80): 51 tools in the full catalogue and a default set of 12 toolsets (15), with toolsets, per-request `SONARQUBE_TOOLSETS` headers and a read-only mode added back (10). `pageIndex` and `pageSize` up to 500, branch, pull request, severity, status and new-code filters (20). Errors are returned as tool messages, with organisation discovery guidance when no organisation is given, but no documented codes (10 of 20). readOnlyHint on 40 tool classes and destructiveHint in the definition builder, and status changes are safe to repeat (17 of 20). Few required parameters, and `SONARQUBE_PROJECT_KEY` removes `projectKey` from every schema. No SDK, as an MCP server (8 of 15).
- Sourcegraph MCP Server (72): Sixteen documented tools on /.api/mcp/all, nine on the default endpoint and two on /.api/mcp/deepsearch, and admins can remove tools with `mcp.tools.disabled`. Definition sizes are unread (23). Result limits on every list and search tool, an `after` cursor on `compare_revisions`, `count` on searches and line ranges on `read_file` (17). Search tools report incomplete results with retry advice per the 8.0.0 notes, and 8.1.0 (14 October 2026) reports timeouts as errors and query-planning failures as invalid-argument errors rather than server errors, and HTTP 401, 403 and 404 causes are documented, but no tool error list was found (10). No tool writes to a repository, so repeating a call is safe. `deepsearch` creates a conversation each time, and we could not read the readOnlyHint or destructiveHint annotations (10). Most tools need one to three parameters with stated defaults. There is no SDK to count, as the surface is MCP only (12).

## Score by category

| Category | Weight | SonarQube MCP Server | Sourcegraph MCP Server | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 50 | 60 | Sourcegraph MCP Server +10 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 80 | 71 | SonarQube MCP Server +9 |
| Agent ergonomics | 13% | 80 | 72 | SonarQube MCP Server +8 |
| Security & auth | 14% | 73 | 76 | Sourcegraph MCP Server +3 |
| Payments & pricing | 10% | 45 | 23 | SonarQube MCP Server +22 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 83 | SonarQube MCP Server +4 |
| Transparency & trust | 7% | 79 | 78 | SonarQube MCP Server +1 |
| Negative events | ≤15 | -2 | -3 | |
| **Total** | | **66.9 · B** | **62.5 · B** | |

## Facts side by side

| Fact | SonarQube MCP Server | Sourcegraph MCP Server |
| --- | --- | --- |
| Kind | MCP server | MCP server |
| Vendor | SonarSource | Sourcegraph, Inc. |
| Hosted endpoint | `https://api.sonarcloud.io/mcp` | no (local only) |
| Transports | stdio, Streamable HTTP | Streamable HTTP |
| Auth | OAuth or key | OAuth or key |
| Pricing | Freemium | Paid |
| x402 | no | no |
| Licence | SONAR Source-Available License v1.0 (SSAL) | Proprietary. The server is part of the Sourcegraph Enterprise product under the Sourcegraph Terms of Service |
| Tools exposed | 51 | 16 |
| Read-only variant documented | yes | yes |
| llms.txt | yes | no |
| MCP registry | `io.github.SonarSource/sonarqube-mcp-server` | `io.github.sourcegraph/mcp` |
| Last release | 2026-11-20 | 2026-10-14 |
| Terms last updated | no date given | 2026-07-22 |
| Privacy policy last updated | 2025-11-03 | 2026-06-12 |
| Customer content may train models | not found in the text | yes, with an opt-out |
| Terms restrict automated access | not found in the text | not found in the text |
| Terms restrict benchmarking | not found in the text | not found in the text |
| Terms or service can change without notice | not found in the text | not found in the text |
| Arbitration or class-action waiver | not found in the text | yes |
| Popularity | 694 stars | none |

## How the scores have moved

### SonarQube MCP Server

No score change since it was listed.

### Sourcegraph MCP Server

- +1.0 on 13 November 2026 (C to B): checklist
- +4.0 on 4 November 2026: new evidence, correction

## Verdicts

**SonarQube MCP Server.** Gives coding agents typed, paginated access to SonarQube issues, hotspots, quality gates and coverage, with toolsets, a read-only mode and scoped OAuth on the hosted server. Every use needs a SonarQube account a person creates, the hosted server documents no rate limits, and the licence is source-available, not open source.

**Sourcegraph MCP Server.** Sixteen read-only tools search and navigate code across every repository an instance indexes, with OAuth limited to an `mcp` scope and repository permissions enforced on each call. Access needs an Enterprise contract, priced from $16,000 a year, and no request rate limits were found in the reviewed documentation.

## Before you call either

### SonarQube MCP Server

1. Set `SONARQUBE_READ_ONLY=true` unless the task must change issue or hotspot status
2. Call `list_organizations` first on SonarQube Cloud, then pass the key as `organization` on each tool
3. Mount the project at `/app/mcp-workspace` and pass `filePath`, so file content stays out of the context
4. Use `branch` and `pullRequest`, not the removed `branchKey` and `pullRequestKey` parameters
5. If an OAuth call fails with `Insufficient OAuth scope`, ask the user to grant `mcp:tools:write`

### Sourcegraph MCP Server

1. Connect to https://<instance>/.api/mcp for the nine core tools. Use /.api/mcp/all for `go_to_definition`, `find_references`, `list_refs`, `get_contributor_repos`, `compare_revisions`, `deepsearch` and `nls_search`
2. Request only the `mcp` scope in OAuth. Any other scope on the MCP resource fails with `invalid_scope`
3. Without OAuth, send `Authorization: token <access token>` and create the token with the `mcp` scope and an expiry
4. Call `list_repos` first and name the repository in every `code_finder` task. It declines broad searches across repositories
5. Read large files with `startLine` and `endLine`. Files over 128KB return only the first 200 lines

## Questions

### Which is better for AI agents, SonarQube MCP Server or Sourcegraph MCP Server?

SonarQube MCP Server scores 66.9 (B) on agent readiness against Sourcegraph MCP Server's 62.5 (B), and leads in 5 of 7 scored categories. Sourcegraph MCP Server leads on reliability.

### Do SonarQube MCP Server and Sourcegraph MCP Server need an API key?

Both take an API key or an OAuth sign-in.

### Can an agent call SonarQube MCP Server and Sourcegraph MCP Server without installing anything?

SonarQube MCP Server has a hosted endpoint at https://api.sonarcloud.io/mcp. No hosted endpoint is listed for Sourcegraph MCP Server.


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp.json, and with the fewest tokens: https://www.anchorterminal.com/compare/sonarqube-mcp-vs-sourcegraph-mcp.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "sonarqube-mcp", "b": "sourcegraph-mcp"}`. From a terminal: `anchor compare sonarqube-mcp sourcegraph-mcp`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/sonarqube-mcp.json and https://www.anchorterminal.com/api/v1/tools/sourcegraph-mcp.json

## Other comparisons with SonarQube MCP Server or Sourcegraph MCP Server

- [Azure DevOps MCP Server vs SonarQube MCP Server](https://www.anchorterminal.com/compare/azure-devops-mcp-vs-sonarqube-mcp.md)
- [Azure DevOps MCP Server vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/azure-devops-mcp-vs-sourcegraph-mcp.md)
- [Entire vs SonarQube MCP Server](https://www.anchorterminal.com/compare/entire-vs-sonarqube-mcp.md)
- [Entire vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/entire-vs-sourcegraph-mcp.md)
- [GitHub MCP Server vs SonarQube MCP Server](https://www.anchorterminal.com/compare/github-mcp-server-vs-sonarqube-mcp.md)
- [GitHub MCP Server vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/github-mcp-server-vs-sourcegraph-mcp.md)
- [GitLab MCP Server vs SonarQube MCP Server](https://www.anchorterminal.com/compare/gitlab-mcp-vs-sonarqube-mcp.md)
- [GitLab MCP Server vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/gitlab-mcp-vs-sourcegraph-mcp.md)
- [GitMCP vs SonarQube MCP Server](https://www.anchorterminal.com/compare/gitmcp-vs-sonarqube-mcp.md)
- [GitMCP vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/gitmcp-vs-sourcegraph-mcp.md)
- [graft vs SonarQube MCP Server](https://www.anchorterminal.com/compare/graft-vs-sonarqube-mcp.md)
- [Graphify vs SonarQube MCP Server](https://www.anchorterminal.com/compare/graphify-vs-sonarqube-mcp.md)
- [Graphify vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/graphify-vs-sourcegraph-mcp.md)
- [Snyk MCP Server (Snyk Studio) vs SonarQube MCP Server](https://www.anchorterminal.com/compare/snyk-mcp-vs-sonarqube-mcp.md)
- [Snyk MCP Server (Snyk Studio) vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/snyk-mcp-vs-sourcegraph-mcp.md)
- [SonarQube MCP Server vs TokenEconomizer](https://www.anchorterminal.com/compare/sonarqube-mcp-vs-tokeneconomizer.md)
- [Sourcegraph MCP Server vs TokenEconomizer](https://www.anchorterminal.com/compare/sourcegraph-mcp-vs-tokeneconomizer.md)
- [Git (MCP reference server) vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/git-reference-server-vs-sourcegraph-mcp.md)
- [graft vs Sourcegraph MCP Server](https://www.anchorterminal.com/compare/graft-vs-sourcegraph-mcp.md)
- [Sourcegraph MCP Server vs Superpowers](https://www.anchorterminal.com/compare/sourcegraph-mcp-vs-superpowers.md)
- [Momentic MCP server vs SonarQube MCP Server](https://www.anchorterminal.com/compare/momentic-mcp-vs-sonarqube-mcp.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
