Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Read-only SonarQube Community Build access for AI agents: issues, hotspots, rules, code snippets
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
SONAR_URL, SONAR_TOKEN, SONAR_DEFAULT_PROJECT_KEYค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"sonar": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_DEFAULT_PROJECT_KEY": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add sonar --env SONAR_URL='ใส่ค่าของคุณ' --env SONAR_TOKEN='ใส่ค่าของคุณ' --env SONAR_DEFAULT_PROJECT_KEY='ใส่ค่าของคุณ' -- docker run -i --rm -e SONAR_URL -e SONAR_TOKEN -e SONAR_DEFAULT_PROJECT_KEY ghcr.io/igorolv/sonar-mcp-server:0.1.0เติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"sonar": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_DEFAULT_PROJECT_KEY": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"sonar": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SONAR_URL",
"-e",
"SONAR_TOKEN",
"-e",
"SONAR_DEFAULT_PROJECT_KEY",
"ghcr.io/igorolv/sonar-mcp-server:0.1.0"
],
"env": {
"SONAR_URL": "ใส่ค่าของคุณ",
"SONAR_TOKEN": "ใส่ค่าของคุณ",
"SONAR_DEFAULT_PROJECT_KEY": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
SONAR_DEFAULT_PROJECT_KEY envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub igorolv ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: SONAR_URL, SONAR_TOKEN
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.0) เข้า registry 2 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย
ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, yontu
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Türkçe yazı denetimi: TDK kuralları, yapay zekâ izleri, metin türüne göre üslup.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
A local MCP server providing read-only access to a SonarQube Community Build (26.4+) instance via its web-api. It lets AI agents (Claude Code, Cursor, VS Code Copilot, etc.) fetch a project's issue list, the files and locations where they occur, rule descriptions, source-code snippets around issues, and Security Hotspots.
Typical scenario: "find and fix Sonar issues in such-and-such project" — the LLM calls listIssues, optionally getRule and getIssueSnippets, and edits files locally.
There is an official SonarSource MCP server, but it targets SonarQube 10+ (and SonarCloud) and assumes a cloud-style deployment. This server is built for self-hosted SonarQube Community Build 26.4+ installations that expose the classic /api/ web-api. It supports both Standard Experience and MQR mode, handling per-software-quality impacts when the instance runs in MQR mode.
It is also intentionally narrower in scope:
In short: a focused, read-only bridge from a self-hosted SonarQube Community Build to an AI coding agent.
sonar-mcp-server.jar from the latest release, or build it yourself: ./gradlew bootJar (see Build). A Docker image is published as well.For Claude Code that is one command:
claude mcp add --scope user -e SONAR_URL=https://sonar.example.com -e SONAR_TOKEN=your_token -- sonar java -jar /path/to/sonar-mcp-server.jar
The server only supports the stdio transport.
┌─────────────┐ stdio ┌──────────────────┐ web-api ┌──────────┐
│ AI agent │ <------------> │ sonar-mcp- │ -------------> │ SonarQube│ │ (Claude Code│ stdin/stdout │ server (Java) │ HTTP + Bearer │ CB 26.4+│ │ Cursor...) │ │ │ auth (token) │ │ └─────────────┘ └──────────────────┘ └──────────┘
The AI client spawns the server as a child process; communication uses the MCP protocol over stdin/stdout. The server does not open any HTTP port and accepts no incoming connections.
The server exports 13 read-only MCP tools.
| Tool | Description |
|---|---|
listProjects | List of SonarQube projects. Parameters: query (name substring), limit, offset. Returns key, name, qualifier. |
listComponents | Search/browse components inside a project using Sonar's component tree. Parameters: projectKey, query, qualifiers, branch / pullRequest, limit, offset. Returns opaque component key values plus path, qualifier, name, language, and project. Use returned key values unchanged as listIssues.componentKeys; do not pass Java package names directly as component keys. |
getProject | Project overview: header info (name, qualifier, visibility, description, version, last analysis date), quality gate status with failed conditions, and curated metrics (ncloc, bugs, vulnerabilities, security hotspots, code smells, coverage, duplicated lines density, technical debt in minutes, alert status). Parameters: projectKey, branch (opt.), pullRequest (opt.). |
listProjectBranches | List of branches analysed for the project. Each entry: name, isMain, type (LONG/SHORT/BRANCH), excludedFromPurge, analysisDate, qualityGateStatus, plus bugs/vulnerabilities/codeSmells counts. No pagination — Sonar returns all branches at once. |
listProjectPullRequests | List of PR analyses for the project. Each entry: PR key (use as pullRequest= elsewhere), title, branch (head), base, url, analysisDate, qualityGateStatus, plus bugs/vulnerabilities/codeSmells counts. Empty list if the Sonar install has no DevOps integration. |
| Tool | Description |
|---|---|
listIssues | Flat list of issues for a project. Parameters: projectKey (required unless defaulted), componentPathPrefix (opt.) — a single subtree-or-file filter relative to the Sonar project root (e.g. bc-doc/src/main/java/ru/foo or bc-doc/src/main/java/ru/foo/Bar.java); convert Java/Kotlin package dots to slashes; honours directory boundaries (bc-doc/src does not match bc-doc/srcExtra). Plus severities, types, statuses, rules, branch / pullRequest (mutually exclusive), resolved, limit, offset. By default returns only open issues (resolved=false, statuses OPEN/CONFIRMED/REOPENED). Each item contains the rule, severity, type, status, file path, line, primary textRange, and secondary flows for cross-file rules. When componentPathPrefix is used, the server scans the project and filters client-side; the scan is capped (default 10000 issues) — if the cap is hit, pathPrefixTruncated=true in the response. |
getIssue | Details of a single issue by key plus its change history (changelog). Accepts optional branch / pullRequest. |
getIssueSnippets | Source-code snippets around all issue locations (primary plus flows for cross-file rules). For each location: componentPath, language, and an array of source lines with SCM info. Useful when the repository isn't available locally or you need to see exactly the file version Sonar analyzed. Accepts optional branch / pullRequest — important when the issue lives on a non-main ref whose files differ from main. |
getProjectIssuesSummary | Aggregated summary of open issues in a project: total plus breakdowns by severity, type, status, rule, tag, and SCM author. Parameters mirror listIssues (incl. componentPathPrefix) except pagination. |
getProjectIssuesBreakdown | Multi-module aggregation of issues by logical module and rule. Module is derived from the first componentPath segment. Parameters mirror getProjectIssuesSummary. |
| Tool | Description |
|---|---|
getRule | Details of a Sonar rule by key (e.g. java:S1234): title, severity, type, language, tags, description sections (introduction, root cause, how to fix, resources). Backed by an in-memory cache — repeated calls are free. |
| Tool | Description |
|---|---|
listHotspots | List of Security Hotspots for a project. Hotspots are a separate category from issues, marking spots that require manual security review. By default Sonar returns hotspots in status TO_REVIEW. Parameters: projectKey, componentPathPrefix (opt.) — same prefix semantics as on listIssues, status (opt.), branch / pullRequest (opt., mutually exclusive), limit, offset. Subject to the same client-side scan cap (pathPrefixTruncated flag in the response). |
getHotspot | Security Hotspot details: full rule description (risk, vulnerability, fix recommendations), primary textRange, secondary flows, changelog. Hotspot keys are globally unique, so no branch/pullRequest parameter is needed. |
All tools are read-only — no data in SonarQube is modified.
Sonar analyses a *branch* and a *pull request* as two distinct, mutually exclusive scopes. The Sonar web-api accepts either branch= or pullRequest= on a single request, never both.
branch argument → SONAR_DEFAULT_BRANCH → none (Sonar uses the project's main branch).Passing both branch and pullRequest to the same tool call is an error. Use listProjectBranches / listProjectPullRequests to discover available refs.
Branch scoping is load-bearing. Each Sonar branch is a separate analysis: open-issue counts on
mainand on a feature branch can differ a lot, because the feature branch may have new fixes (or new code) that have not been merged. If the agent silently omitsbranch=, it reads frommain(orSONAR_DEFAULT_BRANCH) and may miss work already done on a feature branch — or worse, fix the same problem twice. When the user's local git is onfeature/..., agents should calllistProjectBranchesfirst, find the matching Sonar branch, and pass it explicitly to every issue / summary / breakdown call.
As a server-side safety net,
listIssues,getProjectIssuesSummary, andgetProjectIssuesBreakdownattach abranchAdvisoryfield to their response when (1) neitherbranchnorpullRequestwas passed AND (2) the project has other branches analysed in Sonar. The advisory carries the effective (main) branch name and the list of non-main branches sorted by most recent analysisDate. The field is absent otherwise.
tools.jackson) for JSONgradle/libs.versions.toml)# Point to a JDK 25+ if it's not the default:
export JAVA_HOME="$HOME/.jdks/jdk-25.0.2"
./gradlew build
On Windows: .\gradlew.bat build.
Output: build/libs/sonar-mcp-server.jar
The server needs a SonarQube URL and token; the rest is optional.
| Variable | Description |
|---|---|
SONAR_URL | SonarQube base URL (e.g. http://sonar.example.com) |
SONAR_TOKEN | SonarQube user token |
SONAR_DEFAULT_PROJECT_KEY | Default SonarQube project key. When set, listIssues, getProjectIssuesSummary, listHotspots can be called without projectKey. |
SONAR_DEFAULT_BRANCH | Default Sonar branch. When set, all branch-aware tools (listIssues, getIssue, getIssueSnippets, getProjectIssuesSummary, listHotspots) fall back to this branch when branch is omitted. Without it Sonar uses the project's main branch. |
SONAR_MCP_DATA_DIR | Local data directory for the server; defaults to ~/.sonar-mcp-server |
| SONAR_MCP_PAGINATION_DEFAULT_LIMIT | Default page limit for list tools; defaults t
ตัดมาแค่ช่วงต้น อ่านต่อใน repo