All Docs

API Keys

API keys let external tools authenticate with your Cognova workspace. They're used by the MCP server, Claude Code plugin, and any MCP-compatible IDE integration.

All plans (including Free) can create API keys. The level of access your key provides depends on your workspace plan — see Pricing & Credits for details.

Create an API Key

  1. Go to Settings > API Keys
  2. Enter a name (e.g., "Claude Code", "CI Pipeline")
  3. Click Create Key
  4. Copy the key immediately — it's shown only once

API keys use the cg_ prefix followed by 48 hex characters:

cg_a1b2c3d4e5f6...

Key Properties

PropertyDescription
NameHuman-readable label for identification
PrefixFirst 11 characters (cg_ + 8 hex), shown in the UI for identification
Last UsedTimestamp of the most recent API call
CreatedWhen the key was generated

Security

  • Keys are hashed with bcrypt before storage — Cognova never stores the raw key
  • Each key is scoped to a single workspace
  • Revoke keys instantly from the API Keys settings page
  • Use separate keys for different tools so you can revoke individually

Revoking Keys

  1. Go to Settings > API Keys
  2. Click the trash icon next to the key
  3. Confirm revocation

Any tools using the revoked key will immediately stop working. Generate a new key and update your tool configuration.

Using Your Key

Pass the key via the Authorization header when connecting your IDE:

claude mcp add cognova https://cognova.dev/mcp \
  --transport http \
  --header "Authorization: Bearer cg_YOUR_KEY"

See the integration guides for specific setup instructions: