Guard SDK
The Guard SDK enforces your organization's Guard policy inside your own application, MCP server or agent process. It is in early access and installs only from registry.safeguard.sh with a token.
Guard SDK
Early access. Safeguard Guard is in early access. Its SDK packages are rolling out to registry.safeguard.sh over the coming days, and they install only from there, with a pull token from your Safeguard workspace. To join the early access, book a call.
Guard is never published to public registries. Safeguard does not publish Guard to npm, PyPI, Maven Central, NuGet.org, Docker Hub or the Go module proxy. Any package on a public registry that claims to be the Safeguard Guard SDK did not come from Safeguard. Don't install it.
The Guard SDK enforces your organization's Guard policy inside your own application, MCP server or agent process. It keeps a signed copy of the policy you manage in Safeguard and checks each request against it before the request runs. Guard works at the library and framework level, as middleware.
How it will install
Once your packages are available, you point your package manager at registry.safeguard.sh for Safeguard's own package names only, then install the SDK:
| Language | Package | Registry |
|---|---|---|
| Node.js | @safeguard/guard | https://registry.safeguard.sh/npm/ |
| Python | safeguard-guard | https://registry.safeguard.sh/pypi/simple/ |
| Java | sh.safeguard:guard-agent | https://registry.safeguard.sh/maven/ |
| .NET | Safeguard.Guard | https://registry.safeguard.sh/nuget/v3/index.json |
| Go | safeguard.sh/guard | GOPROXY=https://registry.safeguard.sh/go/,off |
The registry reserves these names. A request for one of them is never passed through to a public registry, so a look-alike public package can't be served in its place.
Every release is signed with Safeguard's key and carries an SBOM and SLSA provenance. You verify it with cosign against the public key at https://registry.safeguard.sh/_gold/keys/cosign.pub.
Generate a secret key
The Guard SDK authenticates with an organization secret key (sg_sk_...) from Settings → Developer. Create one when your SDK packages are available, not before: an unused credential is only risk. RBAC & Teams covers how secret keys are scoped and revoked.
Tool-poisoning detection
Checking an MCP tool's own name and description for hidden instructions aimed at the calling agent (tool poisoning) is not available yet.
FAQ & Troubleshooting
Is there a Guard SDK package I can install? Guard is in early access, and its SDK packages are rolling out to registry.safeguard.sh over the coming days. They install only from that registry, with a pull token. Nothing is published on PyPI, npm, Maven Central, NuGet.org or the Go module proxy, so any package there that claims to be the Safeguard Guard SDK did not come from Safeguard.
I followed an older version of this page. What now? Older revisions gave install commands for public package registries. Those packages were never published by Safeguard. If one of those commands ever installed something, the package came from someone other than Safeguard: remove it, and review the machine the way you would after running any untrusted code.
I need in-process enforcement now. Book a call to join the early access, or email hi@safeguard.sh with your application's language and how you run it.
Related
- Guard Policies: the allow, deny and monitor rules Guard evaluates.
- Guard Proxy: enforcing policy in front of MCP servers instead of inside them.
- Audit Trail & Alerts: what Guard records for each request it evaluates.
- RBAC & Teams: organization secret keys and how they are revoked.
- SDKs: Safeguard's other language SDKs.
- MCP Integrations: connect an AI assistant to Safeguard's hosted MCP server.
SDKs
Safeguard publishes no language SDKs yet. Use the hosted MCP server, the CLI, webhooks or the OpenAI-compatible inference API, and treat any package that claims to be a Safeguard SDK as untrusted.
Guard Proxy Deployment
Run Guard as a standalone, self-hosted reverse-proxy gateway in front of your MCP servers instead of embedding the Guard SDK in every agent process.