Safeguard Docs

API Reference

MCP server, CLI, and the status of the REST API

API Reference

Safeguard's programmatic surface today is the MCP server. The REST API is not yet generally available — see REST API below for what that means and what to use instead.

MCP Server

The Model Context Protocol server at https://mcp.safeguard.sh/mcp is the supported way to query Safeguard programmatically. It works with Claude, Cursor, Cline, and any other MCP-capable client.

Configuration

For example, in Cursor's mcp.json:

{
  "mcpServers": {
    "safeguard": {
      "url": "https://mcp.safeguard.sh/mcp"
    }
  }
}

Clients that support OAuth open Safeguard's sign-in page; sign in and click Authorize access. For a client that can only send a fixed header, create an MCP key under Settings → Developer (key type MCP key) and send it as Authorization: Bearer sg_sk_.... Safeguard hosts the server: there is nothing to install. See MCP Integrations for each client.

Available tools

Six read-only tools for your data, plus five support tools. Scope (tenant, organization and product) comes from the account you connect with and is applied automatically; there is no scope argument to pass.

Arguments marked required must be supplied. Everything else is optional.

safeguard_list_products

Products in the active scope. Start here when you do not know which part of the estate you mean.

ArgumentTypeNotes
namestringExact product name. Partial matching is not supported.
limitintegerMax products to return (default 50).
offsetintegerPagination offset (default 0).

safeguard_list_projects

Projects in the active scope, with scan status and vulnerability counts.

ArgumentTypeNotes
namestringExact project name. Partial matching is not supported.
limitnumberMax projects to return.
offsetnumberNumber of projects to skip.

safeguard_get_project

The full record for one project, including components, vulnerabilities and attestations.

ArgumentTypeNotes
project_idstringRequired. From safeguard_list_projects.

safeguard_list_vulnerabilities

Vulnerabilities in the active scope.

ArgumentTypeNotes
severitystringall (default) does not filter.
ecosystemstringPackage ecosystem. all (default) does not filter.
cvss_minnumberMinimum CVSS score.
limitinteger1–200, default 25.
offsetintegerNumber to skip, for paging.

safeguard_get_vulnerability

The full record for one CVE, including references.

ArgumentTypeNotes
cve_idstringRequired. For example CVE-2024-1234.

safeguard_list_findings

Findings — vulnerability occurrences — for a specific SBOM or project.

ArgumentTypeNotes
sbom_idstringFilter by SBOM.
project_idstringFilter by project.
severitystringall (default) does not filter.
statusstringTriage state. all (default) does not filter.
limitinteger1–200.
offsetintegerNumber to skip, for paging.

This list is generated from the server's own tool manifest and checked in CI against https://mcp.safeguard.sh/openapi.json. If a tool is not listed here, the server does not offer it.

Support tools

Five more tools are on for every signed-in user, unless a workspace administrator switches the Support and requests group off in Settings › MCP access, so an assistant can raise something with Safeguard or follow up on it. They file and read the same tickets as the product's Help & Feedback sheet, and only ever the signed-in user's own. A connection made with an API key alone can't file requests, and auditor-only accounts don't have these tools. More in Help and support.

safeguard_submit_feedback

Feedback, a feature request, praise or a complaint, sent to the Safeguard team.

ArgumentTypeNotes
messagestringRequired. The feedback, in the user's own words.
typestringfeedback, feature_request, praise or complaint.
ratinginteger1 to 5, only if the user gave one.
tool_namestringThe MCP tool it is about, if any. The name only, never its arguments.
contextstringOne sentence on what the user was doing.

safeguard_report_bug

Something broken or wrong, filed as a ticket the engineering team triages.

ArgumentTypeNotes
summarystringRequired. One-line summary.
steps_to_reproducestringHow to make it happen again.
expectedstringWhat the user expected.
actualstringWhat happened instead.
severitystringlow, medium, high or critical.
affected_projectstringProject or product name, if any.
tool_namestringThe MCP tool it is about, if any.
contextstringOne sentence on what the user was doing.

safeguard_create_support_request

A question or problem for the support team, answered by email and in the app.

ArgumentTypeNotes
subjectstringRequired. Short subject line.
descriptionstringRequired. What the user needs help with.
urgencystringlow, normal, high or urgent.
tool_namestringThe MCP tool it is about, if any.
contextstringOne sentence on what the user was doing.

safeguard_list_my_support_tickets

The user's own tickets, newest first, with reference, status and date.

ArgumentTypeNotes
statusstringall, open or closed.
limitintegerMaximum number of tickets to return.

safeguard_get_support_ticket

One of the user's own tickets, with the team's replies.

ArgumentTypeNotes
referencestringRequired. The ticket reference (SUP-XXXX-XXXX) or its numeric id.

When the MCP server runs on your own machine rather than as the hosted server, safeguard_submit_feedback, safeguard_report_bug and safeguard_create_support_request also take attachment_path: one local file of up to 50 MB to attach.

Paging

List tools return a total alongside the rows. When the total exceeds the rows you received, page with offset rather than assuming you have everything.

CLI

Install it with the one-line installer on CLI installation, which verifies the download against the published checksums.

Authentication

safeguard login

This is an OAuth 2.0 device-code sign-in. /login inside the interactive terminal does the same. The CLI does not read an API key from the environment.

Commands

# Scan a local directory, an image, a repository, or an existing SBOM
safeguard scan --dir .
safeguard scan --image nginx:latest
safeguard scan --sbom sbom.json

# Secrets and misconfigurations, as SARIF
safeguard detect --format sarif --output detect.sarif

# Validate an SBOM against its specification
safeguard validate sbom.json

The full command list is on CLI usage, and safeguard --help is authoritative for the build you have.

REST API

Not yet generally available. There is no public REST API at https://api.safeguard.sh/v1/. Every path under /v1/ returns 404.

Earlier revisions of this page documented a /v1 endpoint set and told you to generate API keys for it. That was wrong: those endpoints were never deployed. Use the MCP server for programmatic access.

The services behind api.safeguard.sh — authentication, the data plane, and the query service — are internal interfaces consumed by Safeguard's own clients. They require caller-supplied tenant, user, product and organization scoping headers, and their contracts change without notice. They are not documented here and are not supported for direct use.

A public REST API with API-key authentication is planned. If you have a use case the MCP tools do not cover, contact us and we will factor it into that design.

Single sign-on

The SSO endpoints under https://api.safeguard.sh/auth/api/v1/ are live and supported. See SSO configuration for the callback, metadata and access-request endpoints and their exact paths.

Webhooks

Receive notifications for events. See Webhooks and events for signing, replay protection and the full event list.

Configuration

  1. Go to Settings → Webhooks
  2. Click Add Webhook
  3. Enter URL and select events
  4. Save

Events

  • sbom.created
  • sbom.updated
  • vulnerability.discovered
  • gate.failed
  • policy.violated

Payload

{
  "event": "vulnerability.discovered",
  "timestamp": "2025-01-03T10:00:00Z",
  "data": {
    "cve": "CVE-2025-1234",
    "severity": "critical",
    "affected_projects": ["project-1", "project-2"]
  }
}

Rate limits

Rate limits apply per API key. Current limits and the plans they attach to are published on the pricing page — that page is the source of truth, and this one no longer duplicates it.

SDKs

No official SDKs are published yet. Connect through the MCP server, which most agent frameworks support natively.

On this page