Keys in the chip. Approval in your hand.

Let AI agents use any API, on any machine, without ever holding a secret. KeyValet keeps your API keys and OAuth accounts in a Secure Enclave / TPM-protected vault that only a system service can read, and makes each call for the agent after you say yes — with the real request on screen.

A valet key starts the car but doesn’t open the trunk.

Open source (Apache-2.0), completely free, vault stored on your device. See the Privacy policy for API calls and optional remote services. Claude Code, Codex, Cursor, Gemini, Grok, Devin — any MCP client or HTTP SDK.

KeyValet No. 0bfd243
Credential
openai/main
Asked by
Claude Code
Request
GET api.openai.com
/v1/models
Approved by
Your fingerprint
Valid for
This call only (per-use mode)

The key stays with the valet. The agent gets the answer.

What happens when an agent needs a key

Four steps, and the secret never leaves a vault the agent can’t read.

  1. The agent asks

    Over MCP, naming the credential and saying why it needs it.

  2. You approve

    Touch ID shows the credential and what the grant allows. In per-use mode it shows the real request — method, host, path, plus the business fields that matter for known APIs — and one touch approves exactly that call.

  3. KeyValet makes the call

    A privileged service — the root daemon on macOS, a dedicated service user on Linux, a Windows service — injects the key, only toward hosts you allowed, and redacts anything that echoes it back.

  4. The agent gets the answer

    Response in; session, purpose and result logged. The grant ends with the session.

A master key versus a valet key

Putting keys in .env or pasting them into chat hands over the master key.

Master key: .env, pasted keysValet key: KeyValet
What the agent sees The plaintext key, in its context and logs Only the response. Long-term secrets never leave the privileged service.
Who decides Nobody, once the file is readable You, with Touch ID — per use, per credential, or per session
Where it can go Anywhere the agent sends it Only the hosts you allowed, no redirects
What you can check later Nothing Every use, with session, purpose and result, in an audit log the agent can’t read
Where it lives Plaintext files, or someone else’s cloud A hardware-protected, encrypted vault on your machine — Secure Enclave on macOS, TPM 2.0 on Linux, Hello on Windows — readable only by the system service

It handles the auth, so agents don’t have to

Agents receive short-lived tokens or proxied responses. Refresh tokens, private keys and seeds stay in the vault.

What it guarantees, and what it doesn’t

A credential tool should be precise about its limits. The full model is in SECURITY.md, or read the security summary.

Guaranteed

  • No credential is used without device-owner authentication.
  • Long-term protocol secrets never leave the root helper; proxy-only credentials are never returned.
  • Adding hosts, loosening rules, overwriting or deleting needs your confirmation — enforced by root, not by the agent-facing server.
  • Every use is logged; secrets never are.

Not guaranteed

  • An agent you granted a credential can misuse that grant within its scope.
  • The purpose is the agent’s claim — recorded, never verified; compromised root or macOS is out of scope too.
  • Values you choose to reveal with credential_get are in the agent’s context.

Next: agents on your server, approvals on your phone In development

Run agents on machines nobody is sitting at — a Linux server, a headless Mac mini, an overnight job — and keep the “allow” in your hand: a phone app (iOS + Android), or the laptop you’re already using.

In development: the protocol and relay are on main with tests; the end-to-end path and app distribution are not finished. Product design · architecture (Chinese)

Install

One command for macOS and Linux: it picks your platform's release package (signed and notarized on macOS; checksums on Linux), asks for your password once, and sets up Claude Code, Codex, Cursor, Grok and Devin CLI if they’re installed. Run it again to upgrade.

curl -fsSL https://keyvalet.dev/install.sh | sh

macOS: Apple Silicon, macOS 14+. Linux: systemd, polkit, sudo, TPM 2.0 (or --software without one). Windows 11: unsigned release packages. See downloads and the Code signing policy for release status. Details in the guide.

Then just ask your agent:

“Store my OpenAI key in KeyValet with the openai template.”
“Use KeyValet to list my OpenAI models.”

You type the key into a native dialog, and approve its use with Touch ID (polkit on Linux). The agent never sees it.