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.
| Argument | Type | Notes |
|---|---|---|
name | string | Exact product name. Partial matching is not supported. |
limit | integer | Max products to return (default 50). |
offset | integer | Pagination offset (default 0). |
safeguard_list_projects
Projects in the active scope, with scan status and vulnerability counts.
| Argument | Type | Notes |
|---|---|---|
name | string | Exact project name. Partial matching is not supported. |
limit | number | Max projects to return. |
offset | number | Number of projects to skip. |
safeguard_get_project
The full record for one project, including components, vulnerabilities and attestations.
| Argument | Type | Notes |
|---|---|---|
project_id | string | Required. From safeguard_list_projects. |
safeguard_list_vulnerabilities
Vulnerabilities in the active scope.
| Argument | Type | Notes |
|---|---|---|
severity | string | all (default) does not filter. |
ecosystem | string | Package ecosystem. all (default) does not filter. |
cvss_min | number | Minimum CVSS score. |
limit | integer | 1–200, default 25. |
offset | integer | Number to skip, for paging. |
safeguard_get_vulnerability
The full record for one CVE, including references.
| Argument | Type | Notes |
|---|---|---|
cve_id | string | Required. For example CVE-2024-1234. |
safeguard_list_findings
Findings — vulnerability occurrences — for a specific SBOM or project.
| Argument | Type | Notes |
|---|---|---|
sbom_id | string | Filter by SBOM. |
project_id | string | Filter by project. |
severity | string | all (default) does not filter. |
status | string | Triage state. all (default) does not filter. |
limit | integer | 1–200. |
offset | integer | Number 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.
| Argument | Type | Notes |
|---|---|---|
message | string | Required. The feedback, in the user's own words. |
type | string | feedback, feature_request, praise or complaint. |
rating | integer | 1 to 5, only if the user gave one. |
tool_name | string | The MCP tool it is about, if any. The name only, never its arguments. |
context | string | One sentence on what the user was doing. |
safeguard_report_bug
Something broken or wrong, filed as a ticket the engineering team triages.
| Argument | Type | Notes |
|---|---|---|
summary | string | Required. One-line summary. |
steps_to_reproduce | string | How to make it happen again. |
expected | string | What the user expected. |
actual | string | What happened instead. |
severity | string | low, medium, high or critical. |
affected_project | string | Project or product name, if any. |
tool_name | string | The MCP tool it is about, if any. |
context | string | One 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.
| Argument | Type | Notes |
|---|---|---|
subject | string | Required. Short subject line. |
description | string | Required. What the user needs help with. |
urgency | string | low, normal, high or urgent. |
tool_name | string | The MCP tool it is about, if any. |
context | string | One sentence on what the user was doing. |
safeguard_list_my_support_tickets
The user's own tickets, newest first, with reference, status and date.
| Argument | Type | Notes |
|---|---|---|
status | string | all, open or closed. |
limit | integer | Maximum number of tickets to return. |
safeguard_get_support_ticket
One of the user's own tickets, with the team's replies.
| Argument | Type | Notes |
|---|---|---|
reference | string | Required. 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 loginThis 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.jsonThe 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
- Go to Settings → Webhooks
- Click Add Webhook
- Enter URL and select events
- Save
Events
sbom.createdsbom.updatedvulnerability.discoveredgate.failedpolicy.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.