Location
Encryption
Credentials are encrypted using:- Algorithm: AES-256-GCM
- Key derivation: PBKDF2 with machine-specific seed
- Security model: Same protection level as OS keychains, without interactive prompts
What’s Stored
| Credential Type | Scope | Example |
|---|---|---|
| Anthropic API key | Global | anthropic_api_key::global |
| Claude OAuth token | Global | claude_oauth::global |
| Craft OAuth token | Global | craft_oauth::global |
| Workspace OAuth | Per workspace | workspace_oauth::{workspaceId} |
| Workspace bearer | Per workspace | workspace_bearer::{workspaceId} |
| MCP OAuth | Per agent | mcp_oauth::{workspaceId}::{agentId}::{serverName} |
| API keys | Per agent | api_key::{workspaceId}::{agentId}::{serviceName} |
Credential Scoping
Credentials are scoped hierarchically:- Global credentials work across all workspaces
- Workspace credentials are isolated to that workspace
- Agent credentials are specific to one agent’s services
Viewing Stored Credentials
You can see what credentials are stored (but not their values):Managing Credentials
Adding Credentials
Credentials are added automatically when you:- Complete the setup wizard (API key or OAuth)
- Activate an agent that needs a new API key
- Connect to an MCP server requiring authentication
Force Re-authentication
If you need to update credentials or troubleshoot authentication issues, you can force re-authentication through settings:- Force re-auth for Craft: Refresh your Craft OAuth connection
- Force re-auth for Claude: Refresh your Claude/Anthropic credentials
- View connected accounts: See which services are authenticated
- Credentials expire or become invalid
- You want to switch to a different account
- Authentication seems stuck or outdated
- You need to refresh session tokens
Removing All Credentials
Removing Specific Credentials
Currently, there’s no command to remove individual credentials. Options:- Use
/logoutto clear everything - Delete the credentials file manually (clears all credentials)
Security Considerations
File permissions
File permissions
The credentials file is created with restricted permissions (readable only by your user). Verify with:
Backup considerations
Backup considerations
If you backup your home directory, the credentials file is included but encrypted. It cannot be decrypted on a different machine.
Machine migration
Machine migration
When moving to a new machine, you’ll need to re-enter credentials. The encrypted file from your old machine won’t work.
Shared accounts
Shared accounts
Environment Variable Override
For automation or CI environments, you can provide credentials via environment variables:| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key |
CRAFT_ANTHROPIC_API_KEY | Alternative API key variable |
Troubleshooting
Credential not found errors
Credential not found errors
The credential may have been removed or corrupted. Re-enter it:
- For API keys:
/settings→ re-enter key - For OAuth: Re-authenticate when prompted
Cannot decrypt credentials
Cannot decrypt credentials
This usually means the file was copied from another machine. Run
/logout and re-enter credentials on this machine.File permission errors
File permission errors
Fix permissions: