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.
| 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.
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 loginOr 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 cyclonedxREST 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.