Expand description
Generating and recognising API keys. A key is cdo_ and 43 characters of URL-safe base64
(256 random bits). Only its SHA-256 hash and a 12-character prefix are stored, so the key
exists in the clear once, in the response that creates it.
Structs§
- NewKey
- A new key: the plaintext (show once, never store), its hash and its display prefix.
Constants§
- DISPLAY_
PREFIX_ LEN - Characters of the key kept (unhashed) to tell keys apart on the settings screen.
- KEY_
PREFIX - Every key starts with this.
Functions§
- claude_
command claude mcp add ...for the key (or a placeholder).- generate
- hash_
key - What is stored and looked up instead of the key.
- is_
well_ formed - Whether
keyhas the shape of a key we hand out. A value that doesn’t is rejected before any lookup. - mcp_
servers_ json - A
mcpServersentry for MCP clients that take JSON, written out so the keys stay in the order a person reads them. - mcp_url
- The MCP server’s address,
{BASE_URL}/mcp.