MCP directory
MS

Mcp Server Couchbase

by github.com/couchbase · v1.1.0 · updated Nov 2, 2026

Couchbase MCP servers: Operational and Operational Insights clusters.

PyPIDocker

Run it locally

Install the package and point your AI client at it.

PyPI

uvx couchbase-mcp-server==1.1.0

Environment variables

  • CB_CONNECTION_STRING

    Couchbase connection string. Required for connecting to the cluster.

  • CB_USERNAME

    Couchbase database username. Required for basic authentication.

  • CB_PASSWORDsecret

    Couchbase database password. Required for basic authentication.

  • CB_CA_CERT_PATH

    Couchbase CA certificate path. Required for TLS authentication in non Capella clusters.

  • CB_CLIENT_CERT_PATH

    Couchbase client certificate path. Required for mTLS authentication.

  • CB_CLIENT_KEY_PATH

    Couchbase client key path. Required for mTLS authentication.

  • CB_MCP_READ_ONLY_MODE

    Couchbase read only mode. Set to true to disable write operations: KV document, scope/collection and index write tools are not loaded, and SQL++ queries that modify data are blocked. Set to false to allow them. Default is true.

  • CB_MCP_TRANSPORT

    Transport mode for the server (stdio, http or sse). Default is stdio. OAuth is only honored with http.

  • CB_MCP_HOST

    Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes.

  • CB_MCP_PORT

    Port to run the MCP server on (default: 8000). Used only for HTTP and SSE transport modes.

  • CB_MCP_WORKERS

    Number of server worker processes (default: 1). Values above 1 use more CPU cores, require the http transport, run in stateless HTTP mode, and cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS. Each worker writes log files named with the host and process id.

  • CB_MCP_STATELESS_HTTP

    Handle each HTTP request without per-session state (default: true when workers > 1, otherwise false). Only honored with the http transport; cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS.

  • CB_MCP_DISABLED_TOOLS

    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

    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

    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

    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

    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

    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

    [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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    Expected JWT 'aud' claim value. Required to enable OAuth.

  • CB_MCP_OAUTH_JWT_ALGORITHM

    JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256.

  • CB_MCP_OAUTH_MCP_BASE_URL

    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

    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

    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_MCP_AUDIT_LOG_ENABLED

    Enable audit logging. Audit output is a separate sink from the CB_MCP_LOG_* operational logs, with a stable schema, its own retention, and events that cannot be filtered out. Default is false.

  • CB_MCP_AUDIT_LOG_SINKS

    Comma-separated audit destinations: console, file, or both. 'console' writes to stderr, never stdout, because stdout carries the JSON-RPC protocol under the stdio transport. Default is console.

  • CB_MCP_EMBEDDING_MODEL_PROVIDER

    Embedding provider for run_vector_query / run_vector_search: one of capella, openai, cohere, voyage, bedrock. Unset disables both tools' embedding step until configured.

  • CB_MCP_AUDIT_LOG_FILE_PATH

    Path to the audit log file, required when 'file' is in CB_MCP_AUDIT_LOG_SINKS. Each server process writes its own file with the host and process id inserted before the extension (audit.log becomes audit.myhost.1234.log), because a stdio deployment runs one process per client. If the path is missing...

  • CB_MCP_AUDIT_LOG_ROTATION_MAX_SIZE_MB

    Maximum size in MB the live audit file may reach before it rotates. 0 turns size-based rotation off. Default is 10 MB.

  • CB_MCP_AUDIT_LOG_ROTATION_INTERVAL

    Age the live audit file may reach before it rotates, as <value><unit> where the unit is 'd' (24 hours) or 'w' (7 days) - for example 1d, 30d, 1w, 8w. 0 turns interval-based rotation off. Size and interval are independent: whichever falls due first rotates the file. Default is 1d.

  • CB_MCP_EMBEDDING_MODEL

    Model name/ID for the configured embedding provider.

  • CB_MCP_AUDIT_LOG_RETENTION_MAX_BACKUPS

    Number of rotated audit files retained, excluding the live file. Rotated files are gzipped and named with the UTC rotation time. Set to 0 to keep no backups: the live file is truncated at each rotation. Default is 10.

  • CB_MCP_AUDIT_LOG_TOOL_ARGS

    Record tool argument values in the audit log. Off by default: there is no redaction in this release, so enabling this writes arguments verbatim, including the full document bodies passed to document-write tools. Review the audit file's retention and access controls before enabling it.

  • CB_MCP_AUDIT_LOG_DISABLED_EVENTS

    Audit events to suppress, as comma-separated numeric event ids (for example '61490,61492'), or a path to a file with one id per line. Ids are listed in the audit descriptor shipped with the package. Only filterable events can be suppressed: write and security events are always recorded, and an attem...

  • CB_MCP_EMBEDDING_MODEL_API_KEYsecret

    API key for the configured embedding provider. Not used by bedrock (uses the AWS credential chain / CB_MCP_EMBEDDING_MODEL_AWS_* instead).

  • CB_MCP_EMBEDDING_MODEL_ENDPOINT

    Base URL override for the configured embedding provider (e.g. an OpenAI-compatible local server, or a Capella Model Service deployment's own URL). Required when CB_MCP_EMBEDDING_MODEL_PROVIDER=capella.

  • CB_MCP_EMBEDDING_MODEL_AWS_ACCESS_KEY_IDsecret

    AWS access key ID, bedrock provider only. Omit to use the default AWS credential chain.

  • CB_MCP_EMBEDDING_MODEL_AWS_SECRET_ACCESS_KEYsecret

    AWS secret access key, bedrock provider only.

  • CB_MCP_EMBEDDING_MODEL_AWS_REGION

    AWS region, bedrock provider only. Falls back to the AWS SDK's own region resolution if unset.

PyPI

uvx couchbase-mcp-server==1.1.0

Environment variables

  • CB_OPERATIONAL_INSIGHTS_CONNECTION_STRING

    Operational Insights (Enterprise Analytics) endpoint URL, e.g. http://localhost:8095 (local) or https://<host>:18095 (Capella). An HTTP(S) URL, not a couchbase:// connection string.

  • CB_OPERATIONAL_INSIGHTS_USERNAME

    Operational Insights database username. Required for basic authentication.

  • CB_OPERATIONAL_INSIGHTS_PASSWORDsecret

    Operational Insights database password. Required for basic authentication.

  • CB_OPERATIONAL_INSIGHTS_CA_CERT_PATH

    Operational Insights CA certificate (trust store) path, used to verify the server certificate over https://.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_CERT_PATH

    Client certificate path for mTLS: a PEM certificate (paired with the client key path) or a PKCS#12 bundle (.p12/.pfx). Requires an https:// connection string. When set, username/password are ignored.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_KEY_PATH

    Client private key path (PEM) for mTLS. Leave unset when the client certificate is a PKCS#12 bundle that already contains the key.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_CERT_PASSWORDsecret

    Decryption password for the client key or PKCS#12 bundle, if it is encrypted. Omit if the file is unencrypted.

  • CB_MCP_OPERATIONAL_INSIGHTS_ASYNC_QUERY_RESULT_TIMEOUT

    Timeout in seconds for each async query request (start, status, fetch, discard, cancel). For a fetch it covers the whole download, so a result that takes longer than this to read fails. Positive integer, maximum 600; larger values are clamped to 600 with a warning, and any other invalid value is log...

  • CB_MCP_READ_ONLY_MODE

    Operational Insights read only mode. Set to true to disable write operations: the operational_insights_create_index and operational_insights_cancel_async_query tools are not loaded, and queries that modify data are blocked. Set to false to allow them. Default is true.

  • CB_MCP_TRANSPORT

    Transport mode for the server (stdio, http or sse). Default is stdio. OAuth is only honored with http.

  • CB_MCP_HOST

    Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes.

  • CB_MCP_PORT

    Port to run the MCP server on (default: 8001). Used only for HTTP and SSE transport modes.

  • CB_MCP_STATELESS_HTTP

    Handle each HTTP request without per-session state (default: true when workers > 1, otherwise false). Only honored with the http transport; cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS.

  • CB_MCP_DISABLED_TOOLS

    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

    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

    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

    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

    Base path for the per-level log files. One rotating file is written per level (e.g. mcp_server_operational_insights.info.log, mcp_server_operational_insights.error.log). Only used when 'file' is in CB_MCP_LOG_SINKS. Default is mcp_server_operational_insights.log.

  • CB_MCP_LOG_ROTATION_MAX_SIZE_MB

    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

    [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

    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

    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

    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

    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

    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

    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

    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

    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

    Rotated backups kept for the DEBUG log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for DEBUG; inherits it when unset.

  • CB_MCP_AUDIT_LOG_ENABLED

    Enable audit logging. Audit output is a separate sink from the CB_MCP_LOG_* operational logs, with a stable schema, its own retention, and events that cannot be filtered out. Default is false. This server emits audit records under its own event block, 0x10000 (65536), so an event id names the server...

  • CB_MCP_AUDIT_LOG_SINKS

    Comma-separated audit destinations: console, file, or both. 'console' writes to stderr, never stdout, because stdout carries the JSON-RPC protocol under the stdio transport. Default is console.

  • CB_MCP_AUDIT_LOG_FILE_PATH

    Path to the audit log file, required when 'file' is in CB_MCP_AUDIT_LOG_SINKS. Each server process writes its own file with the host and process id inserted before the extension (audit.log becomes audit.myhost.1234.log), because a stdio deployment runs one process per client. If the path is missing...

  • CB_MCP_AUDIT_LOG_ROTATION_MAX_SIZE_MB

    Maximum size in MB the live audit file may reach before it rotates. 0 turns size-based rotation off. Default is 10 MB.

  • CB_MCP_AUDIT_LOG_ROTATION_INTERVAL

    Age the live audit file may reach before it rotates, as <value><unit> where the unit is 'd' (24 hours) or 'w' (7 days) - for example 1d, 30d, 1w, 8w. 0 turns interval-based rotation off. Size and interval are independent: whichever falls due first rotates the file. Default is 1d.

  • CB_MCP_AUDIT_LOG_RETENTION_MAX_BACKUPS

    Number of rotated audit files retained, excluding the live file. Rotated files are gzipped and named with the UTC rotation time. Set to 0 to keep no backups: the live file is truncated at each rotation. Default is 10.

  • CB_MCP_AUDIT_LOG_TOOL_ARGS

    Record tool argument values in the audit log. Off by default: there is no redaction in this release, so enabling this writes arguments verbatim, including the full document bodies passed to document-write tools. Review the audit file's retention and access controls before enabling it.

  • CB_MCP_AUDIT_LOG_DISABLED_EVENTS

    Audit events to suppress, as comma-separated numeric event ids (for example '61490,61492'), or a path to a file with one id per line. Ids are listed in the audit descriptor shipped with the package. Only filterable events can be suppressed: write and security events are always recorded, and an attem...

  • CB_MCP_OAUTH_JWT_JWKS_URI

    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

    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

    Expected JWT 'aud' claim value. Required to enable OAuth.

  • CB_MCP_OAUTH_JWT_ALGORITHM

    JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256.

  • CB_MCP_OAUTH_MCP_BASE_URL

    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

    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

    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.

Docker

docker run -i --rm docker.io/couchbase/mcp-server:1.1.0

Environment variables

  • CB_CONNECTION_STRING

    Couchbase connection string. Required for connecting to the cluster.

  • CB_USERNAME

    Couchbase database username. Required for basic authentication.

  • CB_PASSWORDsecret

    Couchbase database password. Required for basic authentication.

  • CB_CA_CERT_PATH

    Couchbase CA certificate path. Required for TLS authentication in non Capella clusters.

  • CB_CLIENT_CERT_PATH

    Couchbase client certificate path. Required for mTLS authentication.

  • CB_CLIENT_KEY_PATH

    Couchbase client key path. Required for mTLS authentication.

  • CB_MCP_READ_ONLY_MODE

    Couchbase read only mode. Set to true to disable write operations: KV document, scope/collection and index write tools are not loaded, and SQL++ queries that modify data are blocked. Set to false to allow them. Default is true.

  • CB_MCP_TRANSPORT

    Transport mode for the server (stdio, http or sse). Default is stdio. OAuth is only honored with http.

  • CB_MCP_HOST

    Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes.

  • CB_MCP_PORT

    Port to run the MCP server on (default: 8000). Used only for HTTP and SSE transport modes.

  • CB_MCP_WORKERS

    Number of server worker processes (default: 1). Values above 1 use more CPU cores, require the http transport, run in stateless HTTP mode, and cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS. Each worker writes log files named with the host and process id.

  • CB_MCP_STATELESS_HTTP

    Handle each HTTP request without per-session state (default: true when workers > 1, otherwise false). Only honored with the http transport; cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS.

  • CB_MCP_DISABLED_TOOLS

    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

    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

    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

    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

    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

    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

    [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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    Expected JWT 'aud' claim value. Required to enable OAuth.

  • CB_MCP_OAUTH_JWT_ALGORITHM

    JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256.

  • CB_MCP_OAUTH_MCP_BASE_URL

    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

    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

    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_MCP_AUDIT_LOG_ENABLED

    Enable audit logging. Audit output is a separate sink from the CB_MCP_LOG_* operational logs, with a stable schema, its own retention, and events that cannot be filtered out. Default is false.

  • CB_MCP_AUDIT_LOG_SINKS

    Comma-separated audit destinations: console, file, or both. 'console' writes to stderr, never stdout, because stdout carries the JSON-RPC protocol under the stdio transport. Default is console.

  • CB_MCP_EMBEDDING_MODEL_PROVIDER

    Embedding provider for run_vector_query / run_vector_search: one of capella, openai, cohere, voyage, bedrock. Unset disables both tools' embedding step until configured.

  • CB_MCP_AUDIT_LOG_FILE_PATH

    Path to the audit log file, required when 'file' is in CB_MCP_AUDIT_LOG_SINKS. Each server process writes its own file with the host and process id inserted before the extension (audit.log becomes audit.myhost.1234.log), because a stdio deployment runs one process per client. If the path is missing...

  • CB_MCP_AUDIT_LOG_ROTATION_MAX_SIZE_MB

    Maximum size in MB the live audit file may reach before it rotates. 0 turns size-based rotation off. Default is 10 MB.

  • CB_MCP_AUDIT_LOG_ROTATION_INTERVAL

    Age the live audit file may reach before it rotates, as <value><unit> where the unit is 'd' (24 hours) or 'w' (7 days) - for example 1d, 30d, 1w, 8w. 0 turns interval-based rotation off. Size and interval are independent: whichever falls due first rotates the file. Default is 1d.

  • CB_MCP_EMBEDDING_MODEL

    Model name/ID for the configured embedding provider.

  • CB_MCP_AUDIT_LOG_RETENTION_MAX_BACKUPS

    Number of rotated audit files retained, excluding the live file. Rotated files are gzipped and named with the UTC rotation time. Set to 0 to keep no backups: the live file is truncated at each rotation. Default is 10.

  • CB_MCP_AUDIT_LOG_TOOL_ARGS

    Record tool argument values in the audit log. Off by default: there is no redaction in this release, so enabling this writes arguments verbatim, including the full document bodies passed to document-write tools. Review the audit file's retention and access controls before enabling it.

  • CB_MCP_AUDIT_LOG_DISABLED_EVENTS

    Audit events to suppress, as comma-separated numeric event ids (for example '61490,61492'), or a path to a file with one id per line. Ids are listed in the audit descriptor shipped with the package. Only filterable events can be suppressed: write and security events are always recorded, and an attem...

  • CB_MCP_EMBEDDING_MODEL_API_KEYsecret

    API key for the configured embedding provider. Not used by bedrock (uses the AWS credential chain / CB_MCP_EMBEDDING_MODEL_AWS_* instead).

  • CB_MCP_EMBEDDING_MODEL_ENDPOINT

    Base URL override for the configured embedding provider (e.g. an OpenAI-compatible local server, or a Capella Model Service deployment's own URL). Required when CB_MCP_EMBEDDING_MODEL_PROVIDER=capella.

  • CB_MCP_EMBEDDING_MODEL_AWS_ACCESS_KEY_IDsecret

    AWS access key ID, bedrock provider only. Omit to use the default AWS credential chain.

  • CB_MCP_EMBEDDING_MODEL_AWS_SECRET_ACCESS_KEYsecret

    AWS secret access key, bedrock provider only.

  • CB_MCP_EMBEDDING_MODEL_AWS_REGION

    AWS region, bedrock provider only. Falls back to the AWS SDK's own region resolution if unset.

Docker

docker run -i --rm docker.io/couchbase/mcp-server:1.1.0

Environment variables

  • CB_OPERATIONAL_INSIGHTS_CONNECTION_STRING

    Operational Insights (Enterprise Analytics) endpoint URL, e.g. http://localhost:8095 (local) or https://<host>:18095 (Capella). An HTTP(S) URL, not a couchbase:// connection string.

  • CB_OPERATIONAL_INSIGHTS_USERNAME

    Operational Insights database username. Required for basic authentication.

  • CB_OPERATIONAL_INSIGHTS_PASSWORDsecret

    Operational Insights database password. Required for basic authentication.

  • CB_OPERATIONAL_INSIGHTS_CA_CERT_PATH

    Operational Insights CA certificate (trust store) path, used to verify the server certificate over https://.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_CERT_PATH

    Client certificate path for mTLS: a PEM certificate (paired with the client key path) or a PKCS#12 bundle (.p12/.pfx). Requires an https:// connection string. When set, username/password are ignored.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_KEY_PATH

    Client private key path (PEM) for mTLS. Leave unset when the client certificate is a PKCS#12 bundle that already contains the key.

  • CB_OPERATIONAL_INSIGHTS_CLIENT_CERT_PASSWORDsecret

    Decryption password for the client key or PKCS#12 bundle, if it is encrypted. Omit if the file is unencrypted.

  • CB_MCP_OPERATIONAL_INSIGHTS_ASYNC_QUERY_RESULT_TIMEOUT

    Timeout in seconds for each async query request (start, status, fetch, discard, cancel). For a fetch it covers the whole download, so a result that takes longer than this to read fails. Positive integer, maximum 600; larger values are clamped to 600 with a warning, and any other invalid value is log...

  • CB_MCP_READ_ONLY_MODE

    Operational Insights read only mode. Set to true to disable write operations: the operational_insights_create_index and operational_insights_cancel_async_query tools are not loaded, and queries that modify data are blocked. Set to false to allow them. Default is true.

  • CB_MCP_TRANSPORT

    Transport mode for the server (stdio, http or sse). Default is stdio. OAuth is only honored with http.

  • CB_MCP_HOST

    Host to run the MCP server on (default: 127.0.0.1). Used only for HTTP and SSE transport modes.

  • CB_MCP_PORT

    Port to run the MCP server on (default: 8001). Used only for HTTP and SSE transport modes.

  • CB_MCP_STATELESS_HTTP

    Handle each HTTP request without per-session state (default: true when workers > 1, otherwise false). Only honored with the http transport; cannot be combined with CB_MCP_CONFIRMATION_REQUIRED_TOOLS.

  • CB_MCP_DISABLED_TOOLS

    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

    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

    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

    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

    Base path for the per-level log files. One rotating file is written per level (e.g. mcp_server_operational_insights.info.log, mcp_server_operational_insights.error.log). Only used when 'file' is in CB_MCP_LOG_SINKS. Default is mcp_server_operational_insights.log.

  • CB_MCP_LOG_ROTATION_MAX_SIZE_MB

    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

    [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

    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

    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

    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

    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

    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

    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

    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

    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

    Rotated backups kept for the DEBUG log file. Overrides CB_MCP_LOG_RETENTION_BACKUP_COUNT for DEBUG; inherits it when unset.

  • CB_MCP_AUDIT_LOG_ENABLED

    Enable audit logging. Audit output is a separate sink from the CB_MCP_LOG_* operational logs, with a stable schema, its own retention, and events that cannot be filtered out. Default is false. This server emits audit records under its own event block, 0x10000 (65536), so an event id names the server...

  • CB_MCP_AUDIT_LOG_SINKS

    Comma-separated audit destinations: console, file, or both. 'console' writes to stderr, never stdout, because stdout carries the JSON-RPC protocol under the stdio transport. Default is console.

  • CB_MCP_AUDIT_LOG_FILE_PATH

    Path to the audit log file, required when 'file' is in CB_MCP_AUDIT_LOG_SINKS. Each server process writes its own file with the host and process id inserted before the extension (audit.log becomes audit.myhost.1234.log), because a stdio deployment runs one process per client. If the path is missing...

  • CB_MCP_AUDIT_LOG_ROTATION_MAX_SIZE_MB

    Maximum size in MB the live audit file may reach before it rotates. 0 turns size-based rotation off. Default is 10 MB.

  • CB_MCP_AUDIT_LOG_ROTATION_INTERVAL

    Age the live audit file may reach before it rotates, as <value><unit> where the unit is 'd' (24 hours) or 'w' (7 days) - for example 1d, 30d, 1w, 8w. 0 turns interval-based rotation off. Size and interval are independent: whichever falls due first rotates the file. Default is 1d.

  • CB_MCP_AUDIT_LOG_RETENTION_MAX_BACKUPS

    Number of rotated audit files retained, excluding the live file. Rotated files are gzipped and named with the UTC rotation time. Set to 0 to keep no backups: the live file is truncated at each rotation. Default is 10.

  • CB_MCP_AUDIT_LOG_TOOL_ARGS

    Record tool argument values in the audit log. Off by default: there is no redaction in this release, so enabling this writes arguments verbatim, including the full document bodies passed to document-write tools. Review the audit file's retention and access controls before enabling it.

  • CB_MCP_AUDIT_LOG_DISABLED_EVENTS

    Audit events to suppress, as comma-separated numeric event ids (for example '61490,61492'), or a path to a file with one id per line. Ids are listed in the audit descriptor shipped with the package. Only filterable events can be suppressed: write and security events are always recorded, and an attem...

  • CB_MCP_OAUTH_JWT_JWKS_URI

    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

    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

    Expected JWT 'aud' claim value. Required to enable OAuth.

  • CB_MCP_OAUTH_JWT_ALGORITHM

    JWT signing algorithm. One of RS256/384/512, ES256/384/512, PS256/384/512. Default is RS256.

  • CB_MCP_OAUTH_MCP_BASE_URL

    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

    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

    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.

More MCP servers