Authentication
The MCP server reaches your workspace with the same API key as the CLI. Provide it in the client config's env, or set it in your shell so the server inherits it.
1
Get an API key
Create one in Settings → API keys, or log in with the CLI (writes to ~/.sentrasec/credentials):
$sentrasec login2
Give it to the server
Resolution order
| 1. env in client config | SENTRASEC_API_KEY passed in the server's env. |
| 2. shell environment | SENTRASEC_API_KEY exported before the client launches. |
| 3. credentials file | ~/.sentrasec/credentials (from sentrasec login). |