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
.envfile. - 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:MCP
The MCP server reads the vault passphrase fromAIRCTRL_MCP_VAULT_PASSWORD, never from the prompt.
MCP tool used:
read_recordInject a project into a process
The CLI converts record names to uppercase environment variable names and injects them only into the child process.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_allCreate a record
UsecreateSecret with the fields required by the selected secret format:
MCP
Supply secret values only when the model is authorized to receive them.MCP tool used:
create_recordGenerate 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 tools used:
generate_secret, create_recordUpdate, rotate and roll back
setSecretsaves a new encrypted value version.rotateRecordcreates a new data key and encrypted value.rollbackRecordToVersionmakes an earlier encrypted version current without deleting history.updateRecordMetadatachanges name, tags, due date, or rotation interval without changing the value.
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 tools used:
share_record_user, revoke_record_userHistory and audit
Use record versions, record audit, anomalies, activity, alerts, and access feeds to understand changes without exposing plaintext. Project-scoped audit feeds requireaudit: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.