Learning resourcesReviewed · Anthropic

Authenticate with vaults: Claude Managed Agents

Authenticate with vaults is a guide for developers connecting Claude Managed Agents to users' services, but any API key with workspace access can reference the stored credentials. It explains MCP OAuth, fixed bearer tokens and environment-variable secrets, including session attachment, rotation and troubleshooting. The feature is in beta, and environment-variable credentials have compatibility restrictions.

Researched 23 Nov 2026

In short.

Authenticate with vaults is a guide for developers giving Claude Managed Agents access to users' services, but a vault associated with one user remains accessible to every API key in its workspace. It documents reusable credentials attached when sessions are created, automatic MCP authentication and environment-variable secrets replaced with real values as requests leave the sandbox. Practical constraints include a maximum of 20 credentials per vault, delayed credential validation and clients that cannot use secret placeholders. Pricing is unknown, and the documented behavior was not tested.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete supplied page at [https://platform.claude.com/docs/en/managed-agents/vaults.md], including examples, workspace-access warnings, environment-variable compatibility, lifecycle operations, availability, beta requirements and data-handling notices. Linked pages are excluded, so their setup details, terms and retention explanations are not established here. No implementation was executed; runtime behavior, security, performance and costs remain untested or unknown as specified.

The overview

Identity

Authenticate with vaults is an Anthropic Claude Platform documentation guide for the Managed Agents vault and credential APIs. The selected source is the complete page at [https://platform.claude.com/docs/en/managed-agents/vaults.md], with a human-facing address at [https://platform.claude.com/docs/en/managed-agents/vaults].

The resource teaches an authentication feature within Managed Agents. Its examples cover cURL, the ant CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby.

Assessment

The guide is useful when an application needs the same agent configuration to work with different users' service credentials. A vault can group one user's credentials, while each new session references the appropriate vault IDs. This reduces the need to transmit third-party tokens repeatedly.

Its main architectural caveat is workspace-wide access: associating a vault with a user does not establish user-level isolation. An application adopting this design should enforce which user may start a session with which vault. The page explains important failure modes, but it provides no independent security or reliability results.

Users

The primary audience is developers building Managed Agents applications that connect to external accounts through Model Context Protocol (MCP) servers, command-line tools, SDKs or direct API calls. Developers supporting multiple end users can use vault metadata to map credentials back to their application records.

Beginners receive examples in several languages, but still need to understand API credentials, agent and environment resources, and the authentication requirements of the external service. Developers using self-hosted sandboxes need particular care because the documented environment-variable credential feature is unavailable there.

Capabilities

The page documents three credential types. mcp_oauth supplies OAuth access tokens to an MCP server and can refresh them when a refresh configuration is provided. static_bearer supplies a fixed token without a refresh flow. environment_variable exposes an opaque placeholder inside the sandbox and substitutes the real secret into eligible outbound requests.

Management operations include credential updates, vault and credential listing, archival and deletion. Lifecycle webhooks can report archival, deletion and OAuth refresh failures. An OAuth validation endpoint returns valid, invalid or unknown status, with diagnostic information about the MCP handshake and attempted refresh.

Using it

Requirements

The examples require an Anthropic API key, workspace access, an agent and an environment. Requests use the managed-agents-2026-04-01 beta header; the cURL examples also specify anthropic-version 2026-10-21. Minimum SDK and CLI versions are not stated.

Developers must obtain suitable credentials from the external service. OAuth refresh requires the issuing token endpoint and applicable client authentication details. Environment-variable substitution requires the destination to be permitted by both the credential's networking configuration and the environment's networking configuration.

Mechanism

A vault stores credentials and is attached through vault_ids when a session is created. MCP credentials match the configured mcp_server_url. Without a match, the connection is attempted without authentication. If several vaults contain a matching credential, the first matching vault wins. In multiagent sessions, credentials apply across threads, and an agent must declare the matching MCP server in its own definition.

For environment-variable credentials, software inside the sandbox sees a placeholder. The real secret replaces that placeholder as an outbound request leaves the sandbox, subject to the configured host and request-location restrictions. Credential host restrictions control secret substitution; they do not grant network access.

Supplied secret values are write-only and are not returned in API responses. Substitution is outbound only: a new token returned by an external service can enter the sandbox unredacted.

Setup

Create a vault with a display name and optional metadata linking it to an application user. Add the appropriate credential type, then include the vault ID when creating a session with the agent and environment IDs.

For an environment-variable credential, configure limited allowed hosts and the required injection locations. Creating a credential with only header enabled makes it header-only. Omitting injection_location entirely in an API create request enables both header and body substitution. Credentials created through the Claude Console default to header-only injection.

On updates, injection-location fields merge individually: changing body leaves header unchanged. At least one location must remain enabled, and explicit null values are rejected. A placeholder in a disabled location passes through unchanged rather than being removed.

Example

The page's Slack example stores an mcp_oauth credential for [https://mcp.slack.com/mcp] in Alice's vault, including an access token and refresh details. A session for Alice then references that vault alongside its agent and environment. The token can be injected when the agent connects to the matching MCP server.

Its Notion example creates an environment_variable credential named NOTION_API_KEY, limits substitution to Notion's API host and enables header injection only. A compatible client sends the placeholder in a request header, where the real secret is substituted on exit. A client that sends it in the body would require body injection to be enabled. These are documented examples; neither was executed.

Assessment & evidence

Limitations

Each vault supports a maximum of 20 credentials. Active MCP server URLs and environment-variable secret names must be unique within a vault; duplicate creation returns 409. Structural fields, including server URL, secret name, OAuth token endpoint and client ID, cannot be changed after creation. Changing them requires archiving the credential and creating a replacement.

Environment-variable credentials are not supported with self-hosted sandboxes. They require clients that transmit the secret verbatim. Clients that reject the placeholder's format or derive signatures from it, such as AWS SigV4 clients, can fail. For token-exchange flows, the page recommends exchanging credentials outside the sandbox and storing the resulting token.

Credentials are ordinarily accepted without validation until session runtime. Authentication errors are emitted but do not stop the session. Rotation, archival and deletion take effect through periodic credential re-resolution without restarting sessions; the exact propagation interval is not stated.

The page marks Managed Agents as ineligible for HIPAA and generally ineligible for zero data retention, with a stated zero-data-retention exception for self-hosted Managed Agents. Sessions are stateful, and transcripts persist until deleted.

Practical trade-offs

The documented design is a useful fit when reusable credentials and per-session user mapping matter more than local access to raw secrets. Moving substitution outside the sandbox can reduce direct exposure of stored environment secrets, but it also prevents software from using those secrets for local calculations.

Host restrictions and header-only injection narrow where a credential can be sent. They do not reduce the permissions already granted by the external service. The practical implication is to combine these controls with narrowly scoped tokens and application-level authorization for vault attachment. These are design implications, not verified security guarantees.

Alternatives

Within the documented feature, OAuth credentials suit MCP services that use OAuth and need token refresh; static bearer credentials suit services accepting fixed tokens; environment-variable credentials suit compatible CLI, SDK and direct API clients.

For self-hosted sandboxes, the page suggests implementing an outbound proxy that replaces placeholders with real secrets. It does not provide that implementation or compare independent secret managers and other agent platforms. Relative cost, portability and security therefore remain unknown.

Evidence

The evidence is the complete captured Anthropic documentation page at [https://platform.claude.com/docs/en/managed-agents/vaults.md]. The source snapshot is identified by SHA-256 f94bfa65731e41ea3c8f1be1c057a9f4dd7ed8600e0238ff6c66f4f050e86cbe.

The source includes configuration examples, explicit warnings, runtime rules and availability notices. Claims about secret protection, refreshing, rotation and platform support are documentation claims. No commands, code or API requests were executed, and operational reliability, performance and security were not independently assessed.

Access & freshness

Costs

The page gives no prices for vaults, credential storage, refresh operations or related API calls. It also provides no total-cost example for Managed Agents sessions or connected third-party services. Those costs are unknown from this source; beta availability does not establish that usage is free.

Rights

The supplied page contains no explicit license or redistribution grant for its documentation or examples. Commercial-use terms for the service are also not established by this page.

The agent's authority over a connected service depends on the supplied credential's permissions. The page recommends limiting keys to the permissions the agent needs because the agent can perform any action the key permits.

Freshness

The snapshot was captured on 2026-11-23 at 10:28:19.291 UTC. It describes vaults as beta across all models on Claude API, Claude Platform on AWS and Claude Models on Google Cloud under Anthropic management.

The beta header managed-agents-2026-04-01 and example API version 2026-10-21 identify API configuration, not the page's publication or update dates. No explicit page publication date or change history is supplied, and subsequent changes are unknown.

Suggested next steps

Before adoption, confirm that the client sends credentials verbatim and that the intended hosting mode supports the chosen credential type. Define how application users are authorized to attach vaults, use narrowly scoped service credentials, and configure explicit hosts and injection locations.

Plan for refresh failures and credential replacement. The documented validation endpoint distinguishes invalid credentials requiring user reauthorization from unknown results caused by transient failures that can be retried. Webhooks can notify the application of lifecycle changes.

Choose archival when an audit record is needed: it purges secrets while retaining records. Hard deletion does not retain the record. Archiving a vault causes future sessions referencing it to fail while existing sessions continue, so do not assume archival immediately stops an active session. Confirm pricing and applicable service terms separately before committing.

Evidence for this report

selected-page.txtselected · checked 2026-11-23