sonarqube
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-04
- Stars
- ★ 0
- Forks
- 0
03 SKILL.md 正文
SonarQube (sonarqube-mcp)
Read-only MCP server over the SonarQube Server Web API. FastMCP server name sonarqube, tool prefix sonarqube_. Purpose: give software engineers security and code-quality data for their repos and CI pipelines. Targets SonarQube Server (not Cloud), so there is intentionally no organization param.
Server at a glance
- 21 read-only tools, zero writes. The
SONARQUBE_WRITE_TOOLS_ENABLEDgate andis_write_tools_enabled()seam exist but no write tool is implemented. - Auth: Bearer user token (
squ_...) by default (Authorization: Bearer <token>, works on Server 10.x+). SetSONARQUBE_BASIC_AUTH=trueto fall back to HTTP Basic (token as username, empty password) for pre-10.x servers. - CA trust:
_build_verify()precedence is (1)SONARQUBE_CA_BUNDLEPEM, (2) OS trust store via thetruststorepackage (so corporate-managed hosts trust their internal root with zero config), (3) certifi. Verification is always on; the code never setsverify=False. - Transport: stdio (engineer, default) or
http. Health/health, metrics/metrics. - URL handling:
SONARQUBE_URLis the base with the context path but no/api(e.g.https://sonarqube.example.com/sonar). The connector doesbase_url.rstrip("/")then appends/api/..., so the context path is preserved.
Example instance notes
- URL
https://sonarqube.example.com/sonar(context path/sonar), version 2026.3.1.123439, status UP. - Developer Edition or higher (confirmed because
api/project_branches/listandapi/project_pull_requests/listare present in/api/webservices/list), so the branch/PR tools ship.SONARQUBE_BRANCH_TOOLS(default true) is the portability valve to turn them off on Community. - Token lives in the gitignored repo
.env(My Account > Security). Never commit it. Validate a live change with a read-only smoke test against the target instance; do not trust self-reports of "N tests passed" (see [[verification-before-completion]]).
Env vars
| Var | Default | Purpose |
|---|---|---|
SONARQUBE_URL |
required | Base URL incl. context path, no trailing /api |
SONARQUBE_TOKEN |
required | User token (Bearer) |
SONARQUBE_BASIC_AUTH |
false | Use HTTP Basic (pre-10.x) |
SONARQUBE_CA_BUNDLE |
unset | PEM CA bundle path; overrides OS trust store (never disables verify) |
SONARQUBE_BRANCH_TOOLS |
true | Register the 2 branch/PR listing tools; set false on Community |
SONARQUBE_WRITE_TOOLS_ENABLED |
false | Write gate (seam only; no write tools yet) |
MCP_TRANSPORT / MCP_PORT / MCP_HOST / LOG_FORMAT / LOG_LEVEL |
stdio / 8080 / 0.0.0.0 / text / INFO | Fleet transport + logging |
Tool inventory
All read-only. Every call is GET /api/* via connector.get() (None-valued params dropped). List tools take limit/offset and return items, total_count, has_more, next_offset; list+get tools take response_format: markdown|json (default markdown).
| Tool | Purpose | Endpoint | B/PR |
|---|---|---|---|
sonarqube_list_projects |
List analyzed projects (query?) |
components/search?qualifiers=TRK (browse perm, not admin) |
|
sonarqube_search_issues |
Bugs/vulns/code smells (component_keys[], severities[], types[], statuses[], resolved) |
issues/search |
yes |
sonarqube_get_issue_changelog |
Change history of one issue (issue) |
issues/changelog |
|
sonarqube_get_quality_gate |
Project gate status + conditions (project_key) |
qualitygates/project_status |
yes |
sonarqube_list_quality_gates |
Gates defined on the server | qualitygates/list |
|
sonarqube_get_quality_gate_definition |
One gate's conditions (name xor id) |
qualitygates/show |
|
sonarqube_list_quality_profiles |
Profiles (language?, project?, defaults?) |
qualityprofiles/search |
|
sonarqube_get_measures |
Measures for one component (component, metric_keys[]) |
measures/component |
yes |
sonarqube_get_component_tree |
Per-child measures (component, metric_keys[]) |
measures/component_tree |
yes |
sonarqube_list_hotspots |
Security hotspots (project_key, status?) |
hotspots/search |
yes |
sonarqube_get_hotspot |
One hotspot's detail (hotspot) |
hotspots/show |
|
sonarqube_search_rules |
Coding rules (languages[], types[], severities[], tags[], query?) |
rules/search |
|
sonarqube_get_rule |
One rule detail/remediation (key, e.g. python:S1481) |
rules/show |
|
sonarqube_get_analysis_status |
Current/queued CE task for a component (component) |
ce/component |
no |
sonarqube_list_analysis_tasks |
CE task activity (component?, status?, type?) |
ce/activity |
|
sonarqube_list_project_analyses |
Analysis history + events (project, category?, from_date?/to_date?) |
project_analyses/search |
no |
sonarqube_get_measures_history |
Metric trend (component, metrics[], from_date?/to_date?) |
measures/search_history |
yes |
sonarqube_list_metrics |
Metric catalog | metrics/search |
|
sonarqube_list_project_branches |
Branches (project) |
project_branches/list |
Dev+ |
sonarqube_list_pull_requests |
PRs (project) |
project_pull_requests/list |
Dev+ |
sonarqube_system_status |
Instance status + version | system/status |
B/PR = accepts branch / pull_request (mutually exclusive, enforced by validate_branch_pr). Only 6 tools support them: search_issues, get_quality_gate, get_measures, get_component_tree, get_measures_history, list_hotspots. Empirically ce/component and project_analyses/search do NOT accept them (validated against the live catalog; the plan was corrected on this point, docs-over-empirical loses).
API specifics
- Pagination:
limit/offsetconvert to SonarQube's 1-basedp(offset//limit + 1) andps(=limit). Non-paged endpoints (qualitygates/list,qualityprofiles/search,qualitygates/show,project_branches/list,project_pull_requests/list,system/status,ce/component,measures/component) return everything with an offset-0 envelope. - Param encoding: list params are CSV-joined (
componentKeys,severities,metricKeys, etc.); booleans lowercased strings;from_date/to_datemap to the reservedfrom/to. - Projects use
components/search?qualifiers=TRKdeliberately (browse permission), avoiding the admin-onlyprojects/search. - Edition gating: the branch/PR list tools require Developer Edition+; absent on Community, hence the
SONARQUBE_BRANCH_TOOLSvalve. - When validating live capability, query
GET /api/webservices/list(source of truth for which endpoints and params exist on the target version) rather than trusting docs.
Fleet conventions (adding a tool)
Scaffolded from mcp-template-build; same shape as [[cribl]], [[microsoft-graph]], [[databricks]].
src/custom_components/<area>.pyfollowingexample_tool.py: aBaseModulesubclass;_add_tool(fn, ...)registers underfn.__name__, which MUST start withsonarqube_.- Input is a single Pydantic
BaseModel(ConfigDict(extra="forbid"),Field(...)); set all four annotations. List tools addlimit/offsetand return theitems/total_count/has_more/next_offsetenvelope (helperspage_index_from_offset,paging_envelopeinpkg/util.py). - List+get tools accept
response_format: Literal["markdown","json"]. - respx-mocked
tests/test_<area>.py; mock the connector singleton, no live HTTP in unit tests. - Pre-push gate:
ruff check src tests->mypy src(strict) ->check_pydantic_inputs.py->check_no_print.py(log to stderr, stdout is JSON-RPC) ->check_jwt_allowlist.py->pytest -q.
Python >=3.12,<4.0, Poetry. Docker base image ARG PY must be bumped by hand (Dependabot cannot parse FROM image:${ARG}). Do not run the container conformance Docker gate locally; stdio release is githooks only.
04 同仓库更多 Skills
vibesec
This skill helps Claude write secure web applications. Use this when working on any web application or when a user requests a scan or audit to ensure security best practices are followed.
ui-ux-guide
Modern, clean UI/UX guidance + review skill. Use when you need actionable UX/UI recommendations, design principles, or a design review checklist for new features or existing systems (web/app). Focus on CRAP (Contrast/Repetition/Alignment/Proximity) plus task-first UX, information architecture, feedback & system status, consistency, affordances, error prevention/recovery, and cognitive load. Enforce a modern minimal style (clean, spacious, typography-led), reduce unnecessary copy, forbid emoji as icons, and recommend intuitive refined icons from a consistent icon set.
tufin
暂无简介
tines
Tines is a no-code automation and orchestration platform commonly used as a SOAR replacement, IT automation engine, and workflow builder. Use this skill whenever the user mentions Tines, Tines stories, actions, the AI Agent action, Story copilot, Webhook actions, HTTP Request actions, Event Transform, Send to Story, Resources, Pages, Cases, Records, credentials, Connect Flows, formulas, pills (`<<slug.body.field>>` syntax), the Tines API, the Tines Terraform provider, tenants, change control, self-hosted Tines, Helm charts for Tines, Tines Tunnel, Command-over-HTTP, Tines on Azure or AWS, Tines credits and the AI credit pool, the Workbench, MCP server templates exposed by Tines, or any automation or workflow build inside Tines. Also trigger when the user asks about migrating from Cortex XSOAR / XSIAM or other SOAR platforms to Tines, designing playbook or story patterns, integrating security tools through Tines, building forms with Pages, running case management in Tines, or is debugging a Tines workflow, even if they don't name a specific Tines concept.
tines-3b
Tines 3B is a separate product from Tines (Stories), not an upgrade path. Workflows are git repositories, steps are containerized code directories that pipe stdin to stdout, and an AI agent builds them from prompts. Use this skill whenever the user mentions Tines 3B, 3B spaces, 3B workflows, steps, config.toml, route_auth, route_type, webpage routes, volumes and /storage, Tines units (TUs), connectors and the credential proxy, 3B skills, watchtower, autofix, autotune, solo runs, 3B branches or push-live, the 3B REST API or MCP endpoint, GitSync, tunnels and networks, or docs.3b.tines.com. Also trigger when comparing 3B against Tines Stories, deciding which of the two a use case belongs in, or migrating between them. For classic Tines (stories, actions, pills, formulas, Cases, Records, Pages), use the `tines` skill instead.
threatconnect
ThreatConnect TIP and Polarity overlay expert. Use for any task involving ThreatConnect or Polarity: REST API calls (v2/v3), authentication (Token/HMAC), TQL queries, Indicators, Groups, Cases, Workflow, Tags, Security Labels, Associations, ThreatAssess scoring, CAL configuration, indicator deprecation, exclusion lists, TAXII feeds (inbound/outbound), feed metrics, dashboards, Query Cards, Threat Graph, ATT&CK Visualizer, Risk Quantifier, Polarity integrations (Core, IOC Submission, Intel Search, CAL, XSOAR), Polarity custom development (Node.js), Polarity server administration, Playbooks, Components, Workflow Playbooks, App Builder, TcEx, indicator distribution to SIEM/SOAR (XSIAM, Sentinel, Splunk, Elastic, Tines, Torq, BlinkOps), HTTP errors, HMAC signature failures, indicator formatting (ASN, CIDR, Host, URL, Registry Key), or troubleshooting. Trigger even without explicit ThreatConnect/Polarity mention if the task involves threat intelligence platform operations.