Claude API key security
starts outside the chat
Every time you paste an API key into Claude Desktop, it becomes part of the conversation — sent to Anthropic's servers, stored in logs, and visible in your chat history. 1claw keeps keys in an encrypted vault and delivers them through MCP.
Pasting API keys into Claude is dangerous
Claude Desktop and the Claude API are incredible tools for developers. But they were designed for natural language, not credential management. When you paste an API key into a Claude conversation, several things happen that you probably don't want:
- The key is sent to Anthropic's servers. Even with Anthropic's strong privacy policies, your production Stripe key or database password is now in a third-party system you don't control.
- It persists in conversation history. Claude Desktop stores your chats locally and syncs them. Anyone with access to your machine — or your Anthropic account — can read the key.
- Prompt injection can exfiltrate it. If your Claude agent processes untrusted input (web pages, user data, PDFs), a prompt injection attack could trick the model into leaking any secret in the conversation context.
- No rotation or revocation. A key pasted into a chat can't be automatically rotated. If it's compromised, you have to manually find every place it was shared.
sk-ant-api03-4f8a...xR7kJ2m
Your keys stay in the vault
1claw stores your API keys in a hardware-backed encrypted vault. Claude accesses them through the MCP protocol — the key value is delivered to the tool call, never to the conversation context.
AES-256 + Cloud KMS
Every secret is envelope-encrypted with AES-256-GCM. The data encryption key is itself encrypted by Google Cloud KMS HSM. Double layer, zero plaintext at rest.
Scoped agent access
Create an agent in 1claw, assign it policies on specific secret paths. The agent can only read what you explicitly allow — nothing more.
Automatic rotation
Use the rotate_and_store MCP tool to generate new credentials and store them in the vault in one step. Old versions are kept for rollback.
MCP config for Claude Desktop
Claude Desktop supports MCP servers natively. Add the 1claw server to your Claude Desktop configuration file and your Claude agent gains secure access to 17 vault tools — including get_secret, put_secret, rotate_and_store, and share_secret.
The MCP server authenticates with your agent's API key, exchanges it for a short-lived JWT, and auto-discovers the vault. No manual vault ID configuration needed. Tokens refresh automatically — your Claude session stays connected for as long as you need.
- Works with Claude Desktop, Claude Code, and any MCP-compatible client
- Key-only auth: just the API key — agent ID auto-resolved
- Secrets delivered to tool results, not conversation context
{
"mcpServers": {
"1claw": {
"command": "npx",
"args": ["@1claw/mcp"],
"env": {
"ONECLAW_AGENT_API_KEY": "ocv_your_key_here"
}
}
}
}The secure Claude workflow
Replace copy-paste with policy-based access. Your Claude agent requests exactly the secrets it needs — nothing more.
Store in vault
Put your API keys, database URLs, and credentials in a 1claw vault. Encrypted with AES-256-GCM + Cloud KMS.
Create agent + policy
Register a Claude agent. Grant it read access to specific paths like api-keys/* or databases/*.
Connect via MCP
Add the MCP server config to Claude Desktop. The agent authenticates and auto-discovers its vault.
Secrets stay hidden
Claude calls get_secret as a tool. The value goes to the tool result — never into the conversation context or logs.
Your Claude agent deserves better than copy-paste
Create a free 1claw account, store your API keys in the vault, and connect Claude Desktop via MCP. Your keys never touch the chat again.
Using Cursor instead? See the Cursor MCP guide →