85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
morsecWhyHow it worksFeaturesCompareProofFAQbeta · Motiontic Lab
Lab product · Beta

Agents use keys. Never see them.A secret broker for macOS

morsec is a secret broker that keeps Claude Code API keys out of the agent. It stores API keys, database passwords and tokens in the macOS keychain and gives Claude Code and Codex an ms:// reference instead. A local daemon swaps the real key into a request only when it goes to a host the user allowed.

  • 0secrets in the agent's context
  • 3ways to install the same signed, notarized binaries
  • 1command to cut every agent off
  • macOS 13+Apple silicon, signed with Developer ID

An agent that holds a key can send it anywhere

Coding agents need keys to do real work. Call Stripe. Query the database. Push to git. The usual setup puts Claude Code secrets where the agent can read them.

01

The .env file is in the context

The agent reads the project, so it reads the .env. Now the value sits in its context, its transcript and every tool call it makes.

02

Injected values are still values

Secret managers that run a command with secrets as environment variables keep keys out of files. The process, and an agent running under it, still holds the plaintext.

03

Prompts are not a control

A page or a repo can tell the agent to do something else. "Be careful with your prompts" doesn't stop a tricked agent from posting a key to a paste site.

04

The agent runs as the user

Same machine, same files, same permissions. Whatever stops a leak has to hold even when the agent itself has been turned against the user.

How morsec handles Claude Code API keys

Names travel. Values arrive only where they're allowed. Setup is five commands.

  1. Keys become referencesms import .env moves each value into the macOS keychain and rewrites the file with names like ms://stripe/test. The file keeps names. The values are gone.
  2. Each key is bound to its hostsms rules stripe/test --add-host api.stripe.com says where that key may go. Every other host gets nothing.
  3. The agent is pointed at msdms connect claude-code (or codex) routes the agent's requests through msd, a local proxy, and turns on Claude Code's sandbox with msd as its egress proxy.
  4. The key is swapped in on the way outWhen a request leaves for api.stripe.com, msd puts the real key in. Sent anywhere else, ms://stripe/test stays a name.
  5. A person stays in the loopProduction keys wait for Touch ID in the user's terminal. Every use leaves a receipt, and ms stop cuts every agent off at once.

Built for an agent that runs as the user

morsec is a credential broker, not another vault. It decides where each key may go and who said yes.

01 · Swap mode
ms://stripe/test

References, not values

The agent only ever sees ms:// names. A prompt-injected agent has nothing to leak.

02 · Host binding
api.stripe.com

Each key has its hosts

A key goes only to the hosts its rule names. Private, loopback and metadata addresses are refused.

03 · Run mode
psql · ssh · git

Commands that need a value

For psql, ssh, git and deploy scripts, msd runs the command itself. The agent gets the output, not the password. ms mcp offers the same as typed MCP tools.

04 · Approvals
Touch ID

The agent can't approve itself

Approvals are drawn by morsec from the real request and confirmed with Touch ID. Keychain items open only for the signed morsec daemon.

05 · Receipts
ms log

Every use is recorded

Allowed or blocked, each use leaves a hash-chained receipt. ms scan checks agent transcripts for any vault value.

06 · Fail closed
ms stop

Off means nothing goes out

If msd isn't running, no key leaves the Mac. ms stop cuts every agent off, and ms doctor says what's wrong.

morsec and the alternatives

Most secret tools answer "who can read this key". morsec also answers "where can this key go", on the user's own Mac.

morsec.env files1Password CLI (op run)Infisical Agent Vault
What the agent can readAn ms:// referenceThe plaintext valueThe value, as an environment variable of the process it runsNot the real credential: the proxy adds it
Where a key can goOnly the hosts bound to itAnywhereAnywhere the process sends itThe hostnames set for each proxied service
Where keys are storedmacOS keychain on the user's MacA file in the project1PasswordInfisical
What has to runA local daemon (msd)Nothing1Password CLI and accountAn Agent Vault proxy, alongside or near the agents
Commands that need a value (psql, ssh, git)msd runs the command; the agent gets outputValue in the environmentValue in the environmentDatabases and SSH reachable through the proxy
Approval per useTouch ID for production keysNoneNot described on the op run pageHooks: the user's own server allows or refuses
Record of each useHash-chained receipt, allowed or blockedNoneNot described on the op run pageSession logs

Competitor facts from public docs as of 2026-11-20: 1Password (1password.dev/cli/secrets-environment-variables), Infisical Agent Vault (infisical.com/docs/documentation/platform/agent-vault/overview, infisical.com/blog/agent-proxy). Doppler (doppler run), Infisical (infisical run) and HashiCorp Vault Agent (process supervisor mode) also inject secrets as environment variables, per their docs.

What ships today

Claims below are from the released v0.1.0.

Lab measurement
0

Secrets in the agent's context

The agent works with ms:// names. The value is added after the request leaves the agent, only for bound hosts.

Lab measurement
3

Ways to install, one set of binaries

Homebrew, npm and a curl installer ship the same Developer ID signed, notarized binaries. The curl installer checks checksums, signatures and notarization before it installs anything, and never uses sudo. The npm package runs no install scripts.

Lab measurement
v0.1.0

First public release

Released 2026-11-17: swap mode, run mode, ms mcp, ms doctor, and connectors for Claude Code and Codex.

Who it is for

Developers who let agents touch real services

Claude Code or Codex on a Mac, with keys for payments, databases, git hosts or cloud APIs.

Teams rolling agents out to more engineers

One rule for where each key may go, and a record of every use, allowed or blocked.

Engineering leads who own AI agent security

A control that holds when the agent is tricked, instead of a policy that hopes it won't be.

Questions about morsec

Short answers first. Anything not covered here is a question for a lab engineer.

How do you keep Claude Code API keys out of the agent?

Give Claude Code an ms:// reference instead of the key. morsec stores the value in the macOS keychain, and its local daemon swaps it into requests only for the hosts the user bound to that key.

Does morsec send secrets anywhere?

No. Keys stay in the Mac's keychain and only go to hosts the user allows. morsec makes no model calls.

Which agents does morsec work with?

Claude Code and Codex today, plus any MCP client through ms mcp. Cursor and Gemini are next, per the morsec site.

How does morsec compare to 1Password CLI (op run)?

op run gives the process the real values; morsec gives it a name. op run starts a command with secrets as environment variables, so an agent running under it can read them. morsec keeps the value in msd and adds it only to requests bound for allowed hosts.

How does morsec compare to Infisical Agent Vault?

Both keep the credential in a proxy instead of the agent; morsec does it locally on one Mac. Agent Vault brokers credentials from Infisical through a proxy deployed in the user's infrastructure. morsec uses the macOS keychain, needs no server or account, and asks for Touch ID on production keys.

What if the agent edits its settings to skip morsec?

Nothing leaks. The agent never had the key, so skipping morsec only loses it access to the service.

What happens when msd isn't running?

Nothing goes out. morsec fails closed: no daemon, no swap, no key.

More from the lab

Each product started as a tool the lab needed for its own agent work.

Rolling agents out to a team?

Motiontic sets up coding agents with keys that stay where they belong. Talk through where the keys should live, which hosts they need and who approves what.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.