Developers connect Cloak through MCP or REST. A human account grants a scope-limited credential. The agent receives permitted key-operation results — not a permanent private key or the ability to approve itself. Supported protected-file operations also return signed receipts.
The Cloak model is simple: a human sets a policy ("this agent can encrypt files for client X with read-only access"). The agent operates within that boundary. Supported protected-file operations return a signed receipt that the human can verify later. KMS-wide signed operation receipts are planned, not a current default.
Sets the policy: who, what, for how long, with which key. The agent cannot escalate beyond this boundary.
Calls the MCP tool or REST endpoint. Cloak enforces the policy. The agent gets only the permitted result. Supported file workflows also return a receipt.
For supported protected-file operations, the receipt records workflow fields and is verifiable offline. A valid signature proves issuer and payload integrity, not every real-world claim.
The Cloak KMS exposes nine key-operation primitives over MCP. Hardware backing depends on the configured custody lane. Any MCP-compatible agent — Claude, Cursor, Codex, your own LLM app — can call these tools directly. The live tool catalog is at GET /kms/mcp/info.
{}[
{
"alias": "agent-signing-key",
"keyId": "0101",
"keyType": "RSA_2048",
"keyUsage": "SIGN",
"keyState": "ENABLED"
}
]
{
"alias": "agent-signing-key",
"keyId": "0101"
}
{
"alias": "agent-signing-key",
"keyId": "0101",
"keyType": "RSA_2048",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----…"
}
{
"alias": "project-alpha-signing",
"label": "Project alpha",
"keyType": "ECC_SECP256R1",
"keyUsage": "SIGN"
}
{
"alias": "project-alpha-signing",
"keyId": "0102",
"keyType": "ECC_SECP256R1",
"keyUsage": "SIGN"
}
{
"alias": "project-alpha-signing",
"keyId": "0102"
}
{
"alias": "project-alpha-signing",
"keyId": "0102",
"deleted": true
}
{
"alias": "agent-signing-key",
"keyId": "0101",
"algorithm": "ECDSA_SHA_256",
"digestHex": "a4caf7bd…21083d95"
}
{
"alias": "agent-signing-key",
"keyId": "0101",
"algorithm": "ECDSA_SHA_256",
"signatureBase64": "MEYCIQDx9n…"
}
{
"alias": "agent-signing-key",
"keyId": "0101",
"algorithm": "ECDSA_SHA_256",
"digestHex": "a4caf7bd…21083d95",
"signatureBase64": "MEYCIQDx9n…"
}
{
"alias": "agent-signing-key",
"keyId": "0101",
"algorithm": "ECDSA_SHA_256",
"valid": true
}
{
"alias": "agent-encrypt-key",
"keyId": "0103",
"algorithm": "RSA_PKCS_OAEP",
"inputBase64": "SGVsbG8sIHdvcmxkIQ=="
}
{
"alias": "agent-encrypt-key",
"keyId": "0103",
"algorithm": "RSA_PKCS_OAEP",
"outputBase64": "k0wLZ3K3J9aQ…"
}
{
"alias": "agent-encrypt-key",
"keyId": "0103",
"algorithm": "RSA_PKCS_OAEP",
"inputBase64": "k0wLZ3K3J9aQ…"
}
{
"alias": "agent-encrypt-key",
"keyId": "0103",
"algorithm": "RSA_PKCS_OAEP",
"outputBase64": "SGVsbG8sIHdvcmxkIQ=="
}
{
"alias": "agent-derive-key",
"keyId": "0104",
"peerPublicKeyHex": "04…"
}
{
"alias": "agent-derive-key",
"keyId": "0104",
"algorithm": "ECDH",
"outputBase64": "shared-secret-bytes"
}
These compose the KMS primitives above into higher-level operations. They aren't shipped yet — track progress in the GitHub project board.
encrypt_file / cloak_file — file-level encrypt with policy + receipt (Cloak Files; client-side, plaintext stays on the agent's host)decrypt_file / uncloak_file — policy-bound file decrypt (Cloak Files; client-side)sign_pdf — AATL PDF signing (Batchsign)create_receipt — mint a verifiable receiptverify_receipt — check a receipt's signaturerotate_key — policy-bound key rotationrevoke_access — invalidate a recipient's access to a file
Add the Cloak MCP server to your mcp_config.json (Claude, Cursor, or any MCP host). Your agent immediately gets access to all nine tools — no additional SDK needed.
Set CLOAK_API_KEY to your API key from the console. Scope it to the specific operations and resources the agent needs; do not grant broad product-wide authority by default.
{
"mcpServers": {
// Live today: Cloak KMS over HTTP
"cloakKms": {
"url": "https://kms.cloakapps.com/kms/mcp",
"headers": {
"Authorization": "Bearer $CLOAK_AGENT_TOKEN"
}
},
// Launch-gated: Cloak Files as a local stdio server
// (plaintext remains on the agent host in this local mode)
"cloakEncrypt": {
"command": "npx",
"args": ["-y", "@cloakapps/cloak-encrypt-mcp"]
}
}
}
list_tools to confirm.
Giving an AI agent cryptographic authority is a significant trust decision. Shipped scope controls are separated below from planned budgets and session evidence.
A human creates a policy ("this agent may encrypt files for client A with read-only access, expiring in 30 days"). The agent cannot modify its own policy or escalate permissions — ever. Cloak enforces the boundary server-side.
Per-session operation budgets and human re-authorization thresholds are planned. Do not rely on them as a current plan entitlement.
Correlated session IDs and replayable cross-operation evidence are planned. Current behavior should be evaluated through the live KMS tool responses and supported protected-file receipts.
If an agent behaves unexpectedly, revoke its credential from the console. Test revocation propagation for the selected integration before production use; previously issued receipts remain independently verifiable.
A finance agent receives a payment authorisation request, signs the PDF, encrypts the receipt, and logs everything — no human clicks required after initial policy setup. The sign_pdf and cloak_file tools below haven't shipped yet — today the same flow is buildable on top of kms_sign + your own envelope code.
Finance manager creates a Batchsign + Encrypt policy allowing the agent to sign payment docs up to $50,000 and encrypt them for the CFO. Policy is time-limited to the current quarter.
sign_pdfAgent receives a payment doc from the ERP, calls Batchsign to sign it with the AATL certificate. Gets back a signed PDF and a receipt.
cloak_fileWraps the signed PDF with Cloak Files, restricting access to the CFO's email, read-only. Gets back an encrypted file and another receipt.
The manager opens the console. Sees two receipts: one for signing, one for encryption. Both are cryptographically signed by Cloak. The agent's session ID ties them together. No gaps in the audit trail.
# Step 2: sign the payment doc signed = mcp.call_tool("sign_pdf", { "pdf_path": payment_doc_path, "signer_name": "Acme Corp Finance", "reason": "Payment authorised" }) sign_receipt = signed["receipt"] # Step 3: encrypt for CFO only protected = mcp.call_tool("cloak_file", { "file_path": signed["signed_path"], "policy": { "recipients": ["cfo@acme.com"], "permissions": "read-only" } }) enc_receipt = protected["receipt"] # Both receipts logged to ERP record erp.attach_receipts( payment_id, [sign_receipt, enc_receipt] )
Every MCP tool has a REST equivalent. Confirm the current endpoints, authentication, scopes, and workflow-specific receipt behavior in the developer guide's REST mirror before integration.
Free account. Full API and MCP access from day one. No credit card.
Governed by the OMMAU Charter — humans authorize, agents execute, receipts record supported actions.