Couchbase MCP Server

Interact with the data stored in Couchbase clusters using natural language.

Remote serverstreamable-httpPython

What is the Couchbase MCP server?

Couchbase MCP server is a hosted integration for AI assistants that speak the Model Context Protocol. Interact with the data stored in Couchbase clusters using natural language.

What you get

Couchbase MCP Server is a self-hosted MCP Server that allows AI agents to connect to and interact with data in Couchbase clusters, whether hosted on Capella or self-managed. It provides tools across categories including Cluster Health, Data Schema, Key-Value, Query, and Performance — with safety controls via read-only mode and fine-grained tool disabling. It supports both STDIO and Streamable HTTP transports.

What the assistant can call

Once Couchbase is connected, these are the calls the assistant has available:

  • get_server_configuration_status — Get the server status and configuration without connecting to the cluster — reports read-only mode, disabled/confirmation-required tools, OAuth
  • test_cluster_connection — Check the cluster credentials by connecting to the cluster
  • get_cluster_health_and_services — Get cluster health status and list of all running services
  • get_buckets_in_cluster — Get a list of all the buckets in the cluster
  • get_scopes_in_bucket — Get a list of all the scopes in the specified bucket
  • get_collections_in_scope — Get a list of all the collections in a specified scope and bucket. Note that this tool requires the cluster to have Query service
  • get_scopes_and_collections_in_bucket — Get a list of all the scopes and collections in the specified bucket
  • get_schema_for_collection — Get the structure for a collection
  • get_document_by_id — Get a document by ID from a specified scope and collection
  • upsert_document_by_id — Upsert a document by ID to a specified scope and collection. Disabled by default when CB_MCP_READ_ONLY_MODE=true.
  • insert_document_by_id — Insert a new document by ID (fails if document exists). Disabled by default when CB_MCP_READ_ONLY_MODE=true.
  • replace_document_by_id — Replace an existing document by ID (fails if document doesn't exist). Disabled by default when CB_MCP_READ_ONLY_MODE=true.

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Configuration and credentials

You will need 8 environment variables: CB_CONNECTION_STRING, CB_USERNAME, CB_PASSWORD, CB_CLIENT_CERT_PATH, CB_CLIENT_KEY_PATH, CB_MCP_DISABLED_TOOLS, CB_CA_CERT_PATH, CB_MCP_HOST. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.10 or higher. - A running Couchbase cluster. The easiest way to get started is to use Capella free tier, which is fully managed version of Couchbase server. You can follow instructions to import one

Choosing this one

Among the planning and project tracking options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Couchbase's toolset — get_server_configuration_status, test_cluster_connection, get_cluster_health_and_services and 11 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Couchbase.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the couchbase mcp server does with a few real requests.

Available tools

ToolWhat it does
get_server_configuration_statusGet the server status and configuration without connecting to the cluster — reports read-only mode, disabled/confirmation-required tools, OAuth settings, and the resolved logging configuration
test_cluster_connectionCheck the cluster credentials by connecting to the cluster
get_cluster_health_and_servicesGet cluster health status and list of all running services
get_buckets_in_clusterGet a list of all the buckets in the cluster
get_scopes_in_bucketGet a list of all the scopes in the specified bucket
get_collections_in_scopeGet a list of all the collections in a specified scope and bucket. Note that this tool requires the cluster to have Query service.
get_scopes_and_collections_in_bucketGet a list of all the scopes and collections in the specified bucket
get_schema_for_collectionGet the structure for a collection
get_document_by_idGet a document by ID from a specified scope and collection
upsert_document_by_idUpsert a document by ID to a specified scope and collection. **Disabled by default when CB_MCP_READ_ONLY_MODE=true.**
insert_document_by_idInsert a new document by ID (fails if document exists). **Disabled by default when CB_MCP_READ_ONLY_MODE=true.**
replace_document_by_idReplace an existing document by ID (fails if document doesn't exist). **Disabled by default when CB_MCP_READ_ONLY_MODE=true.**
delete_document_by_idDelete a document by ID from a specified scope and collection. **Disabled by default when CB_MCP_READ_ONLY_MODE=true.**
list_indexesList all indexes in the cluster with their definitions, with optional filtering by bucket, scope, collection and index name. Set return_raw_index_stats=true to return the unprocessed index information.

How to install the Couchbase MCP server

{
  "mcpServers": {
    "couchbase": {
      "command": "uvx",
      "args": ["couchbase-mcp-server"],
      "env": {
        "CB_CONNECTION_STRING": "couchbases://connection-string",
        "CB_USERNAME": "username",
        "CB_PASSWORD": "password"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.10 or higher. - A running Couchbase cluster. The easiest way to get started is to use Capella free tier, which is fully managed version of Couchbase server. You can follow instructions to import one
VariableDescriptionRequired
CB_CONNECTION_STRINGConfiguration value read at startup.Optional
CB_USERNAMEConfiguration value read at startup.Optional
CB_PASSWORDConfiguration value read at startup.Optional
CB_CLIENT_CERT_PATHFilesystem location the server is allowed to use.Optional
CB_CLIENT_KEY_PATHCredential the server authenticates with.Yes
CB_MCP_DISABLED_TOOLSConfiguration value read at startup.Optional
CB_CA_CERT_PATHFilesystem location the server is allowed to use.Optional
CB_MCP_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Couchbase to get server configuration status.
  • Use Couchbase to test cluster connection.
  • Use Couchbase to get cluster health and services.

Frequently asked questions

It connects Couchbase to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_server_configuration_status, test_cluster_connection, get_cluster_health_and_services, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Couchbase directly.