Agents often need to access third-party services — GitHub, Jira, databases, or custom MCP servers. Vaults provide secure credential storage so you can hand tokens to us and have them injected into Sessions on demand without hard-coding secrets in your code.
The response returns type: "vault_credential" and a sanitized auth object. It does not include secret values.For MCP OAuth, use the browser authorization flow:
Open the returned authorization_url. After the provider redirects to the CAS callback, CAS exchanges the code and creates an mcp_oauth Credential in the Vault. See Start MCP OAuth for PKCE, client registration, and callback behavior.If you already hold an OAuth access token and refresh configuration, you can instead import them through Create a credential.
Q: What happens when an MCP OAuth token expires? A: If the provider returned a refresh token, CAS refreshes the credential when needed before MCP discovery or execution. If refresh is unavailable or no longer valid, run the OAuth authorization flow again.Q: Can I update a Credential's token? A: Yes. Rotate secrets in place with Update a credential, then confirm an MCP OAuth credential with Validate an MCP OAuth credential.Q: How many Vaults can a Session reference? A: There's no hard limit, but group by service for clarity.Q: My token leaked. What now? A: Delete the Credential immediately, revoke the token in the third-party platform, and create a new Credential.Q: Can I read stored tokens? A: No. For security, credential secrets are write-only — you can only delete and recreate.
Use separate Vaults per environment (development vs. production) to avoid mixing credentials.