MCP Org API Keys

Org API keys are for trusted automation that needs MCP access without a human OAuth session.

MCP Org API Keys

Org API keys are for trusted automation that needs MCP access without a human OAuth session.

Use them for CI, internal admin bots, scheduled audits, and server-side clients. Do not place org API keys in browser code or public repositories.

Create A Key In The Dashboard

  1. Sign in as an admin.
  2. Open MCP Connections → Org API Keys.
  3. Click Create key.
  4. Enter a clear name, such as Nightly docs auditor.
  5. Choose a preset or switch to Custom.
  6. Optionally add allowed origins, one per line.
  7. Optionally set an expiration in UTC.
  8. Click Create key.
  9. Copy the raw sk_org_... value immediately.

Kravos.ai stores only a hash. The raw key is shown once after creation or rotation.

Connect With A Header

Platform MCP accepts either header format:

Authorization: Bearer sk_org_...

or:

x-api-key: sk_org_...

If x-api-key is present, Kravos.ai tries it first. If bearer auth is present, Kravos.ai can authenticate either an OAuth access token or an API key.

Key Fields

FieldBehavior
nameHuman-readable label.
permissionsRequired normal MCP permissions such as docs:read or sources:write.
destructivePermissionsSeparate delete, revoke, deactivate, and archive permissions. Default is empty.
allowedOriginsOptional exact web origins. Blank allows server-to-server clients from any origin.
rateLimitOptional requests-per-minute setting. If omitted by API creation, the domain default is 60.
expiresAtOptional ISO datetime. Expired keys cannot authenticate.

The dashboard create form exposes name, preset/custom permissions, destructive permissions, allowed origins, and expiration. MCP API-key tools also support resourceGrants and rateLimit for advanced automation.

Allowed Origins

Allowed origins are normalized to URL origins. For example, this input:

https://app.example.com/dashboard

becomes:

https://app.example.com

Only http and https origins are accepted. If a key has allowed origins configured, MCP requests must include a matching Origin header. Server-to-server clients normally leave allowed origins blank.

Rotate A Key

Rotation replaces the stored hash on the same key record and returns a new raw key once.

  1. Create or prepare the replacement client configuration.
  2. In Org API Keys, click Rotate.
  3. Copy the new raw key.
  4. Update the MCP client.
  5. Confirm the key's Last used timestamp updates.

The old raw key stops working immediately after rotation.

Revoke A Key

Revoke a key when it should stop working permanently.

Revoked keys stay in audit/history records, but authentication rejects them. Revoked keys cannot be rotated from the dashboard route.

Manage Keys Through MCP

The Platform MCP server includes API-key management tools. Use them only from a key or OAuth connection that already has the required permission.

ToolPermissionPurpose
list_api_keysapi_keys:readList org and agent key metadata without hashes.
get_api_keyapi_keys:readRead one key metadata record.
create_api_keyapi_keys:writeCreate an org API key and return oneTimeRawKey.
update_api_keyapi_keys:writeUpdate permissions, grants, origins, rate limit, or expiry.
rotate_api_keyapi_keys:revokeRotate a key and return oneTimeRawKey. This is destructive.
revoke_api_keyapi_keys:revokeRevoke a key. This is destructive.

Agent API Keys And MCP

Existing agent API keys can authenticate to Platform MCP, but they are deliberately narrow.

Agent key permissionMCP permissions it can map to
chatchat:write
retrievesources:read, retrieval:read
ingestsources:write

Agent API keys also keep safe agent-adjacent read permissions such as agent, media, skills, MCP server, voice, playground, and docs reads. They cannot get destructive permissions and can only target their own agent unless an explicit resource grant exists.

Audit Events

The dashboard lists recent MCP activity under MCP Connections → Recent Audit Events.

Key events include:

  • mcp.org_api_key.create
  • mcp.org_api_key.update
  • mcp.org_api_key.rotate
  • mcp.org_api_key.revoke
  • mcp.tool.call
  • mcp.tool.denied
  • mcp.tool.destructive

Sensitive fields such as tokens, raw keys, secrets, headers, passwords, and private keys are redacted in the audit-event API response.

MCP Permissions

Pick a preset and understand destructive access before creating keys.

MCP Client Configs

Use an org key with Claude Desktop, Cursor, OpenCode, or a custom client.

Last updated: August 2026