Authentication
The MCP server uses your Custodian Labs API key, the same one the SDKs and APIs use. Send it as a bearer token:
Authorization: Bearer custodian_labs_...
Note that this is different from the REST APIs, which take the key in an X-API-Key
header.
- No header returns
401withMissing API key. - An invalid or expired key returns
401withInvalid API keyand a reason.
The generated Python code doesn't contain your key. It reads CUSTODIAN_SDK_API_KEY
from the environment when you run it.
Keep the key in your client's secret storage where it has one, such as VS Code inputs. Don't commit MCP config files that contain a key. See Use API keys securely.