Open Source · Apache-2.0 · Runs on Cloudflare Free Tier

Your domain. Your identities. Your keys.

Self-hosted personal identity layer & AI agent key-custody gateway running entirely inside your Cloudflare account.

Infrastructure $0 Workers Free Tier
State Plane 5 SQLite DOs + R2
Vault Crypto Argon2id + AES-256-GCM
Telemetry Zero Servers · Zero Logs
01 / Architecture

One Cloudflare account. Complete trust boundary.

No third-party Clavis backend, no shared database, and no subscription SaaS. Your domain mail, encrypted password vault, OIDC provider, and AI custody gateway execute inside a single Cloudflare Worker you control.

Clavis Edge Topology Single-Tenant · Zero Clavis SaaS
Clavis Cloudflare Edge Architecture Diagram Cloudflare Email Routing, Web Console, Chrome and Firefox extensions, Remote MCP clients, and CLI with Varlock plugin connect to your Clavis Cloudflare Worker, which coordinates five SQLite Durable Objects (AccountDO, IdentityDO, VaultDO, GatewayDO, RealtimeDO), R2 mail storage, and an optional Cloudflare Secrets Store KEK inside your Cloudflare account. YOUR CLOUDFLARE ACCOUNT (ISOLATED TRUST BOUNDARY) INGRESS & CLIENT SURFACES Cloudflare Email Routing Catch-all *@example.com · DMARC trust Web Console (React · 5 langs) Passkeys · Aliases · Vault · Custody UI Chrome & Firefox Extension MV3 One-Tap · Origin check · OTP stream Remote MCP (/mcp) Claude Code · Codex · Cursor · Antigravity CLI & Varlock Plugin clavis-cli · clavis-varlock-plugin CLOUDFLARE WORKER clavis Edge Runtime Hono API + email() + SEND_EMAIL Remote MCP Streamable HTTP WebCrypto HMAC & AWS SigV4 Path Policies + USD Quotas Native OIDC + Bitwarden Sync Plaintext keys never cross /mcp Sandboxed mail · Zero telemetry AccountDO Owner · Aliases · OIDC ES256 · Audit log IdentityDO Per-alias mail meta · OTPs · Leak trace VaultDO Opaque ciphertext · Bitwarden mobile sync GatewayDO AI custody · Path rules · Quotas · WebAuthn RealtimeDO Hibernated WebSocket & SSE OTP fan-out R2 Bucket clavis-mail (.eml) Secrets Store Optional GATEWAY_KEK
Zero backend operated by MateOrg. Every byte stays inside your Cloudflare account. 5 SQLite Durable Objects auto-provisioned via wrangler.jsonc.
02 / Core Capabilities

Identity, credentials, and AI custody — engineered as one surface.

Built clean-room from first principles with TypeScript, Hono, React, WebCrypto, and Manifest V3. Every security boundary is enforced in code and tested against real Miniflare Durable Objects.

01

Per-Site Email Aliases & DMARC Trust

Mint origin-bound aliases like github.k7m4q9xz2a@example.com on your own domain. Reads Cloudflare’s first Authentication-Results header (mx.cloudflare.net), anchors verified status on DMARC, traces leaks, pauses or revokes silently with zero backscatter, and exposes SimpleLogin & Addy.io compatible endpoints.

DMARC verified Leak trace Sandboxed HTML
02

Chrome & Firefox One-Tap Sign-In + OTP Extraction

A Manifest V3 content script shows a Shadow-DOM one-tap card on login forms and independently re-verifies exact origin & eTLD+1 binding (with private suffixes via tldts) before filling. Streams deterministic OTPs and user-confirmed magic links in real time over WebSocket or SSE.

Chromium MV3 Firefox MV3 Anti-phishing
03

Zero-Knowledge Vault + Bitwarden Mobile Sync

Your master passphrase never leaves the browser or extension. Keys derive via Argon2id (64 MiB, 3 iterations, p=4) into a non-extractable AES-256-GCM key with fresh 96-bit IVs and versioned AAD (aadVersion: 2), while VaultDO syncs natively with Bitwarden-compatible mobile apps.

Argon2id AES-256-GCM Bitwarden Sync
04

Native OIDC Identity Provider & Passkeys

Authenticate to your Clavis console with WebAuthn Passkeys (Touch ID, Face ID, YubiKey) and connect self-hosted or third-party OIDC apps via /.well-known/openid-configuration, mandatory PKCE S256, ES256 signed ID tokens, and isolated per-client aliases.

PKCE S256 ES256 JWKS WebAuthn
05

Edge AI Key-Custody Gateway

Expose a single Remote MCP endpoint (/mcp) so coding agents call APIs without ever seeing plaintext secrets. Enforces strict URL path policies, pure WebCrypto HMAC & AWS SigV4 edge signing, daily call/USD circuit breakers, Touch ID / Face ID async approvals, and governed outbound mail drafts.

Remote MCP HMAC & SigV4 USD Breakers
06

Zero-Config Cloudflare Deploy

One click provisions the Worker, 5 SQLite Durable Objects, R2 bucket, and managed wrapping + VAPID keys on the $0 Workers Free Tier. Attach an external GATEWAY_KEK Worker Secret or Cloudflare Secrets Store binding anytime for transparent, fail-closed key-wrapping separation.

$0 Free Tier Secrets Store KEK 5 Languages
03 / Edge AI Key-Custody

Give AI agents governed capabilities — never raw API keys.

Every agent call passes through the Cloudflare edge custody pipeline before any credential is unwrapped: SSRF validation, domain allowlist, fail-closed path canonicalization, semantic permission tier, daily USD quota, and optional biometric WebAuthn approval.

  • Strict URL Path Policies Deny-Overrides-Allow

    Canonicalizes . and .., collapses slashes, and fails closed on encoded separators (%2F, %5C), backslashes, control chars, or matrix parameters (;) before quota charge or key decryption.

  • Pure WebCrypto Edge Signing HMAC & AWS SigV4

    Computes hmac-sha256, hmac-sha512, and native aws-sigv4 signatures (AWS, R2, S3, MinIO, B2) at the edge over TLS only, stripping caller auth headers and scrubbing secrets from responses.

  • Daily USD Circuit Breakers & Touch ID Approvals Human-in-the-Loop

    Set semantic tiers (off / read / confirm / full) per tool and service. High-risk calls pause for Touch ID / Face ID WebAuthn confirmation in your Clavis console with immutable audit logs.

  • Single Remote MCP Endpoint /mcp JSON-RPC

    Connect Claude Code, Codex, Cursor, and Antigravity to one /mcp URL with scoped tokens, instant kill switches, and native SEND_EMAIL mail drafting.

gateway-policy.json — URL Path Allow/Deny + Edge Custody
{
  "service": "stripe",
  "allowedDomains": ["api.stripe.com"],
  "allowedPaths": ["/v1/customers/**", "/v1/invoices/*"],
  "deniedPaths": ["/v1/payouts/**", "/v1/transfers/**"],
  "permissionTier": "confirm",
  "dailyLimitUsd": 25
}
mcp.json — Streamable HTTP Remote MCP
{
  "mcpServers": {
    "clavis": {
      "type": "http",
      "url": "https://clavis.example.com/mcp",
      "headers": {
        "Authorization": "Bearer clv_agent_..."
      }
    }
  }
}
04 / Clavis × Varlock

Built to complement Varlock & Cloudflare Secrets Store.

Varlock standardizes Git-safe repository .env.schema validation and local varlock proxy workflows. Clavis operates at the personal identity and edge custody layer — and plugs directly into Varlock via clavis-varlock-plugin and clavis varlock-schema.

.env.schema — Generated via clavis varlock-schema
# @plugin(clavis-varlock-plugin)
# @initClavis(url=$CLAVIS_URL, token=$CLAVIS_TOKEN, ttl=300, waitForApproval=true)
# @proxyConfig={egress="strict"}
# ---

# @type=clavisUrl @internal
CLAVIS_URL=

# @type=clavisToken @sensitive @internal
CLAVIS_TOKEN=

# @sensitive
# @proxy(domain="api.stripe.com")
STRIPE_API_KEY=clavis("stripe")

# @sensitive
# @proxy(domain="api.openai.com")
OPENAI_API_KEY=clavis("openai")
Terminal — Generate schema without fetching plaintext
# 1. Authenticate the Clavis CLI once (or run via npx clavis-cli)
npx clavis-cli login --url https://clavis.example.com --token-stdin

# 2. Generate .env.schema from Gateway metadata only
npx clavis-cli varlock-schema --proxy --ttl 300 --wait --out .env.schema

# 3. Run local tools with JIT leases & Touch ID approval
varlock proxy run -- npm run dev
Short-lived JIT leases, human-approved

When a service uses the confirm tier, clavis-varlock-plugin writes only the approval prompt to stderr (never secret values) and waits until you approve with Touch ID or Face ID in your Clavis console.

Layer Varlock + Secrets Store (Repo .env proxy) Clavis (Personal Identity + Edge MCP Custody) Used Together
Primary scope Repository .env.schema typing, local credential proxy (varlock proxy), and account-wide Workers secret storage. Personal identity plane + self-hosted edge AI agent custody vault inside your Cloudflare account. Keep Varlock’s Git-safe repo schema & local proxy UX backed by your own Clavis vault.
Personal identity Out of scope. Own-domain per-site email aliases, Chrome/Firefox One-Tap + OTP extraction, zero-knowledge Bitwarden-sync vault, native OIDC IdP. One $0 Cloudflare deployment covers both human sign-in and AI agent secrets.
Agent execution boundary Local varlock proxy replaces placeholders for local CLIs and coding agents. Edge Remote MCP (/mcp) & HTTP custody gateway — plaintext secrets and signing keys never leave Cloudflare. Use Remote MCP for cloud/IDE agents and clavis-varlock-plugin for local varlock proxy repos.
Governance & signing Schema typing, redaction, domain rules, and platform secrets_store_secrets bindings. Async Touch ID / Face ID approvals, daily call & USD circuit breakers, fail-closed URL path rules, WebCrypto HMAC/SigV4 signing, immutable audit log. Require Touch ID approval + short TTL leases for Varlock, and bind Cloudflare Secrets Store to GATEWAY_KEK.
05 / Security Invariants

Enforced in code, covered by Miniflare tests.

Security properties in Clavis are automated invariants — not marketing claims. See the full threat model in the documentation or SECURITY.md.

INV-01 · VAULT

Zero Plaintext Vault

Passphrases never leave the device. Argon2id + non-extractable AES-256-GCM with versioned AAD (aadVersion: 2) prevents ciphertext swapping; the Worker stores only opaque blobs.

INV-02 · CRYPTO

Edge-Only Signing

hmac-sha256, hmac-sha512, and aws-sigv4 sign strictly at the Cloudflare edge over HTTPS, stripping caller auth headers and scrubbing upstream responses.

INV-03 · GATEWAY

Fail-Closed Path Canonicalization

Evaluated before approvals, quotas, or key unwrap. Rejects encoded slashes (%2F/%5C), backslashes, matrix params, and root escapes; deniedPaths always wins.

INV-04 · PRIVACY

Zero Telemetry

No Clavis server, no analytics SDK, no tracking beacons, no third-party CDN fonts. Firefox AMO declares data_collection_permissions: { "required": ["none"] }.

Deploy your own Clavis instance in under two minutes.

Runs on the Cloudflare Workers Free Tier with zero manual secrets required. Read the complete setup guide or launch directly from GitHub.