Skip to main content
A record stores one encrypted secret and its metadata. Record plaintext is encrypted and decrypted in the SDK, CLI, Web app, or local MCP process.

Choose the right surface

  • Use the SDK inside an application or script.
  • Use the CLI to inject records into a child process without writing a .env file.
  • Use MCP when an agent needs an approved action.
  • Use the raw API for metadata and pre-encrypted payloads. Prefer the SDK for values because it performs the required cryptography.

Read one record

SDK

getSecret returns the decrypted value and parsed fields. The decryption happens in your process. Use readRecord when you want selected sections instead of the complete record:

CLI

Print only the secret value:
Read structured fields and metadata:

MCP

The MCP server reads the vault passphrase from AIRCTRL_MCP_VAULT_PASSWORD, never from the prompt.
An agent can see values returned by a record tool. Only call a decryption tool when the model is allowed to receive that secret.
MCP tool used: read_record

Inject a project into a process

The CLI converts record names to uppercase environment variable names and injects them only into the child process.
For example, Database URL becomes DATABASE_URL. control variables are removed before the child starts. SDK equivalent:

MCP is different

MCP does not inject values into a child process. It returns tool results to the agent. Prefer the CLI when the goal is only to start an application without a .env file. A bulk MCP read exposes decrypted values to the agent, so use it only in an approved context. When the agent is explicitly allowed to use every accessible value in one project, ask:
MCP tool used: get_all

Create a record

Use createSecret with the fields required by the selected secret format:
CLI:
Avoid placing sensitive field values directly in shell history. For files of environment variables, use:

MCP

Supply secret values only when the model is authorized to receive them.
MCP tool used: create_record

Generate a new secret

can generate supported material locally and store it in one operation. Supported generators include passwords, API keys, TOTP seeds, SSH keys, certificates, webhook secrets, and OAuth client secrets.
MCP request:
MCP tools used: generate_secret, create_record

Update, rotate and roll back

  • setSecret saves a new encrypted value version.
  • rotateRecord creates a new data key and encrypted value.
  • rollbackRecordToVersion makes an earlier encrypted version current without deleting history.
  • updateRecordMetadata changes name, tags, due date, or rotation interval without changing the value.
CLI equivalents are set, record rotate, record rollback, and record metadata. MCP equivalents are set_secret, rotate_record, rollback_record, and update_record_metadata.

Share and revoke

Sharing encrypts the record key for the recipient. It does not share your vault passphrase.The same pattern exists for Service Accounts and groups. CLI uses record share-user, share-sa, share-group and their matching revoke-* commands.
MCP request:
To remove that direct grant later:
MCP tools used: share_record_user, revoke_record_user

History and audit

Use record versions, record audit, anomalies, activity, alerts, and access feeds to understand changes without exposing plaintext. Project-scoped audit feeds require audit:read.

Common failures

  • 403 not_authorized: the caller lacks record access or the required action permission.
  • 404 record_not_found: the ID is wrong or unavailable in the active account.
  • 409 record_name_exists: another record already uses that name where uniqueness is required.
  • 409 project_not_keyed: refresh project key state before retrying the operation.