| CB_CONNECTION_STRING | No | Couchbase connection string. Required for connecting to the cluster. |
| CB_USERNAME | No | Couchbase database username. Required for basic authentication. |
| CB_PASSWORD | No | Couchbase database password. Required for basic authentication. Secret. |
| CB_CA_CERT_PATH | No | Couchbase CA certificate path. Required for TLS authentication in non Capella clusters. |
| CB_CLIENT_CERT_PATH | No | Couchbase client certificate path. Required for mTLS authentication. |
| CB_CLIENT_KEY_PATH | No | Couchbase client key path. Required for mTLS authentication. |
| CB_MCP_READ_ONLY_MODE | No | Couchbase read only mode. Set to true to allow disable write operations across both KV and query. KV write tools are not loaded and SQL++ queries that modify data are blocked. Set to false to allow data modification queries and tools. |
| CB_MCP_TRANSPORT | No | Transport mode for the server (stdio, http or sse). Default is stdio |
| CB_MCP_HOST | No | Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes. |
| CB_MCP_PORT | No | Port to run the MCP server on (default: 8000). Used only for HTTP and SSE transport modes. |
| CB_MCP_DISABLED_TOOLS | No | Tools to disable. Accepts comma-separated tool names (e.g., 'tool_1,tool_2') or a file path containing one tool name per line. |
| CB_MCP_CONFIRMATION_REQUIRED_TOOLS | No | Comma-separated tool names that require user confirmation before execution. Also accepts a file path containing one tool name per line. Requires the MCP client to support elicitation. |
| CB_MCP_LOG_LEVEL | No | Logging level for the MCP server. One of off, debug, info, warning, error. Use 'off' to disable logging entirely. Invalid values fall back to info. Default is info. |
| CB_MCP_LOG_SINKS | No | Comma-separated list of log destinations. Allowed values: stderr, file. Include 'file' to write per-level log files; include 'stderr' to write to the console. Default is stderr. |
| CB_MCP_LOG_FILE | No | Base path for the per-level log files. One rotating file is written per level (e.g. mcp_server.info.log, mcp_server.error.log). Only used when 'file' is in CB_MCP_LOG_SINKS. Default is mcp_server.log. |
| CB_MCP_LOG_ROTATION_MAX_SIZE_MB | No | Global maximum size in MB per-level log file before it rotates, inherited by every level unless overridden by a per-level CB_MCP_LOG_<LEVEL>_ROTATION_MAX_SIZE_MB. A value of 0 is invalid and falls back to the default (1 MB) with a startup warning. Default is 1 (1 MB). |
| CB_MCP_LOG_MAX_BYTES | No | [DEPRECATED] Global rotation size in bytes; use CB_MCP_LOG_ROTATION_MAX_SIZE_MB (MB) instead. Still honored for backward compatibility but ignored when CB_MCP_LOG_ROTATION_MAX_SIZE_MB is also set. A value of 0 is invalid and falls back to the default with a startup warning. |
| CB_MCP_LOG_ERROR_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the ERROR log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for ERROR; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_WARNING_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the WARNING log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for WARNING; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_INFO_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the INFO log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for INFO; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_DEBUG_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the DEBUG log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for DEBUG; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_RETENTION_BACKUP_COUNT | No | Number of rotated backup files kept per-level log file, excluding the live file. Applies to every level unless overridden per level. Set to 0 to keep only the live file (still capped by the rotation size). Default is 1. |
| CB_MCP_LOG_ERROR_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the ERROR log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for ERROR; inherits it when unset. |
| CB_MCP_LOG_WARNING_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the WARNING log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for WARNING; inherits it when unset. |
| CB_MCP_LOG_INFO_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the INFO log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for INFO; inherits it when unset. |
| CB_MCP_LOG_DEBUG_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the DEBUG log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for DEBUG; inherits it when unset. |
| CB_MCP_OAUTH_JWT_JWKS_URI | No | JWKS endpoint of the identity provider used to verify bearer JWT signatures. Required to enable OAuth, along with CB_MCP_OAUTH_JWT_ISSUER and CB_MCP_OAUTH_JWT_AUDIENCE. Only honored when CB_MCP_TRANSPORT=http. |
| CB_MCP_OAUTH_JWT_ISSUER | No | Expected JWT 'iss' claim value. Also advertised as the authorization server in Protected Resource Metadata when CB_MCP_OAUTH_MCP_BASE_URL is set. Required to enable OAuth. |
| CB_MCP_OAUTH_JWT_AUDIENCE | No | Expected JWT 'aud' claim value. Required to enable OAuth. |
| CB_MCP_OAUTH_JWT_ALGORITHM | No | JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256. |
| CB_MCP_OAUTH_MCP_BASE_URL | No | Public base URL of this MCP server. When set, the server publishes RFC 9728 Protected Resource Metadata at <base_url>/.well-known/oauth-protected-resource/mcp so PRM-aware clients can discover the authorization server. Optional. |
| CB_MCP_OAUTH_SCOPE_READ_LABEL | No | Override the OAuth scope label the server treats as 'read' access; advertised in PRM and matched against the token's scope/scp claim. Use when your IdP cannot emit the canonical form. Default is couchbase-mcp:read. |
| CB_MCP_OAUTH_SCOPE_WRITE_LABEL | No | Override the OAuth scope label the server treats as 'write' access; same semantics as CB_MCP_OAUTH_SCOPE_READ_LABEL. Default is couchbase-mcp:write. |
| CB_CONNECTION_STRING | No | Couchbase connection string. Required for connecting to the cluster. |
| CB_USERNAME | No | Couchbase database username. Required for basic authentication. |
| CB_PASSWORD | No | Couchbase database password. Required for basic authentication. Secret. |
| CB_CA_CERT_PATH | No | Couchbase CA certificate path. Required for TLS authentication in non Capella clusters. |
| CB_CLIENT_CERT_PATH | No | Couchbase client certificate path. Required for mTLS authentication. |
| CB_CLIENT_KEY_PATH | No | Couchbase client key path. Required for mTLS authentication. |
| CB_MCP_READ_ONLY_MODE | No | Couchbase read only mode. Set to true to disable write operations across both KV and query. KV write tools are not loaded and SQL++ queries that modify data are blocked. Set to false to allow data modification queries and tools. |
| CB_MCP_TRANSPORT | No | Transport mode for the server (stdio, http or sse). Default is stdio |
| CB_MCP_HOST | No | Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes. |
| CB_MCP_PORT | No | Port to run the MCP server on (default: 8000). Used only for HTTP and SSE transport modes. |
| CB_MCP_DISABLED_TOOLS | No | Tools to disable. Accepts comma-separated tool names (e.g., 'tool_1,tool_2') or a file path containing one tool name per line. |
| CB_MCP_CONFIRMATION_REQUIRED_TOOLS | No | Comma-separated tool names that require user confirmation before execution. Also accepts a file path containing one tool name per line. Requires the MCP client to support elicitation. |
| CB_MCP_LOG_LEVEL | No | Logging level for the MCP server. One of off, debug, info, warning, error. Use 'off' to disable logging entirely. Invalid values fall back to info. Default is info. |
| CB_MCP_LOG_SINKS | No | Comma-separated list of log destinations. Allowed values: stderr, file. Include 'file' to write per-level log files; include 'stderr' to write to the console. Default is stderr. |
| CB_MCP_LOG_FILE | No | Base path for the per-level log files. One rotating file is written per level (e.g. mcp_server.info.log, mcp_server.error.log). Only used when 'file' is in CB_MCP_LOG_SINKS. Default is mcp_server.log. |
| CB_MCP_LOG_ROTATION_MAX_SIZE_MB | No | Global maximum size in MB per-level log file before it rotates, inherited by every level unless overridden by a per-level CB_MCP_LOG_<LEVEL>_ROTATION_MAX_SIZE_MB. A value of 0 is invalid and falls back to the default (1 MB) with a startup warning. Default is 1 (1 MB). |
| CB_MCP_LOG_MAX_BYTES | No | [DEPRECATED] Global rotation size in bytes; use CB_MCP_LOG_ROTATION_MAX_SIZE_MB (MB) instead. Still honored for backward compatibility but ignored when CB_MCP_LOG_ROTATION_MAX_SIZE_MB is also set. A value of 0 is invalid and falls back to the default with a startup warning. |
| CB_MCP_LOG_ERROR_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the ERROR log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for ERROR; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_WARNING_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the WARNING log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for WARNING; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_INFO_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the INFO log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for INFO; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_DEBUG_ROTATION_MAX_SIZE_MB | No | Rotation size in MB for the DEBUG log file. Overrides CB_MCP_LOG_ROTATION_MAX_SIZE_MB for DEBUG; inherits it when unset. 0 is invalid and falls back to the inherited global with a startup warning. |
| CB_MCP_LOG_RETENTION_BACKUP_COUNT | No | Number of rotated backup files kept per-level log file, excluding the live file. Applies to every level unless overridden per level. Set to 0 to keep only the live file (still capped by the rotation size). Default is 1. |
| CB_MCP_LOG_ERROR_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the ERROR log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for ERROR; inherits it when unset. |
| CB_MCP_LOG_WARNING_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the WARNING log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for WARNING; inherits it when unset. |
| CB_MCP_LOG_INFO_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the INFO log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for INFO; inherits it when unset. |
| CB_MCP_LOG_DEBUG_RETENTION_BACKUP_COUNT | No | Rotated backups kept for the DEBUG log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for DEBUG; inherits it when unset. |
| CB_MCP_OAUTH_JWT_JWKS_URI | No | JWKS endpoint of the identity provider used to verify bearer JWT signatures. Required to enable OAuth, along with CB_MCP_OAUTH_JWT_ISSUER and CB_MCP_OAUTH_JWT_AUDIENCE. Only honored when CB_MCP_TRANSPORT=http. |
| CB_MCP_OAUTH_JWT_ISSUER | No | Expected JWT 'iss' claim value. Also advertised as the authorization server in Protected Resource Metadata when CB_MCP_OAUTH_MCP_BASE_URL is set. Required to enable OAuth. |
| CB_MCP_OAUTH_JWT_AUDIENCE | No | Expected JWT 'aud' claim value. Required to enable OAuth. |
| CB_MCP_OAUTH_JWT_ALGORITHM | No | JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256. |
| CB_MCP_OAUTH_MCP_BASE_URL | No | Public base URL of this MCP server. When set, the server publishes RFC 9728 Protected Resource Metadata at <base_url>/.well-known/oauth-protected-resource/mcp so PRM-aware clients can discover the authorization server. Optional. |
| CB_MCP_OAUTH_SCOPE_READ_LABEL | No | Override the OAuth scope label the server treats as 'read' access; advertised in PRM and matched against the token's scope/scp claim. Use when your IdP cannot emit the canonical form. Default is couchbase-mcp:read. |
| CB_MCP_OAUTH_SCOPE_WRITE_LABEL | No | Override the OAuth scope label the server treats as 'write' access; same semantics as CB_MCP_OAUTH_SCOPE_READ_LABEL. Default is couchbase-mcp:write. |