gmi-security-mcp
v0.5.11Triage semgrep findings with GMI Inference, with cost shown before every run.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
triage_semgrep_finding
Triage one semgrep or scanner finding with GMI Inference. Returns one validated finding as JSON: verdict, severity, confidence, reason, fix, stage used, latency, tokens, cost, and the estimate made before the call. An unparsed reply returns verdict null and unparsed true. It never returns clean. The verdict is stored in the findings store (per-user ~/.gmi-security-mcp/findings.db by default) and the result carries finding_id. An explicit db_path is allowed, with a warning that the caller is responsible for not committing it.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
finding * | string | |
check | ||
db_path | ||
file | ||
line | ||
max_tokens | integer | |
spend_cap_usd | number | |
stage1_model | ||
stage2_model | ||
threshold | number | |
two_stage | boolean |
estimate_cost
Estimate the cost of a run with no API call and no spend. Returns typical and maximum cost in USD, the prompt token estimate, and the per-token pricing used. An unpriced model returns priced false and null costs.
| Parameter | Type | Description |
|---|---|---|
model * | string | |
text_length_chars * | integer | |
max_tokens | integer | |
n_findings | integer |
repo_scan
Scan a repo with semgrep and osv-scanner, then two-stage triage. Returns a JSON report: per-finding verdicts with stage and cost, totals, skipped findings with reasons, the OSV section, and the estimate versus actual cost. A dry run runs the scanners and estimates the cost with no GMI calls. Files over max_file_kb are skipped unless the caller raises the cap. Every triaged finding is stored in the findings store (per-user ~/.gmi-security-mcp/findings.db by default) and the report carries scan_id, with one finding_id per finding. The custom rules pack runs in addition to the default semgrep co…
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | |
stage1_model * | string | |
stage2_model * | string | |
db_path | ||
dry_run | boolean | |
include_tests | boolean | |
max_file_kb | integer | |
max_files | integer | |
max_tokens | integer | |
max_total_kb | integer | |
rules_dir | ||
semgrep_config | ||
spend_cap_usd | number | |
threshold | number | |
write_report |
check_osv_advisory
Check one lockfile against OSV with the local osv-scanner. Parses the lockfile locally, then runs osv-scanner on it and returns advisories as facts: id, package, installed version, fixed version, severity, summary, and link. Packages with only a version range and no exact version are reported unresolved, never given a verdict. No GMI call is made.
| Parameter | Type | Description |
|---|---|---|
lockfile_path * | string | |
ecosystem |
explain_cve
Explain a CVE, GHSA, or OSV id from its advisory, with citations. Fetches the advisory from OSV by exact id. When no advisory with that id exists, returns found false and invents nothing. When a model is named, GMI writes one plain-language paragraph from the retrieved advisory only. When no model is named, the explanation is the advisory summary itself.
| Parameter | Type | Description |
|---|---|---|
advisory_id * | string | |
max_tokens | integer | |
package | ||
spend_cap_usd | number | |
stage1_model | ||
version |
draft_private_disclosure
Draft a private disclosure from a confirmed real finding. Uses the GitHub Security Lab report template, with the ssh-mcp-server host-key draft as the worked example of the format. Refuses when the verdict is not real, or when confidence is below 0.8 without explicit confirmation. When finding_id is given, the finding must be in the store with status confirmed, or triaged with verdict real and confidence at or above 0.8; otherwise the draft is refused and the result says why. Returns the draft as Markdown and writes it only when write_path is given. It is never sent, never opened as a PR, neve…
| Parameter | Type | Description |
|---|---|---|
finding * | object | |
repo * | string | |
confirm_low_confidence | boolean | |
db_path | ||
finding_id | ||
include_fix | boolean | |
maintainer_contact | ||
write_path |
verify_finding
Verify one finding with a deterministic oracle, PoV-is-truth. A finding stays a candidate until an oracle reproduces it. GMI only writes the PoC, when poc is null; the local oracle decides. code is the audited code and harness description sent with the finding when a PoC is generated. A generated PoC is returned for review and only runs when run_poc is true AND confirm_generated_poc is true: run_poc alone never runs model-generated code on the host in the same call that generated it. A caller-supplied PoC runs when run_poc is true, with no extra flag, because the caller already reviewed it. A…
| Parameter | Type | Description |
|---|---|---|
code | ||
confirm_generated_poc | boolean | |
db_path | ||
executor | string | |
finding | ||
finding_id | ||
fix_candidate | ||
harness_module | ||
max_tokens | integer | |
poc | ||
regression_check | boolean | |
repo_path | ||
run_poc | boolean | |
spend_cap_usd | number | |
stage1_model | ||
test_command |
list_findings
List stored finding summaries, newest first. Filters: status, check, severity, repo_path. limit defaults to 20 and is capped at 100. cursor pages through results. Summaries only: no code in list output, only in get_finding.
| Parameter | Type | Description |
|---|---|---|
check | ||
cursor | ||
db_path | ||
limit | integer | |
repo_path | ||
severity | ||
status |
get_finding
Get one stored finding in full: code, evidence, verdict history, pipeline events, verification results, business impact, and matching triage memories.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | |
db_path |
update_finding
Update a stored finding. reason is required. business_impact changes business impact only, never technical severity, verification, review gates, or patch permissions. status moves one step at a time and is refused when it skips a state, for example new to confirmed without a reproduced verification. Suppressing a critical/high finding with business impact Urgent/High is refused unless force is true with a reason, and is then recorded with that reason and actor.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | |
business_impact | ||
db_path | ||
force | boolean | |
reason | ||
status |
mark_fp
Mark a stored finding false_positive. reason is required. Creates a triage memory with the given scope (global, package, or target, default target). The memory is a hint only: it never auto-rejects a future finding, and the agent must still triage it. Memories are created only by this human call.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | |
reason * | string | |
db_path | ||
scope | string |
mark_confirmed
Mark a stored finding confirmed. reason is required. Only when a verification result with status reproduced exists for the finding. Otherwise the call is refused, and an LLM verdict alone cannot set confirmation.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | |
reason * | string | |
db_path |
list_rules
List the custom semgrep rules pack. No GMI call, no spend. Returns each rule with id, name, category, severity, description, and whether it is enabled by default. category filters to one of the 7 known checks. The pack ships in src/gmi_security_mcp/rules/; set GMI_SECURITY_MCP_RULES_DIR when it is elsewhere.
| Parameter | Type | Description |
|---|---|---|
category |
scope_enable
Enable scope for one repo from a scope file. A scope file alone never activates checks; only this call does. Returns the in-scope and out-of-scope lists and a warning that scope is a destination policy, not authorisation to test, and not an OS sandbox.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | |
scope_file * | string |
scope_disable
Disable scope for one repo. Returns disabled with a warning that tools will now refuse if --require-scope is set, because there is no scope policy for the repo.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string |