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 login
2

Give it to the server

Recommended: put it in the client config's env block (see the Cursor, Claude, or VS Code pages). Or export it so the launched server inherits it:

$export SENTRASEC_API_KEY=sk_live_...

Never commit the key. Override the endpoint with SENTRASEC_API_URL for self-hosted deployments.

Resolution order

1. env in client configSENTRASEC_API_KEY passed in the server's env.
2. shell environmentSENTRASEC_API_KEY exported before the client launches.
3. credentials file~/.sentrasec/credentials (from sentrasec login).