Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

configuration-reference changedmanaged-agents/self-hosted/configuration-reference

Nearest release: v2.1.330, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+175added
Lines−175removed
From line 48 where the diff opens
First seen 12 Nov 2026 this site's first read of the page
Recorded edits3to this page, all time

The whole hunk

from line 48, old and new numbered
/
lines
from line 48
4848 
4949## Server and logging
5050 
51| Setting<br />Environment variable | Default | Description |
52| --------------------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53| `server.addr`<br />`CMA_SERVER__ADDR` | `127.0.0.1:8400` | The address that the server listens on. |
54| `server.api_key`<br />`CMA_SERVER__API_KEY` | None | The [server API key](https://platform.claude.com/docs/en/managed-agents/self-hosted#the-three-credentials). Required with `store.backend: postgres`, unless `auth.refuse_server_api_key` is `true`. With `memory`, the server generates a key if you set none, and logs it at startup. |
55| `server.id_marker`<br />`CMA_SERVER__ID_MARKER` | `local` | What follows the prefix in each ID that the server creates. `local` gives `sesn_local_01…`, and `none` gives `sesn_01…`, as on the hosted service. |
56| `server.shutdown_delay`<br />`CMA_SERVER__SHUTDOWN_DELAY` | `0s` | How long the server keeps serving after a stop signal, while its readiness probe answers `not_ready`. The maximum is `5m`. |
57| `server.max_connections`<br />`CMA_SERVER__MAX_CONNECTIONS` | `0` | The most connections that the server holds open at once on `server.addr`. `0` means no limit. At the limit, a new connection waits until another closes or its client gives up. Event streams, worker polls, and health probes all count. On Kubernetes, the kubelet restarts a pod whose probes wait too long. |
58| `logging.format`<br />`CMA_LOGGING__FORMAT` | `text` | The log format, `text` or `json`. |
59| `logging.level`<br />`CMA_LOGGING__LEVEL` | `info` | The lowest level that the server logs. The values are `debug`, `info`, `warn`, and `error`. |
60| `logging.errors`<br />`CMA_LOGGING__ERRORS` | `false` | Whether the log includes the error messages of `4xx` and `5xx` responses. A message can quote a value that the client sent. |
61| `health.check_interval`<br />`CMA_HEALTH__CHECK_INTERVAL` | `60s` | How often the server checks its inference credential for the readiness probe. The minimum is `5s`. |
62| `health.upstream_affects_readiness`<br />`CMA_HEALTH__UPSTREAM_AFFECTS_READINESS` | `true` | Whether the readiness probe answers `503` while the inference provider rejects the server’s credential. |
51| Setting<br />Environment variable | Default | Description |
52| ----- | ----- | ----- |
53| `server.addr`<br />`CMA_SERVER__ADDR` | `127.0.0.1:8400` | The address that the server listens on. |
54| `server.api_key`<br />`CMA_SERVER__API_KEY` | None | The [server API key](https://platform.claude.com/docs/en/managed-agents/self-hosted#the-three-credentials). Required with `store.backend: postgres`, unless `auth.refuse_server_api_key` is `true`. With `memory`, the server generates a key if you set none, and logs it at startup. |
55| `server.id_marker`<br />`CMA_SERVER__ID_MARKER` | `local` | What follows the prefix in each ID that the server creates. `local` gives `sesn_local_01…`, and `none` gives `sesn_01…`, as on the hosted service. |
56| `server.shutdown_delay`<br />`CMA_SERVER__SHUTDOWN_DELAY` | `0s` | How long the server keeps serving after a stop signal, while its readiness probe answers `not_ready`. The maximum is `5m`. |
57| `server.max_connections`<br />`CMA_SERVER__MAX_CONNECTIONS` | `0` | The most connections that the server holds open at once on `server.addr`. `0` means no limit. At the limit, a new connection waits until another closes or its client gives up. Event streams, worker polls, and health probes all count. On Kubernetes, the kubelet restarts a pod whose probes wait too long. |
58| `logging.format`<br />`CMA_LOGGING__FORMAT` | `text` | The log format, `text` or `json`. |
59| `logging.level`<br />`CMA_LOGGING__LEVEL` | `info` | The lowest level that the server logs. The values are `debug`, `info`, `warn`, and `error`. |
60| `logging.errors`<br />`CMA_LOGGING__ERRORS` | `false` | Whether the log includes the error messages of `4xx` and `5xx` responses. A message can quote a value that the client sent. |
61| `health.check_interval`<br />`CMA_HEALTH__CHECK_INTERVAL` | `60s` | How often the server checks its inference credential for the readiness probe. The minimum is `5s`. |
62| `health.upstream_affects_readiness`<br />`CMA_HEALTH__UPSTREAM_AFFECTS_READINESS` | `true` | Whether the readiness probe answers `503` while the inference provider rejects the server’s credential. |
6363 
6464## Database
6565 
6666Every setting in this table except `store.backend` applies only with `store.backend: postgres`.
6767 
68| Setting<br />Environment variable | Default | Description |
69| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
70| `store.backend`<br />`CMA_STORE__BACKEND` | `memory` | Where the server keeps its data. The values are `memory`, which a restart erases, and `postgres`. |
71| `store.database_url`<br />`CMA_STORE__DATABASE_URL` | None | The PostgreSQL connection string. Required with `postgres`. |
72| `store.control_database_url`<br />`CMA_STORE__CONTROL_DATABASE_URL` | The value of `store.database_url` | The connection string for the server’s own upkeep connections, such as its heartbeat. |
73| `store.listen_database_url`<br />`CMA_STORE__LISTEN_DATABASE_URL` | The value of `store.database_url` | The connection string for the one connection on which the server listens for notifications. A connection pooler in transaction mode can’t carry that connection. |
74| `store.migrate_database_url`<br />`CMA_STORE__MIGRATE_DATABASE_URL` | The value of `store.database_url` | The connection string that the server’s `migrate` command uses. A connection pooler in transaction mode can’t carry that connection. |
75| `store.pool_max_conns`<br />`CMA_STORE__POOL_MAX_CONNS` | `24` | The most database connections that one server’s pool opens. The minimum is `4`. |
76| `store.event_poll_interval`<br />`CMA_STORE__EVENT_POLL_INTERVAL` | `25ms` | How often each server asks the database for the latest events in the sessions that its clients are streaming. An event that another server recorded waits at most about this long to reach the stream. |
77| `store.credentials_encryption_key`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEY`<br />Environment only | None | The key that encrypts stored credentials in the database, as 32 random bytes in base64. The Docker Compose and Kubernetes installs set it. The server doesn’t start without it, unless `store.allow_unencrypted_credentials` is `true`. |
78| `store.allow_unencrypted_credentials`<br />`CMA_STORE__ALLOW_UNENCRYPTED_CREDENTIALS` | `false` | Whether the server can start without `store.credentials_encryption_key`. Without the key, it stores credentials in the database in plain text. `true` has no effect if `git.allowed_hostnames` lists a host, or if you install with Docker Compose or the server Helm chart. |
79| `store.credentials_encryption_keys_retiring`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEYS_RETIRING`<br />Environment only | None | Earlier encryption keys that the server can still decrypt with during a key rotation. This setting needs `store.credentials_encryption_key`. |
68| Setting<br />Environment variable | Default | Description |
69| ----- | ----- | ----- |
70| `store.backend`<br />`CMA_STORE__BACKEND` | `memory` | Where the server keeps its data. The values are `memory`, which a restart erases, and `postgres`. |
71| `store.database_url`<br />`CMA_STORE__DATABASE_URL` | None | The PostgreSQL connection string. Required with `postgres`. |
72| `store.control_database_url`<br />`CMA_STORE__CONTROL_DATABASE_URL` | The value of `store.database_url` | The connection string for the server’s own upkeep connections, such as its heartbeat. |
73| `store.listen_database_url`<br />`CMA_STORE__LISTEN_DATABASE_URL` | The value of `store.database_url` | The connection string for the one connection on which the server listens for notifications. A connection pooler in transaction mode can’t carry that connection. |
74| `store.migrate_database_url`<br />`CMA_STORE__MIGRATE_DATABASE_URL` | The value of `store.database_url` | The connection string that the server’s `migrate` command uses. A connection pooler in transaction mode can’t carry that connection. |
75| `store.pool_max_conns`<br />`CMA_STORE__POOL_MAX_CONNS` | `24` | The most database connections that one server’s pool opens. The minimum is `4`. |
76| `store.event_poll_interval`<br />`CMA_STORE__EVENT_POLL_INTERVAL` | `25ms` | How often each server asks the database for the latest events in the sessions that its clients are streaming. An event that another server recorded waits at most about this long to reach the stream. |
77| `store.credentials_encryption_key`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEY`<br />Environment only | None | The key that encrypts stored credentials in the database, as 32 random bytes in base64. The Docker Compose and Kubernetes installs set it. The server doesn’t start without it, unless `store.allow_unencrypted_credentials` is `true`. |
78| `store.allow_unencrypted_credentials`<br />`CMA_STORE__ALLOW_UNENCRYPTED_CREDENTIALS` | `false` | Whether the server can start without `store.credentials_encryption_key`. Without the key, it stores credentials in the database in plain text. `true` has no effect if `git.allowed_hostnames` lists a host, or if you install with Docker Compose or the server Helm chart. |
79| `store.credentials_encryption_keys_retiring`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEYS_RETIRING`<br />Environment only | None | Earlier encryption keys that the server can still decrypt with during a key rotation. This setting needs `store.credentials_encryption_key`. |
8080 
8181## Inference provider
8282 
8383To set up a provider, see [Inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider).
8484 
85| Setting<br />Environment variable | Default | Description |
86| -------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87| `inference.provider`<br />`CMA_INFERENCE__PROVIDER` | `anthropic` | Where the server sends model calls. The values are `anthropic`, `bedrock`, `vertex`, `foundry`, and `gateway`. |
88| `inference.headers`<br />File only | None | Request headers that the server adds to every model call, as a map of header name to value. Quote every value. The server refuses to start on an unquoted value that YAML doesn’t read as text, such as `true` or `0042`. With `gateway`, a value can also be `{ from: request_id }` or `{ from: session_id }`. |
89| `inference.model_fallback`<br />`CMA_INFERENCE__MODEL_FALLBACK` | `true` | `anthropic` only. Whether model calls ask for [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). Those calls carry a `fallbacks` field and the header `anthropic-beta: server-side-fallback-2026-07-01`. A proxy that you name in `ANTHROPIC_BASE_URL` might reject the field or the header. If it answers with a `400` or a `422`, the server sends the call again without them. |
90| `inference.metadata.user_id`<br />`CMA_INFERENCE__METADATA__USER_ID` | None | `anthropic` and `foundry` only, or `gateway` with `format: anthropic-messages`. One identifier that the server sends as `metadata.user_id` with every model call. The startup log prints it. Without this setting, the server sends the label `cma-server`. You can’t turn `metadata.user_id` off. If the provider or a proxy rejects it, every model call fails. See [What leaves your network](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#what-leaves-your-network). |
85| Setting<br />Environment variable | Default | Description |
86| ----- | ----- | ----- |
87| `inference.provider`<br />`CMA_INFERENCE__PROVIDER` | `anthropic` | Where the server sends model calls. The values are `anthropic`, `bedrock`, `vertex`, `foundry`, and `gateway`. |
88| `inference.headers`<br />File only | None | Request headers that the server adds to every model call, as a map of header name to value. Quote every value. The server refuses to start on an unquoted value that YAML doesn’t read as text, such as `true` or `0042`. With `gateway`, a value can also be `{ from: request_id }` or `{ from: session_id }`. |
89| `inference.model_fallback`<br />`CMA_INFERENCE__MODEL_FALLBACK` | `true` | `anthropic` only. Whether model calls ask for [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). Those calls carry a `fallbacks` field and the header `anthropic-beta: server-side-fallback-2026-07-01`. A proxy that you name in `ANTHROPIC_BASE_URL` might reject the field or the header. If it answers with a `400` or a `422`, the server sends the call again without them. |
90| `inference.metadata.user_id`<br />`CMA_INFERENCE__METADATA__USER_ID` | None | `anthropic` and `foundry` only, or `gateway` with `format: anthropic-messages`. One identifier that the server sends as `metadata.user_id` with every model call. The startup log prints it. Without this setting, the server sends the label `cma-server`. You can’t turn `metadata.user_id` off. If the provider or a proxy rejects it, every model call fails. See [What leaves your network](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#what-leaves-your-network). |
9191 
9292### Cloud providers
9393 
94| Setting<br />Environment variable | Default | Description |
95| -------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
96| `inference.region`<br />`CMA_INFERENCE__REGION` | None | `bedrock` and `vertex` only. The AWS Region, or the location in Google Cloud’s Agent Platform. Required with `vertex`. Without it, `bedrock` uses the Region that the AWS SDK’s default chain finds. |
97| `inference.project_id`<br />`CMA_INFERENCE__PROJECT_ID` | None | `vertex` only. The Google Cloud project that the calls are made in. Required unless the Google credential names a project. |
98| `inference.api`<br />`CMA_INFERENCE__API` | `invoke_model` | `bedrock` only. The Amazon Bedrock API that carries the calls, `invoke_model` or `messages`. `messages` is the endpoint that [Claude in Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) describes. With it, the server’s AWS role needs `bedrock-mantle:CreateInference` in place of `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`. |
99| `inference.list_models`<br />`CMA_INFERENCE__LIST_MODELS` | `true` | `bedrock` only. Whether the server reads Amazon Bedrock’s lists of Claude models. With those lists, agents can use a model that came out after your server’s release. |
100| `inference.model_id_prefix`<br />`CMA_INFERENCE__MODEL_ID_PREFIX` | `us.anthropic.` | `bedrock` only. The text that the server puts before each model ID. With `inference.api: messages`, the default is `anthropic.`. |
101| `inference.model_id_overrides`<br />File only | None | `bedrock`, `vertex`, and `foundry` only. A map of model ID to the exact ID that the provider expects. With `foundry`, that ID is a deployment name. |
102| `inference.foundry.resource`<br />`CMA_INFERENCE__FOUNDRY__RESOURCE` | None | `foundry` only. The name of the Foundry resource. Set this or `inference.foundry.base_url`, not both. |
103| `inference.foundry.base_url`<br />`CMA_INFERENCE__FOUNDRY__BASE_URL` | None | `foundry` only. By default, calls go to `https://<resource>.services.ai.azure.com/anthropic`. To reach the resource at another address, such as a proxy, set that URL here instead. It ends in `/anthropic`. |
94| Setting<br />Environment variable | Default | Description |
95| ----- | ----- | ----- |
96| `inference.region`<br />`CMA_INFERENCE__REGION` | None | `bedrock` and `vertex` only. The AWS Region, or the location in Google Cloud’s Agent Platform. Required with `vertex`. Without it, `bedrock` uses the Region that the AWS SDK’s default chain finds. |
97| `inference.project_id`<br />`CMA_INFERENCE__PROJECT_ID` | None | `vertex` only. The Google Cloud project that the calls are made in. Required unless the Google credential names a project. |
98| `inference.api`<br />`CMA_INFERENCE__API` | `invoke_model` | `bedrock` only. The Amazon Bedrock API that carries the calls, `invoke_model` or `messages`. `messages` is the endpoint that [Claude in Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) describes. With it, the server’s AWS role needs `bedrock-mantle:CreateInference` in place of `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`. |
99| `inference.list_models`<br />`CMA_INFERENCE__LIST_MODELS` | `true` | `bedrock` only. Whether the server reads Amazon Bedrock’s lists of Claude models. With those lists, agents can use a model that came out after your server’s release. |
100| `inference.model_id_prefix`<br />`CMA_INFERENCE__MODEL_ID_PREFIX` | `us.anthropic.` | `bedrock` only. The text that the server puts before each model ID. With `inference.api: messages`, the default is `anthropic.`. |
101| `inference.model_id_overrides`<br />File only | None | `bedrock`, `vertex`, and `foundry` only. A map of model ID to the exact ID that the provider expects. With `foundry`, that ID is a deployment name. |
102| `inference.foundry.resource`<br />`CMA_INFERENCE__FOUNDRY__RESOURCE` | None | `foundry` only. The name of the Foundry resource. Set this or `inference.foundry.base_url`, not both. |
103| `inference.foundry.base_url`<br />`CMA_INFERENCE__FOUNDRY__BASE_URL` | None | `foundry` only. By default, calls go to `https://<resource>.services.ai.azure.com/anthropic`. To reach the resource at another address, such as a proxy, set that URL here instead. It ends in `/anthropic`. |
104104 
105105### Model gateway
106106 
107107These settings apply only with `inference.provider: gateway`. See [Model gateway](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider#model-gateway).
108108 
109| Setting<br />Environment variable | Default | Description |
110| ----------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
111| `inference.gateway.url`<br />`CMA_INFERENCE__GATEWAY__URL` | None | Required. The URL that receives model calls. With `bedrock-invoke` and `vertex-raw-predict`, `{model}` marks where the model ID goes. With `vertex-raw-predict`, the URL must end in `/{model}:rawPredict`. |
112| `inference.gateway.format`<br />`CMA_INFERENCE__GATEWAY__FORMAT` | None | Required. The request format that the gateway accepts: `bedrock-invoke`, `anthropic-messages`, or `vertex-raw-predict`. |
113| `inference.gateway.model_map`<br />File only | None | Required. A map of each model ID that agents can name to the ID that the gateway expects. Quote every value, as for `inference.headers`. |
114| `inference.gateway.streaming`<br />`CMA_INFERENCE__GATEWAY__STREAMING` | `false` | Whether the server sends the format’s streamed call, so that replies arrive as the model produces them. With `bedrock-invoke`, that call goes to the same URL with `-with-response-stream` appended. With `vertex-raw-predict`, that call goes to the same URL with `:streamRawPredict` in place of `:rawPredict`. Leave `:rawPredict` in `inference.gateway.url`. |
115| `inference.credentials.supplier`<br />`CMA_INFERENCE__CREDENTIALS__SUPPLIER` | None | Required. Where the gateway’s credential comes from. `env` means one long-lived key, `oauth_exchange` means short-lived tokens, and `azure` means Microsoft Entra ID tokens issued to the server’s own Azure identity. |
116| `inference.credentials.env.var`<br />`CMA_INFERENCE__CREDENTIALS__ENV__VAR` | None | Required with `env`. The name of the environment variable that holds the key. |
117| `inference.credentials.azure.scope`<br />`CMA_INFERENCE__CREDENTIALS__AZURE__SCOPE` | None | Required with `azure`. The scope that the server requests tokens for: the application ID URI or the application ID of your gateway’s app registration, followed by `/.default`. |
118| `inference.credentials.send_as.header`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__HEADER` | `Authorization` | The request header that carries the credential. |
119| `inference.credentials.send_as.scheme`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__SCHEME` | `Bearer` | The word that precedes the credential in the header. Under any header other than `Authorization`, the default is no scheme. |
120| `inference.credentials.renew_before`<br />`CMA_INFERENCE__CREDENTIALS__RENEW_BEFORE` | `90s` | With `oauth_exchange`, how early the server replaces a token. It stops using a cached token this long before the token expires, and gets another one for the next model call. Keep the value below your tokens’ lifetime. The server refuses any token that is valid for less than this value. |
109| Setting<br />Environment variable | Default | Description |
110| ----- | ----- | ----- |
111| `inference.gateway.url`<br />`CMA_INFERENCE__GATEWAY__URL` | None | Required. The URL that receives model calls. With `bedrock-invoke` and `vertex-raw-predict`, `{model}` marks where the model ID goes. With `vertex-raw-predict`, the URL must end in `/{model}:rawPredict`. |
112| `inference.gateway.format`<br />`CMA_INFERENCE__GATEWAY__FORMAT` | None | Required. The request format that the gateway accepts: `bedrock-invoke`, `anthropic-messages`, or `vertex-raw-predict`. |
113| `inference.gateway.model_map`<br />File only | None | Required. A map of each model ID that agents can name to the ID that the gateway expects. Quote every value, as for `inference.headers`. |
114| `inference.gateway.streaming`<br />`CMA_INFERENCE__GATEWAY__STREAMING` | `false` | Whether the server sends the format’s streamed call, so that replies arrive as the model produces them. With `bedrock-invoke`, that call goes to the same URL with `-with-response-stream` appended. With `vertex-raw-predict`, that call goes to the same URL with `:streamRawPredict` in place of `:rawPredict`. Leave `:rawPredict` in `inference.gateway.url`. |
115| `inference.credentials.supplier`<br />`CMA_INFERENCE__CREDENTIALS__SUPPLIER` | None | Required. Where the gateway’s credential comes from. `env` means one long-lived key, `oauth_exchange` means short-lived tokens, and `azure` means Microsoft Entra ID tokens issued to the server’s own Azure identity. |
116| `inference.credentials.env.var`<br />`CMA_INFERENCE__CREDENTIALS__ENV__VAR` | None | Required with `env`. The name of the environment variable that holds the key. |
117| `inference.credentials.azure.scope`<br />`CMA_INFERENCE__CREDENTIALS__AZURE__SCOPE` | None | Required with `azure`. The scope that the server requests tokens for: the application ID URI or the application ID of your gateway’s app registration, followed by `/.default`. |
118| `inference.credentials.send_as.header`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__HEADER` | `Authorization` | The request header that carries the credential. |
119| `inference.credentials.send_as.scheme`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__SCHEME` | `Bearer` | The word that precedes the credential in the header. Under any header other than `Authorization`, the default is no scheme. |
120| `inference.credentials.renew_before`<br />`CMA_INFERENCE__CREDENTIALS__RENEW_BEFORE` | `90s` | With `oauth_exchange`, how early the server replaces a token. It stops using a cached token this long before the token expires, and gets another one for the next model call. Keep the value below your tokens’ lifetime. The server refuses any token that is valid for less than this value. |
121121 
122122### Short-lived gateway tokens
123123 
124124These settings apply only with `inference.credentials.supplier: oauth_exchange`. See [Short-lived tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider#short-lived-tokens). The `exchange` settings are optional as a group. Without them, the server sends the gateway what the callback returns.
125125 
126| Setting<br />Environment variable | Default | Description |
127| ----------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
128| `inference.credentials.assertion.url`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__URL` | None | Required. The URL of the HTTP callback that returns a signed assertion. |
129| `inference.credentials.assertion.auth.type`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TYPE` | None | Required. How the server authenticates to the callback, `mtls` or `bearer_file`. |
130| `inference.credentials.assertion.auth.cert_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CERT_FILE` | None | Required with `mtls`. The path of the server’s client certificate. |
131| `inference.credentials.assertion.auth.key_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__KEY_FILE` | None | Required with `mtls`. The path of the client certificate’s private key. |
132| `inference.credentials.assertion.auth.token_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TOKEN_FILE` | None | Required with `bearer_file`. The path of a file that holds the bearer token. |
133| `inference.credentials.assertion.auth.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the callback. |
134| `inference.credentials.assertion.forward_metadata`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__FORWARD_METADATA` | None | The session metadata keys whose values the server sends to the callback. They arrive as `session.metadata` in the request body. The values are whatever the API caller wrote, so check them against your own records. |
135| `inference.credentials.exchange.token_url`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__TOKEN_URL` | None | Required for an exchange. The OAuth token endpoint where the server exchanges the assertion for a token. |
136| `inference.credentials.exchange.grant_type`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__GRANT_TYPE` | None | Required for an exchange. The `grant_type` that the server sends, such as `urn:ietf:params:oauth:grant-type:jwt-bearer`. |
137| `inference.credentials.exchange.encoding`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__ENCODING` | `form` | How the server encodes the exchange request, `form` or `multipart`. |
138| `inference.credentials.exchange.expiry`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__EXPIRY` | `expires_in` | Where the server reads the token’s lifetime. `expires_in` means the earlier of the response’s `expires_in` and the token’s `exp` claim. `jwt_exp` means the `exp` claim alone. |
139| `inference.credentials.exchange.headers`<br />File only | None | Extra request headers for the token endpoint, as a map of header name to value. Quote every value, as for `inference.headers`. |
140| `inference.credentials.exchange.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the token endpoint. |
126| Setting<br />Environment variable | Default | Description |
127| ----- | ----- | ----- |
128| `inference.credentials.assertion.url`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__URL` | None | Required. The URL of the HTTP callback that returns a signed assertion. |
129| `inference.credentials.assertion.auth.type`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TYPE` | None | Required. How the server authenticates to the callback, `mtls` or `bearer_file`. |
130| `inference.credentials.assertion.auth.cert_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CERT_FILE` | None | Required with `mtls`. The path of the server’s client certificate. |
131| `inference.credentials.assertion.auth.key_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__KEY_FILE` | None | Required with `mtls`. The path of the client certificate’s private key. |
132| `inference.credentials.assertion.auth.token_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TOKEN_FILE` | None | Required with `bearer_file`. The path of a file that holds the bearer token. |
133| `inference.credentials.assertion.auth.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the callback. |
134| `inference.credentials.assertion.forward_metadata`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__FORWARD_METADATA` | None | The session metadata keys whose values the server sends to the callback. They arrive as `session.metadata` in the request body. The values are whatever the API caller wrote, so check them against your own records. |
135| `inference.credentials.exchange.token_url`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__TOKEN_URL` | None | Required for an exchange. The OAuth token endpoint where the server exchanges the assertion for a token. |
136| `inference.credentials.exchange.grant_type`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__GRANT_TYPE` | None | Required for an exchange. The `grant_type` that the server sends, such as `urn:ietf:params:oauth:grant-type:jwt-bearer`. |
137| `inference.credentials.exchange.encoding`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__ENCODING` | `form` | How the server encodes the exchange request, `form` or `multipart`. |
138| `inference.credentials.exchange.expiry`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__EXPIRY` | `expires_in` | Where the server reads the token’s lifetime. `expires_in` means the earlier of the response’s `expires_in` and the token’s `exp` claim. `jwt_exp` means the `exp` claim alone. |
139| `inference.credentials.exchange.headers`<br />File only | None | Extra request headers for the token endpoint, as a map of header name to value. Quote every value, as for `inference.headers`. |
140| `inference.credentials.exchange.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the token endpoint. |
141141 
142142## Single sign-on
143143 
144144To set up sign-in, see [Single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure).
145145 
146| Setting<br />Environment variable | Default | Description |
147| ------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148| `auth.issuers`<br />File only | None | The OpenID Connect issuers whose tokens the server accepts. See [Issuer entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#issuer-entries). |
149| `auth.refuse_server_api_key`<br />File only | `false` | Whether the server refuses the server API key on every route. `true` needs at least one issuer. Every admin CLI command that takes the key then fails. |
146| Setting<br />Environment variable | Default | Description |
147| ----- | ----- | ----- |
148| `auth.issuers`<br />File only | None | The OpenID Connect issuers whose tokens the server accepts. See [Issuer entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#issuer-entries). |
149| `auth.refuse_server_api_key`<br />File only | `false` | Whether the server refuses the server API key on every route. `true` needs at least one issuer. Every admin CLI command that takes the key then fails. |
150150 
151151### Issuer entries
152152 
153153Each entry of `auth.issuers` takes these fields:
154154 
155| Field | Default | Description |
156| ----------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
157| `name` | None | Required. A label for the issuer in log lines. The server also records it as part of the creator of each resource. |
158| `issuer_url` | None | Required. The issuer’s URL, exactly as in the `iss` claim of its tokens. The server fetches signing keys from this host and from the `jwks_uri` host that the issuer’s discovery document names. If your network limits outbound connections, admit both hosts. |
159| `audiences` | None | Required. The values that a token’s `aud` claim can carry. If applications forward tokens that they already hold, list each application’s client ID. |
160| `roles` | None | A list of `group` and `role` pairs. A group matches exactly, or as a pattern in which `*` stands for any run of characters and `?` for one character. A role is `admin`, `developer`, or `user`. The highest matching role wins. Set `roles`, `default_role`, or both. |
161| `default_role` | None | The role of a caller whose groups match no `roles` entry. Set it only if everyone who can get a token for this audience should have access. |
162| `subject_claim` | `sub` | The claim that identifies the caller. A name that starts with `/` is a JSON Pointer into nested claims. |
163| `stable_subject` | `false` | Applies only if `subject_claim` names a claim other than `sub` or `oid`. Set `true` to confirm that your provider never changes a person’s value of that claim and never gives it to someone else. The server doesn’t check this. With `false`, [agent tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#agent-identity) omit the `actor_sub` and `actor_iss` claims. |
164| `groups_claim` | `groups` | The claim that lists the caller’s groups. A name that starts with `/` is a JSON Pointer into nested claims. |
165| `jwks_file` | None | The path of a JSON Web Key Set file. The server reads signing keys from it and never contacts the issuer. |
166| `login_client_id` | None | The client ID of the application that [terminal login](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#let-developers-log-in-from-a-terminal) uses. Only one issuer can set it. |
167| `login_scopes` | `[openid]` | The scopes that the login requests. This field needs `login_client_id`. |
155| Field | Default | Description |
156| ----- | ----- | ----- |
157| `name` | None | Required. A label for the issuer in log lines. The server also records it as part of the creator of each resource. |
158| `issuer_url` | None | Required. The issuer’s URL, exactly as in the `iss` claim of its tokens. The server fetches signing keys from this host and from the `jwks_uri` host that the issuer’s discovery document names. If your network limits outbound connections, admit both hosts. |
159| `audiences` | None | Required. The values that a token’s `aud` claim can carry. If applications forward tokens that they already hold, list each application’s client ID. |
160| `roles` | None | A list of `group` and `role` pairs. A group matches exactly, or as a pattern in which `*` stands for any run of characters and `?` for one character. A role is `admin`, `developer`, or `user`. The highest matching role wins. Set `roles`, `default_role`, or both. |
161| `default_role` | None | The role of a caller whose groups match no `roles` entry. Set it only if everyone who can get a token for this audience should have access. |
162| `subject_claim` | `sub` | The claim that identifies the caller. A name that starts with `/` is a JSON Pointer into nested claims. |
163| `stable_subject` | `false` | Applies only if `subject_claim` names a claim other than `sub` or `oid`. Set `true` to confirm that your provider never changes a person’s value of that claim and never gives it to someone else. The server doesn’t check this. With `false`, [agent tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#agent-identity) omit the `actor_sub` and `actor_iss` claims. |
164| `groups_claim` | `groups` | The claim that lists the caller’s groups. A name that starts with `/` is a JSON Pointer into nested claims. |
165| `jwks_file` | None | The path of a JSON Web Key Set file. The server reads signing keys from it and never contacts the issuer. |
166| `login_client_id` | None | The client ID of the application that [terminal login](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#let-developers-log-in-from-a-terminal) uses. Only one issuer can set it. |
167| `login_scopes` | `[openid]` | The scopes that the login requests. This field needs `login_client_id`. |
168168 
169169## Secret manager
170170 
171171To set up a store, see [Secret manager](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#secret-manager).
172172 
173| Setting<br />Environment variable | Default | Description |
174| ----------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
175| `secret_store.type`<br />`CMA_SECRET_STORE__TYPE` | None | The secret manager that holds vault credentials. The values are `aws_secrets_manager`, `gcp_secret_manager`, `azure_key_vault`, and `hashicorp_vault`. Without it, vault credentials stay in the database. |
176| `secret_store.prefix`<br />`CMA_SECRET_STORE__PREFIX` | None | Required with `secret_store.type`. The start of the name of every secret that the server creates. It must end with `/` for `aws_secrets_manager` and `hashicorp_vault`, with `-` or `_` for `gcp_secret_manager`, and with `-` for `azure_key_vault`. |
177| `secret_store.region`<br />`CMA_SECRET_STORE__REGION` | None | `aws_secrets_manager` only, and required there. The AWS Region that holds the secrets. |
178| `secret_store.project`<br />`CMA_SECRET_STORE__PROJECT` | None | `gcp_secret_manager` only, and required there. The ID of the Google Cloud project that holds the secrets. |
179| `secret_store.vault_url`<br />`CMA_SECRET_STORE__VAULT_URL` | None | `azure_key_vault` only, and required there. The key vault’s URL, such as `https://my-vault.vault.azure.net`. |
173| Setting<br />Environment variable | Default | Description |
174| ----- | ----- | ----- |
175| `secret_store.type`<br />`CMA_SECRET_STORE__TYPE` | None | The secret manager that holds vault credentials. The values are `aws_secrets_manager`, `gcp_secret_manager`, `azure_key_vault`, and `hashicorp_vault`. Without it, vault credentials stay in the database. |
176| `secret_store.prefix`<br />`CMA_SECRET_STORE__PREFIX` | None | Required with `secret_store.type`. The start of the name of every secret that the server creates. It must end with `/` for `aws_secrets_manager` and `hashicorp_vault`, with `-` or `_` for `gcp_secret_manager`, and with `-` for `azure_key_vault`. |
177| `secret_store.region`<br />`CMA_SECRET_STORE__REGION` | None | `aws_secrets_manager` only, and required there. The AWS Region that holds the secrets. |
178| `secret_store.project`<br />`CMA_SECRET_STORE__PROJECT` | None | `gcp_secret_manager` only, and required there. The ID of the Google Cloud project that holds the secrets. |
179| `secret_store.vault_url`<br />`CMA_SECRET_STORE__VAULT_URL` | None | `azure_key_vault` only, and required there. The key vault’s URL, such as `https://my-vault.vault.azure.net`. |
180180 
181181### HashiCorp Vault
182182 
183183These settings apply only with `secret_store.type: hashicorp_vault`. Set exactly one login method: `token_file`, `kubernetes`, or `approle`.
184184 
185| Setting<br />Environment variable | Default | Description |
186| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
187| `secret_store.address`<br />`CMA_SECRET_STORE__ADDRESS` | None | Required. The Vault server’s `https://` URL. |
188| `secret_store.namespace`<br />`CMA_SECRET_STORE__NAMESPACE` | None | The Vault Enterprise namespace that holds the mount and the login method. |
189| `secret_store.mount`<br />`CMA_SECRET_STORE__MOUNT` | `secret` | The path of the KV version 2 secrets engine. |
190| `secret_store.ca_cert_file`<br />`CMA_SECRET_STORE__CA_CERT_FILE` | None | The path of a PEM file with the certificate authority that signed Vault’s certificate. |
191| `secret_store.token_file`<br />`CMA_SECRET_STORE__TOKEN_FILE` | None | The path of a file with a Vault token that another process, such as Vault Agent, keeps current. |
192| `secret_store.kubernetes.role`<br />`CMA_SECRET_STORE__KUBERNETES__ROLE` | None | Required with `kubernetes`. The Vault role that the server logs in as. Bind it to the server’s service account. |
193| `secret_store.kubernetes.mount_path`<br />`CMA_SECRET_STORE__KUBERNETES__MOUNT_PATH` | `kubernetes` | Where Vault mounts the Kubernetes login method. |
194| `secret_store.kubernetes.service_account_token_file`<br />`CMA_SECRET_STORE__KUBERNETES__SERVICE_ACCOUNT_TOKEN_FILE` | `/var/run/secrets/kubernetes.io/serviceaccount/token` | The path of the service account token that the server presents at each login. |
195| `secret_store.approle.role_id`<br />`CMA_SECRET_STORE__APPROLE__ROLE_ID` | None | Required with `approle`. The ID of the AppRole role that the server logs in as. |
196| `secret_store.approle.secret_id_file`<br />`CMA_SECRET_STORE__APPROLE__SECRET_ID_FILE` | None | Required with `approle`. The path of a file with the role’s `secret_id`. |
197| `secret_store.approle.mount_path`<br />`CMA_SECRET_STORE__APPROLE__MOUNT_PATH` | `approle` | Where Vault mounts the AppRole login method. |
185| Setting<br />Environment variable | Default | Description |
186| ----- | ----- | ----- |
187| `secret_store.address`<br />`CMA_SECRET_STORE__ADDRESS` | None | Required. The Vault server’s `https://` URL. |
188| `secret_store.namespace`<br />`CMA_SECRET_STORE__NAMESPACE` | None | The Vault Enterprise namespace that holds the mount and the login method. |
189| `secret_store.mount`<br />`CMA_SECRET_STORE__MOUNT` | `secret` | The path of the KV version 2 secrets engine. |
190| `secret_store.ca_cert_file`<br />`CMA_SECRET_STORE__CA_CERT_FILE` | None | The path of a PEM file with the certificate authority that signed Vault’s certificate. |
191| `secret_store.token_file`<br />`CMA_SECRET_STORE__TOKEN_FILE` | None | The path of a file with a Vault token that another process, such as Vault Agent, keeps current. |
192| `secret_store.kubernetes.role`<br />`CMA_SECRET_STORE__KUBERNETES__ROLE` | None | Required with `kubernetes`. The Vault role that the server logs in as. Bind it to the server’s service account. |
193| `secret_store.kubernetes.mount_path`<br />`CMA_SECRET_STORE__KUBERNETES__MOUNT_PATH` | `kubernetes` | Where Vault mounts the Kubernetes login method. |
194| `secret_store.kubernetes.service_account_token_file`<br />`CMA_SECRET_STORE__KUBERNETES__SERVICE_ACCOUNT_TOKEN_FILE` | `/var/run/secrets/kubernetes.io/serviceaccount/token` | The path of the service account token that the server presents at each login. |
195| `secret_store.approle.role_id`<br />`CMA_SECRET_STORE__APPROLE__ROLE_ID` | None | Required with `approle`. The ID of the AppRole role that the server logs in as. |
196| `secret_store.approle.secret_id_file`<br />`CMA_SECRET_STORE__APPROLE__SECRET_ID_FILE` | None | Required with `approle`. The path of a file with the role’s `secret_id`. |
197| `secret_store.approle.mount_path`<br />`CMA_SECRET_STORE__APPROLE__MOUNT_PATH` | `approle` | Where Vault mounts the AppRole login method. |
198198 
199199## Agent identity
200200 
201201To set up agent tokens, see [Agent identity](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#agent-identity). Any setting in this table turns the feature on. The server then needs `agent_identity.issuer` and exactly one place for the signing key: `key_file`, `key_secret`, or `kms_key`.
202202 
203| Setting<br />Environment variable | Default | Description |
204| ----------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
205| `agent_identity.issuer`<br />`CMA_AGENT_IDENTITY__ISSUER` | None | The `https://` URL that agent tokens carry as their `iss` claim. |
206| `agent_identity.key_file`<br />`CMA_AGENT_IDENTITY__KEY_FILE` | None | The path of the PEM private key that signs the tokens. |
207| `agent_identity.key_secret`<br />`CMA_AGENT_IDENTITY__KEY_SECRET` | None | The name of the secret that holds the PEM private key in your secret manager, without `secret_store.prefix`. |
208| `agent_identity.kms_key.provider`<br />`CMA_AGENT_IDENTITY__KMS_KEY__PROVIDER` | None | The key management service that holds the signing key, `aws_kms` or `gcp_kms`. |
209| `agent_identity.kms_key.key`<br />`CMA_AGENT_IDENTITY__KMS_KEY__KEY` | None | Required with `kms_key.provider`. The key’s ARN for `aws_kms`, or the resource name of one key version for `gcp_kms`. |
210| `agent_identity.published_key_files`<br />`CMA_AGENT_IDENTITY__PUBLISHED_KEY_FILES` | None | The paths of extra PEM public keys for the key set. The server publishes these keys but never signs with them. Use this setting when you rotate the signing key. |
211| `agent_identity.token_lifetime`<br />`CMA_AGENT_IDENTITY__TOKEN_LIFETIME` | `5m` | The time from a token’s `iat` claim to its `exp` claim. A token already sent stays valid until its `exp`. The minimum is `limits.mcp_call_timeout` plus `1m`, and the maximum is `15m`. |
212| `agent_identity.jwks_uri`<br />`CMA_AGENT_IDENTITY__JWKS_URI` | `<issuer>/.well-known/jwks.json` | The URL that the issuer’s discovery document gives for the key set. Set it only if you host the key set somewhere other than under the issuer URL. |
213| `agent_identity.direct.audiences`<br />File only | None | The receivers that can get a token. Each entry has an `audience` URL and `urls`, the URL prefixes of that receiver’s MCP servers. |
214| `agent_identity.actor.enabled`<br />`CMA_AGENT_IDENTITY__ACTOR__ENABLED` | `true` | Whether the server adds the `actor_sub` and `actor_iss` claims to the token of a tool call. `actor_sub` is the subject of the caller that created the session. `actor_iss` is the `issuer_url` of the `auth.issuers` entry that the caller signed in through. Neither claim means that the caller approved the call. |
203| Setting<br />Environment variable | Default | Description |
204| ----- | ----- | ----- |
205| `agent_identity.issuer`<br />`CMA_AGENT_IDENTITY__ISSUER` | None | The `https://` URL that agent tokens carry as their `iss` claim. |
206| `agent_identity.key_file`<br />`CMA_AGENT_IDENTITY__KEY_FILE` | None | The path of the PEM private key that signs the tokens. |
207| `agent_identity.key_secret`<br />`CMA_AGENT_IDENTITY__KEY_SECRET` | None | The name of the secret that holds the PEM private key in your secret manager, without `secret_store.prefix`. |
208| `agent_identity.kms_key.provider`<br />`CMA_AGENT_IDENTITY__KMS_KEY__PROVIDER` | None | The key management service that holds the signing key, `aws_kms` or `gcp_kms`. |
209| `agent_identity.kms_key.key`<br />`CMA_AGENT_IDENTITY__KMS_KEY__KEY` | None | Required with `kms_key.provider`. The key’s ARN for `aws_kms`, or the resource name of one key version for `gcp_kms`. |
210| `agent_identity.published_key_files`<br />`CMA_AGENT_IDENTITY__PUBLISHED_KEY_FILES` | None | The paths of extra PEM public keys for the key set. The server publishes these keys but never signs with them. Use this setting when you rotate the signing key. |
211| `agent_identity.token_lifetime`<br />`CMA_AGENT_IDENTITY__TOKEN_LIFETIME` | `5m` | The time from a token’s `iat` claim to its `exp` claim. A token already sent stays valid until its `exp`. The minimum is `limits.mcp_call_timeout` plus `1m`, and the maximum is `15m`. |
212| `agent_identity.jwks_uri`<br />`CMA_AGENT_IDENTITY__JWKS_URI` | `<issuer>/.well-known/jwks.json` | The URL that the issuer’s discovery document gives for the key set. Set it only if you host the key set somewhere other than under the issuer URL. |
213| `agent_identity.direct.audiences`<br />File only | None | The receivers that can get a token. Each entry has an `audience` URL and `urls`, the URL prefixes of that receiver’s MCP servers. |
214| `agent_identity.actor.enabled`<br />`CMA_AGENT_IDENTITY__ACTOR__ENABLED` | `true` | Whether the server adds the `actor_sub` and `actor_iss` claims to the token of a tool call. `actor_sub` is the subject of the caller that created the session. `actor_iss` is the `issuer_url` of the `auth.issuers` entry that the caller signed in through. Neither claim means that the caller approved the call. |
215215 
216216## Egress gateway
217217 
218218To set up the gateway, see [Environment variable credentials](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials). Set the other settings in this table only with `egress.gateway_enabled: true`. Without it, the server doesn’t start if any of them is set.
219219 
220| Setting<br />Environment variable | Default | Description |
221| ----------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
222| `egress.gateway_enabled`<br />`CMA_EGRESS__GATEWAY_ENABLED` | `false` | Whether the server works with the egress gateway and accepts `environment_variable` vault credentials. |
223| `egress.allowed_hostnames`<br />`CMA_EGRESS__ALLOWED_HOSTNAMES` | None | The exact public hostnames that sandboxes can reach through the gateway. An entry with no port, such as `api.example.com`, allows port 443 for `https` URLs and port 80 for `http` URLs. An entry with a port, such as `api.example.com:8443`, allows that port alone. |
224| `egress.swap_header_names`<br />`CMA_EGRESS__SWAP_HEADER_NAMES` | `Authorization` | The request headers in which the gateway can put a credential’s value. A list of your own replaces the default, so include `Authorization` in it. |
225| `egress.gateway_listen`<br />`CMA_EGRESS__GATEWAY_LISTEN` | `:8410` | The address of the server’s second listener, which serves only the gateway. The default listens on every interface. |
226| `egress.gateway_key_file`<br />`CMA_EGRESS__GATEWAY_KEY_FILE` | None | Required. The path of a file with the key that the gateway presents to the server. |
227| `egress.ca_cert_file`<br />`CMA_EGRESS__CA_CERT_FILE` | None | Required. The path of the PEM certificate of the gateway’s certificate authority. |
228| `egress.gateway_proxy_address`<br />`CMA_EGRESS__GATEWAY_PROXY_ADDRESS` | None | Required. The `host:port` at which sandboxes reach the gateway’s proxy port. |
220| Setting<br />Environment variable | Default | Description |
221| ----- | ----- | ----- |
222| `egress.gateway_enabled`<br />`CMA_EGRESS__GATEWAY_ENABLED` | `false` | Whether the server works with the egress gateway and accepts `environment_variable` vault credentials. |
223| `egress.allowed_hostnames`<br />`CMA_EGRESS__ALLOWED_HOSTNAMES` | None | The exact public hostnames that sandboxes can reach through the gateway. An entry with no port, such as `api.example.com`, allows port 443 for `https` URLs and port 80 for `http` URLs. An entry with a port, such as `api.example.com:8443`, allows that port alone. |
224| `egress.swap_header_names`<br />`CMA_EGRESS__SWAP_HEADER_NAMES` | `Authorization` | The request headers in which the gateway can put a credential’s value. A list of your own replaces the default, so include `Authorization` in it. |
225| `egress.gateway_listen`<br />`CMA_EGRESS__GATEWAY_LISTEN` | `:8410` | The address of the server’s second listener, which serves only the gateway. The default listens on every interface. |
226| `egress.gateway_key_file`<br />`CMA_EGRESS__GATEWAY_KEY_FILE` | None | Required. The path of a file with the key that the gateway presents to the server. |
227| `egress.ca_cert_file`<br />`CMA_EGRESS__CA_CERT_FILE` | None | Required. The path of the PEM certificate of the gateway’s certificate authority. |
228| `egress.gateway_proxy_address`<br />`CMA_EGRESS__GATEWAY_PROXY_ADDRESS` | None | Required. The `host:port` at which sandboxes reach the gateway’s proxy port. |
229229 
230230## MCP servers
231231 
232232See [MCP servers need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry).
233233 
234| Setting<br />Environment variable | Default | Description |
235| --------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
236| `mcp.allowed_hostnames`<br />`CMA_MCP__ALLOWED_HOSTNAMES` | None | The exact hostnames of the MCP servers that the server can connect to. Without it, the server connects to none. |
237| `mcp.private_hostnames`<br />File only | None | The hostnames from `mcp.allowed_hostnames` that can resolve to a private address. |
238| `mcp.max_result_bytes`<br />`CMA_MCP__MAX_RESULT_BYTES` | `102400` (100 KiB) | The most bytes of one MCP tool result that the model sees. The minimum is `1024`. |
234| Setting<br />Environment variable | Default | Description |
235| ----- | ----- | ----- |
236| `mcp.allowed_hostnames`<br />`CMA_MCP__ALLOWED_HOSTNAMES` | None | The exact hostnames of the MCP servers that the server can connect to. Without it, the server connects to none. |
237| `mcp.private_hostnames`<br />File only | None | The hostnames from `mcp.allowed_hostnames` that can resolve to a private address. |
238| `mcp.max_result_bytes`<br />`CMA_MCP__MAX_RESULT_BYTES` | `102400` (100 KiB) | The most bytes of one MCP tool result that the model sees. The minimum is `1024`. |
239239 
240240## Git repositories
241241 
242242See [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry).
243243 
244| Setting<br />Environment variable | Default | Description |
245| --------------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
246| `git.allowed_hostnames`<br />`CMA_GIT__ALLOWED_HOSTNAMES` | None | The Git hosts that a session’s repositories can be on. Hostnames match exactly, with no wildcards, and an entry doesn’t cover its subdomains. An entry allows port 443, or the one port that it names, as in `git.example.com:8443`. Without this setting, the server accepts no repositories. |
247| `git.private_hostnames`<br />File only | None | The hostnames from `git.allowed_hostnames` that resolve to a private address, written without a port. For any other hostname, the server connects only to its public addresses. |
248| `git.allowed_push_refs`<br />`CMA_GIT__ALLOWED_PUSH_REFS` | None | The branches that agents can push to, each under `refs/heads/`. An entry that ends in `/` allows every branch under it. Any other entry allows that one branch. Without this setting, agents can’t push. |
249| `git.commit_author_name`<br />`CMA_GIT__COMMIT_AUTHOR_NAME` | `Claude` | The author name on the agent’s commits. Set it together with `git.commit_author_email`. |
250| `git.commit_author_email`<br />`CMA_GIT__COMMIT_AUTHOR_EMAIL` | `[email protected]` | The author email address on the agent’s commits. Set it together with `git.commit_author_name`. |
251| `git.max_concurrent_transfers`<br />`CMA_GIT__MAX_CONCURRENT_TRANSFERS` | `32` | The most Git requests that one server carries at once. The minimum is `1`. |
252| `git.max_session_transfer_bytes`<br />`CMA_GIT__MAX_SESSION_TRANSFER_BYTES` | `8589934592` (8 GiB) | The most Git traffic, in bytes, that one server carries for one session, uploads and downloads together. The count restarts at zero each time a sandbox picks up the session. At the limit, the server refuses the session’s next Git requests with a `403`. `0` means no limit. Otherwise, the minimum is `1048576`. |
253| `git.max_push_bytes`<br />`CMA_GIT__MAX_PUSH_BYTES` | `2147483648` (2 GiB) | The most bytes that one push can send. The minimum is `1048576`. |
244| Setting<br />Environment variable | Default | Description |
245| ----- | ----- | ----- |
246| `git.allowed_hostnames`<br />`CMA_GIT__ALLOWED_HOSTNAMES` | None | The Git hosts that a session’s repositories can be on. Hostnames match exactly, with no wildcards, and an entry doesn’t cover its subdomains. An entry allows port 443, or the one port that it names, as in `git.example.com:8443`. Without this setting, the server accepts no repositories. |
247| `git.private_hostnames`<br />File only | None | The hostnames from `git.allowed_hostnames` that resolve to a private address, written without a port. For any other hostname, the server connects only to its public addresses. |
248| `git.allowed_push_refs`<br />`CMA_GIT__ALLOWED_PUSH_REFS` | None | The branches that agents can push to, each under `refs/heads/`. An entry that ends in `/` allows every branch under it. Any other entry allows that one branch. Without this setting, agents can’t push. |
249| `git.commit_author_name`<br />`CMA_GIT__COMMIT_AUTHOR_NAME` | `Claude` | The author name on the agent’s commits. Set it together with `git.commit_author_email`. |
250| `git.commit_author_email`<br />`CMA_GIT__COMMIT_AUTHOR_EMAIL` | `[email protected]` | The author email address on the agent’s commits. Set it together with `git.commit_author_name`. |
251| `git.max_concurrent_transfers`<br />`CMA_GIT__MAX_CONCURRENT_TRANSFERS` | `32` | The most Git requests that one server carries at once. The minimum is `1`. |
252| `git.max_session_transfer_bytes`<br />`CMA_GIT__MAX_SESSION_TRANSFER_BYTES` | `8589934592` (8 GiB) | The most Git traffic, in bytes, that one server carries for one session, uploads and downloads together. The count restarts at zero each time a sandbox picks up the session. At the limit, the server refuses the session’s next Git requests with a `403`. `0` means no limit. Otherwise, the minimum is `1048576`. |
253| `git.max_push_bytes`<br />`CMA_GIT__MAX_PUSH_BYTES` | `2147483648` (2 GiB) | The most bytes that one push can send. The minimum is `1048576`. |
254254 
255255These limits apply to Git repositories:
256256 
from line 264
264264 
265265See [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting).
266266 
267| Setting<br />Environment variable | Default | Description |
268| ----------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
269| `web_tools.enabled`<br />`CMA_WEB_TOOLS__ENABLED` | `false` | Whether agents can use the `web_search` and `web_fetch` tools. If you set another `web_tools` setting, the default is `true`. |
270| `web_tools.allowed_domains`<br />`CMA_WEB_TOOLS__ALLOWED_DOMAINS` | None | The only domains that agents can read through the web tools. An entry covers its subdomains. |
271| `web_tools.blocked_domains`<br />`CMA_WEB_TOOLS__BLOCKED_DOMAINS` | None | Domains that no agent can read through the web tools. Set this or `web_tools.allowed_domains`, not both. |
272| `web_tools.max_content_tokens`<br />`CMA_WEB_TOOLS__MAX_CONTENT_TOKENS` | None | The most tokens of one fetched page that `web_fetch` returns to the model. |
273| `skills.max_name_chars`<br />`CMA_SKILLS__MAX_NAME_CHARS` | `64` | The longest `name` that a `SKILL.md` file can have. The maximum is `255`. |
274| `skills.max_description_chars`<br />`CMA_SKILLS__MAX_DESCRIPTION_CHARS` | `1024` | The longest `description` that a `SKILL.md` file can have. |
267| Setting<br />Environment variable | Default | Description |
268| ----- | ----- | ----- |
269| `web_tools.enabled`<br />`CMA_WEB_TOOLS__ENABLED` | `false` | Whether agents can use the `web_search` and `web_fetch` tools. If you set another `web_tools` setting, the default is `true`. |
270| `web_tools.allowed_domains`<br />`CMA_WEB_TOOLS__ALLOWED_DOMAINS` | None | The only domains that agents can read through the web tools. An entry covers its subdomains. |
271| `web_tools.blocked_domains`<br />`CMA_WEB_TOOLS__BLOCKED_DOMAINS` | None | Domains that no agent can read through the web tools. Set this or `web_tools.allowed_domains`, not both. |
272| `web_tools.max_content_tokens`<br />`CMA_WEB_TOOLS__MAX_CONTENT_TOKENS` | None | The most tokens of one fetched page that `web_fetch` returns to the model. |
273| `skills.max_name_chars`<br />`CMA_SKILLS__MAX_NAME_CHARS` | `64` | The longest `name` that a `SKILL.md` file can have. The maximum is `255`. |
274| `skills.max_description_chars`<br />`CMA_SKILLS__MAX_DESCRIPTION_CHARS` | `1024` | The longest `description` that a `SKILL.md` file can have. |
275275 
276276## Limits, timeouts, and scheduling
277277 
278| Setting<br />Environment variable | Default | Description |
279| ------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
280| `limits.max_active_sessions`<br />`CMA_LIMITS__MAX_ACTIVE_SESSIONS` | `64` | `store.backend: memory` only. The most sessions that run a turn at once. `0` means no limit. |
281| `limits.max_live_subagent_threads`<br />`CMA_LIMITS__MAX_LIVE_SUBAGENT_THREADS` | `25` | The most subagent threads that one session can hold at once. A thread counts until it’s archived or terminated, so an idle thread counts. At the limit, the agent can’t start another subagent. The minimum is `1`, and the maximum is `4000`. |
282| `scheduler.max_concurrent_turns`<br />`CMA_SCHEDULER__MAX_CONCURRENT_TURNS` | `64` | `store.backend: postgres` only. The most turns that one server runs at once. The minimum is `1`. The server keeps extra slots for subagent turns alone. Their number is a quarter of this value, and at least `4`. With the default, one server can run 64 turns plus 16 subagent turns. |
283| `scheduler.claim_poll_interval`<br />`CMA_SCHEDULER__CLAIM_POLL_INTERVAL` | `1s` | `store.backend: postgres` only. How often a server with a free turn slot looks in the database for waiting work. The minimum is `50ms`. |
284| `scheduler.sandbox_claim`<br />`CMA_SCHEDULER__SANDBOX_CLAIM` | `immediate` | When a worker can start a session’s sandbox. `immediate` means as soon as the session is created, so the first tool call waits least. `tool_call` means at the session’s first tool call that needs the sandbox, so a session that makes none uses no sandbox. |
285| `limits.model_call_timeout`<br />`CMA_LIMITS__MODEL_CALL_TIMEOUT` | `20m` | How long one model call can run, retries included, before the server cancels it. |
286| `limits.stream_idle_timeout`<br />`CMA_LIMITS__STREAM_IDLE_TIMEOUT` | `5m` | How long a model call’s response can deliver nothing before the server gives up that attempt. |
287| `limits.mcp_call_timeout`<br />`CMA_LIMITS__MCP_CALL_TIMEOUT` | `4m` | How long one MCP tool call can run before the server gives it up. |
278| Setting<br />Environment variable | Default | Description |
279| ----- | ----- | ----- |
280| `limits.max_active_sessions`<br />`CMA_LIMITS__MAX_ACTIVE_SESSIONS` | `64` | `store.backend: memory` only. The most sessions that run a turn at once. `0` means no limit. |
281| `limits.max_live_subagent_threads`<br />`CMA_LIMITS__MAX_LIVE_SUBAGENT_THREADS` | `25` | The most subagent threads that one session can hold at once. A thread counts until it’s archived or terminated, so an idle thread counts. At the limit, the agent can’t start another subagent. The minimum is `1`, and the maximum is `4000`. |
282| `scheduler.max_concurrent_turns`<br />`CMA_SCHEDULER__MAX_CONCURRENT_TURNS` | `64` | `store.backend: postgres` only. The most turns that one server runs at once. The minimum is `1`. The server keeps extra slots for subagent turns alone. Their number is a quarter of this value, and at least `4`. With the default, one server can run 64 turns plus 16 subagent turns. |
283| `scheduler.claim_poll_interval`<br />`CMA_SCHEDULER__CLAIM_POLL_INTERVAL` | `1s` | `store.backend: postgres` only. How often a server with a free turn slot looks in the database for waiting work. The minimum is `50ms`. |
284| `scheduler.sandbox_claim`<br />`CMA_SCHEDULER__SANDBOX_CLAIM` | `immediate` | When a worker can start a session’s sandbox. `immediate` means as soon as the session is created, so the first tool call waits least. `tool_call` means at the session’s first tool call that needs the sandbox, so a session that makes none uses no sandbox. |
285| `limits.model_call_timeout`<br />`CMA_LIMITS__MODEL_CALL_TIMEOUT` | `20m` | How long one model call can run, retries included, before the server cancels it. |
286| `limits.stream_idle_timeout`<br />`CMA_LIMITS__STREAM_IDLE_TIMEOUT` | `5m` | How long a model call’s response can deliver nothing before the server gives up that attempt. |
287| `limits.mcp_call_timeout`<br />`CMA_LIMITS__MCP_CALL_TIMEOUT` | `4m` | How long one MCP tool call can run before the server gives it up. |
288288 
289289## Models and compaction
290290 
291| Setting<br />Environment variable | Default | Description |
292| ------------------------------------ | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
293| `models.settings`<br />File only | None | Changes to the server’s built-in model catalog, keyed by model ID. See [Model entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#model-entries). |
294| `compaction.triggers`<br />File only | About 90% of each model’s context window | The context size, in tokens, at which a turn on a model compacts its history, keyed by model ID. The minimum is `50000`. Each model must support compaction. |
291| Setting<br />Environment variable | Default | Description |
292| ----- | ----- | ----- |
293| `models.settings`<br />File only | None | Changes to the server’s built-in model catalog, keyed by model ID. See [Model entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#model-entries). |
294| `compaction.triggers`<br />File only | About 90% of each model’s context window | The context size, in tokens, at which a turn on a model compacts its history, keyed by model ID. The minimum is `50000`. Each model must support compaction. |
295295 
296296### Model entries
297297 
298298Each entry of `models.settings` changes a model in the catalog or adds one. For a model in the catalog, a field that you leave out keeps its built-in value.
299299 
300| Field | Description |
301| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
302| `fast_supported` | Whether the model accepts `speed: "fast"`. Required for a model that you add. |
303| `inference_geo_supported` | Whether the model accepts `inference_geo`. |
300| Field | Description |
301| ----- | ----- |
302| `fast_supported` | Whether the model accepts `speed: "fast"`. Required for a model that you add. |
303| `inference_geo_supported` | Whether the model accepts `inference_geo`. |
304304| `forced_tool_choice_supported` | Whether the model accepts a request that forces it to call one tool. The server sends such a request only to run a `web_search` or `web_fetch` call that was approved. With `false`, it never forces a tool on this model. |
305| `effort_supported` | Whether the model accepts an effort level. |
306| `effort_levels` | The effort levels that the model accepts, from `low`, `medium`, `high`, `xhigh`, and `max`. Required with `effort_supported: true` on a model with no built-in levels. |
307| `effort_default` | The effort level of a session whose agent names none. It must be one of `effort_levels`. Required with `effort_supported: true` on a model with no built-in default. |
308| `thinking` | The thinking mode that the server requests, `enabled` or `adaptive`. |
309| `thinking_budget` | The thinking budget, in tokens, that the server sends with `thinking: enabled`. |
310| `max_tokens` | The `max_tokens` value of each model call. |
305| `effort_supported` | Whether the model accepts an effort level. |
306| `effort_levels` | The effort levels that the model accepts, from `low`, `medium`, `high`, `xhigh`, and `max`. Required with `effort_supported: true` on a model with no built-in levels. |
307| `effort_default` | The effort level of a session whose agent names none. It must be one of `effort_levels`. Required with `effort_supported: true` on a model with no built-in default. |
308| `thinking` | The thinking mode that the server requests, `enabled` or `adaptive`. |
309| `thinking_budget` | The thinking budget, in tokens, that the server sends with `thinking: enabled`. |
310| `max_tokens` | The `max_tokens` value of each model call. |
311311 
312312## Console on your server
313313 
314| Setting<br />Environment variable | Default | Description |
315| ----------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
316| `console.serve`<br />`CMA_CONSOLE__SERVE` | `true` | Whether to serve the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
314| Setting<br />Environment variable | Default | Description |
315| ----- | ----- | ----- |
316| `console.serve`<br />`CMA_CONSOLE__SERVE` | `true` | Whether to serve the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
317317 
Feedback