Token hygiene
The secret from Developer → API keys is shown once — same rules as authentication.
Stdio (local IDE)
- Keys live in
~/.cursor/mcp.jsonor Claude Desktop config on your machine - Anyone with access to your laptop can read them — use full-disk encryption and a separate dev key
- Prefer a dedicated read-only key when exploring
Hosted (/mcp)
- Call only from trusted servers you control
- Terminate TLS at your edge; never downgrade to HTTP
- Pass
Authorization: Bearerserver-side; never forward the key to browsers or mobile apps - Hosted POSTs are rate-limited per credential (default 120/min,
MCP_RATE_LIMIT_PER_MIN; set0to disable) - GraphQL tool calls time out by default after 30s (
KARZOUN_MCP_FETCH_TIMEOUT_MS)
Permission scoping
Before giving an agent write tools (customersAdd, tagsRemove, …):
- Create a key limited to the required scopes (and a user group, for a workspace key)
- Test mutations in the Playground
- Optionally set
KARZOUN_MCP_TOOL_PREFIXto read-only prefixes during development
Agent safety
LLMs can call mutations unexpectedly. Mitigations:- System prompts that require confirmation before deletes/merges (agent patterns)
- Read-only keys for analytics agents
- Audit key usage via Karzoun logs where available
Comparison with other integrations
Incident response
If a key leaks:- Revoke it in Developer → API keys
- Create a new key and update the MCP config or server secrets
- Review recent GraphQL activity if audit tools are enabled
Related
- Troubleshooting — Permission and 401 errors
- Tenant webhooks — Outbound events (different threat model)