Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Isolate each user’s SaaS credential in a separate vault

Create a vault for a fictional user, attach a bearer credential, verify agent access, and clean up resources.

Goal

Keep multi-tenant user tokens out of shared agent configuration and prompts.

Steps

  1. Create one vault per internal user with client.beta.vaults.create(display_name=..., metadata=...). [operate]
  2. Bind the user’s MCP credential with vaults.credentials.create(vault_id=..., auth={"type":"static_bearer", ...}); read the token only from a secret store. [operate]
  3. Verify the identity and audit metadata after the run; archive the credential and vault when access is revoked. [operate]

How to verify

A test user sees only their mock resources, another user’s vault lacks the token, and revocation archives the credential.

Troubleshooting

If the MCP credential is not resolved, confirm it is attached to the session’s vault and the server URL matches; do not fall back to shared environment variables.

Permissions

Prerequisites

Permissions

Limitations

Vaults do not replace server-side authorization, tenant mapping checks, or rotation; the cookbook example uses GitHub MCP.

Pinned upstream source

https://github.com/anthropics/anthropic-cookbook/blob/9c1e493ddd2b82df399d2a61b9c806c539e18be6/managed_agents/CMA_operate_in_production.ipynb

Repository
anthropics/anthropic-cookbook
File path
managed_agents/CMA_operate_in_production.ipynb
Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: MIT

Main topic

Make Agent behavior safer and easier to verify

Related resources