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 is the supported way to query Safeguard programmatically. It works with Claude, Cursor, Cline, and any other MCP-capable client.

Configuration

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

Generate a key in Settings → API Keys.

Available tools

Six tools, all read-only. Scope — tenant, organization and product — comes from the key 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.

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

The published CLI artifacts are currently unavailable — see the installation page for the supported route. The commands below are accurate for an installed CLI.

Installation

See CLI installation for the current, supported method. Verify the checksum before running any downloaded installer.

Authentication

safeguard auth login

Or use an environment variable:

export SAFEGUARD_API_KEY="your-api-key"

Commands

# Generate SBOM
safeguard sbom generate --source . --name "my-app" --version "1.0.0"

# List projects
safeguard projects list

# Check security gate
safeguard gate check --policy production

# Search
safeguard search "severity:critical"

# Export SBOM
safeguard sbom export --id abc123 --format cyclonedx

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 SettingsWebhooks
  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