gmi-security-mcp

v0.5.11
io.github.Jayanng/gmi-security-mcp Checked 3 days ago Published 23 days ago

Triage 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.

ParameterTypeDescription
code *string
finding *string
check
db_path
file
line
max_tokensinteger
spend_cap_usdnumber
stage1_model
stage2_model
thresholdnumber
two_stageboolean

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.

ParameterTypeDescription
model *string
text_length_chars *integer
max_tokensinteger
n_findingsinteger

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…

ParameterTypeDescription
repo_path *string
stage1_model *string
stage2_model *string
db_path
dry_runboolean
include_testsboolean
max_file_kbinteger
max_filesinteger
max_tokensinteger
max_total_kbinteger
rules_dir
semgrep_config
spend_cap_usdnumber
thresholdnumber
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.

ParameterTypeDescription
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.

ParameterTypeDescription
advisory_id *string
max_tokensinteger
package
spend_cap_usdnumber
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…

ParameterTypeDescription
finding *object
repo *string
confirm_low_confidenceboolean
db_path
finding_id
include_fixboolean
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…

ParameterTypeDescription
code
confirm_generated_pocboolean
db_path
executorstring
finding
finding_id
fix_candidate
harness_module
max_tokensinteger
poc
regression_checkboolean
repo_path
run_pocboolean
spend_cap_usdnumber
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.

ParameterTypeDescription
check
cursor
db_path
limitinteger
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.

ParameterTypeDescription
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.

ParameterTypeDescription
finding_id *string
business_impact
db_path
forceboolean
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.

ParameterTypeDescription
finding_id *string
reason *string
db_path
scopestring

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.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
repo_path *string