Encryption at rest
Flow state is stored server-side via the WaniWani KV store. The SDK supports AES-256-GCM encryption — values are encrypted before they leave your MCP server process and decrypted on read. The WaniWani server never sees plaintext flow state.Managed project
Encryption is automatic. WaniWani generates and manages the key for you — nothing to configure.
External project
You generate a key and add it to your MCP server’s environment.
Managed projects
Encryption is enabled automatically. WaniWani generates and stores the encryption key as an environment variable in your deployed instance. No setup is needed — flow state is encrypted out of the box and the key is never exposed.External projects
You need to generate a key and add it to your MCP server’s environment:.env
How it works
WhenWANIWANI_ENCRYPTION_KEY is set:
- On write — the SDK serializes the value to JSON, encrypts it with AES-256-GCM using a random 12-byte IV, and stores an encrypted envelope in the KV store.
- On read — the SDK detects the encrypted envelope, decrypts the ciphertext, and returns the original value.
Key rotation
The SDK does not support automatic key rotation. To rotate:- Set the new key in your environment.
- Trigger each active flow so its state is re-read with the old key (which will fail) and re-written with the new key.
API key handling
API keys (WANIWANI_API_KEY) authenticate your MCP server to the WaniWani platform. Treat them as server-side secrets:
- Never commit them to version control.
- Never include them in client-side bundles.
- Store them in your platform’s secret manager or a gitignored
.envfile. - Use separate keys for Staging and Production environments.