← Back to directory
C

Couchbase MCP Server

Official
Let AI agents securely connect to and work with data in Couchbase clusters
Category
Database #7 of 58
Stars
★ 34 Popular
Transport
stdio (local process) · SSE · Streamable HTTP
Runtime
Python 3.10+ · Docker
Credentials
API key / credential required
License
Apache-2.0
Last commit
Tools
33
72FMRS · B

A feature-complete, officially maintained database MCP server from Couchbase: cluster health, schema discovery, KV operations, SQL++ querying, index management, and performance analysis, with safe defaults (read-only), tool disabling, execution confirmation, OAuth 2.1, and thorough logging. Ideal for Couchbase users adding AI-driven data operations in mainstream MCP clients, but remember RBAC remains the authoritative security boundary.

Strongest · Documentation 18/20 Weakest · Reliability 11/20

Reliability
11/20
Security and permissions
16/20
Maintenance
13/20
Documentation
18/20
Setup experience
14/20
Why each score
Reliability 11/20
The manifest and README are internally consistent — tool names, env vars, and CLI flags map 1:1, and the read-only mode behavior (which write tools get unloaded) matches between the two sources, suggesting the documentation was written carefully against the actual implementation. The README references an integration test suite (tests/, 'uv run pytest tests/ -v') but running it requires live Couchbase cluster credentials, and no CI workflow file or evidence of passing tests was provided in this static review. Per the static calibration rule, without verifiable CI+test evidence reliability is capped below 12, so 11 is given: the happy path is plausible and well-specified, but error handling, edge cases, and actual execution proof are not demonstrated.
Security and permissions 16/20
Read-only mode (CB_MCP_READ_ONLY_MODE=true) is the default, so KV/schema/index write tools are not loaded unless explicitly enabled — a strong default-deny posture. The server also supports per-tool disabling, elicitation-based confirmation for dangerous tools, and OAuth 2.1 with JWKS-based JWT verification plus separate read/write scopes for HTTP transport. The docs explicitly warn that tool disabling is not a substitute for Couchbase RBAC, pushing users toward the real authoritative control. Passwords are flagged isSecret in the manifest, and log documentation mentions a redacted config snapshot. Deductions: HTTP transport is explicitly 'unauthenticated' without OAuth configured (disclosed, but still a real misconfiguration risk), and certificate path variables aren't marked secret (minor). No red-line issue is present, and disclosure is thorough, warranting 16.
Maintenance 13/20
Apache-2.0 licensed, not archived, 34 stars, 6 open issues, and a 1.0.2rc1 version number indicating active release-candidate work. However, the README explicitly states the project is 'Couchbase community-maintained' rather than officially supported, with best-effort GitHub-issue-only support and no stated SLA or formal security response channel. Engineering hygiene signals (CONTRIBUTING.md, pre-commit hooks, lint scripts) are present, showing some process maturity. Balancing active development signals against the explicit lack of formal support/governance yields 13.
Documentation 18/20
The README is extensive: install paths via PyPI, Docker, and source; concrete client configs for Claude Desktop, Cursor, Windsurf, VS Code, and JetBrains; a full environment variable/CLI flag reference table; detailed semantics and caveats of read-only mode; tool-disabling and confirmation mechanisms with an explicit security caveat; thorough logging/rotation configuration; OAuth 2.1 setup example; a troubleshooting section; and integration test instructions. Documentation is layered, example-rich, and discloses limitations clearly, earning 18.
Setup experience 14/20
Setup is well documented with a one-line uvx install and ready-to-use JSON snippets for multiple mainstream clients, plus a complete Docker alternative and troubleshooting tips. However, as this is a purely static review with no executed verification of these steps, and per the calibration rule setup cannot exceed 15 without such evidence. The server also depends on external prerequisites (an already-provisioned Couchbase cluster, certificate files for TLS/mTLS) that add real-world setup friction, so 14 is given.

Static review · not runListed 2026-09-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkConnects to a database

Best for

  • Developers and data teams who want safe AI access to Couchbase data in mainstream MCP clients (Claude Desktop, Cursor, Windsurf, VS Code, JetBrains IDEs)
  • Teams already using Couchbase (Capella or self-managed) who want LLM-assisted querying and analysis

Not for

  • Unattended write access to production databases without risk assessment (read-only mode blocks writes by default)
  • Users not running Couchbase or without a running cluster
  • Those needing official support-portal assistance (community-maintained; GitHub only)

Required permissions

  • Couchbase connection string plus username/password for basic auth, or client certificate and key paths for mTLS, via environment variables or CLI arguments
  • CA root certificate path for TLS with self-signed/untrusted certificates on non-Capella clusters
  • Database user needs RBAC permissions to access at least one bucket — RBAC is the authoritative security control

Risks and side effects

  • CB_MCP_READ_ONLY_MODE defaults to true, disabling all writes; when false, the LLM can modify/delete documents, scopes, collections, and indexes
  • Disabling tools alone is not sufficient: SQL++ DML can still modify data via run_sql_plus_plus_query; use read-only mode or proper RBAC
  • delete_scope/delete_collection permanently destroy data
  • The HTTP endpoint is unauthenticated unless OAuth is configured
  • LLM outputs may be inaccurate; Couchbase does not review them and users are solely responsible
  • The product automatically collects usage/performance data (e.g., product version, IP address); see the Couchbase Privacy Policy

Setup

Before you start

Runtime:Python 3.10+ · Docker

CB_CONNECTION_STRING required Couchbase cluster connection string (e.g., couchbases://...), from the Capella console or your self-managed cluster.
CB_PASSWORD optionalsecret Database password for basic authentication; secret.
Other optional settings (31)
CB_USERNAME optional Database username for basic authentication, created in Capella or Couchbase Server RBAC.
CB_CA_CERT_PATH optional Server CA certificate path for TLS with self-signed/untrusted certificates; not needed for Capella.
CB_CLIENT_CERT_PATH optional Client certificate file path for mTLS authentication.
CB_CLIENT_KEY_PATH optional Client private key file path for mTLS authentication.
CB_MCP_READ_ONLY_MODE optional Read-only switch, true by default; disables all write operations (KV, query, scope/collection and index management).
CB_MCP_TRANSPORT optional Transport mode: stdio, http, or sse. Default stdio.
CB_MCP_HOST optional Host the server binds to in HTTP/SSE modes, default 127.0.0.1.
CB_MCP_PORT optional Port for HTTP/SSE modes, default 8000.
CB_MCP_DISABLED_TOOLS optional Tools to disable: comma-separated names or a file path with one tool name per line.
CB_MCP_CONFIRMATION_REQUIRED_TOOLS optional Tools requiring explicit user confirmation via MCP elicitation before execution.
CB_MCP_LOG_LEVEL optional Log level: off, debug, info, warning, error. Default info.
CB_MCP_LOG_SINKS optional Log destinations: stderr, file, or both. Default stderr.
CB_MCP_LOG_FILE optional Base path for per-level log files, default mcp_server.log.
CB_MCP_LOG_ROTATION_MAX_SIZE_MB optional Global per-level log rotation size in MB, default 1.
CB_MCP_LOG_MAX_BYTES optional Deprecated byte-based rotation size; ignored when CB_MCP_LOG_ROTATION_MAX_SIZE_MB is set.
CB_MCP_LOG_ERROR_ROTATION_MAX_SIZE_MB optional Overrides the global rotation size (MB) for the ERROR log file.
CB_MCP_LOG_WARNING_ROTATION_MAX_SIZE_MB optional Overrides the global rotation size (MB) for the WARNING log file.
CB_MCP_LOG_INFO_ROTATION_MAX_SIZE_MB optional Overrides the global rotation size (MB) for the INFO log file.
CB_MCP_LOG_DEBUG_ROTATION_MAX_SIZE_MB optional Overrides the global rotation size (MB) for the DEBUG log file.
CB_MCP_LOG_RETENTION_BACKUP_COUNT optional Number of rotated backups kept per level, default 1.
CB_MCP_LOG_ERROR_RETENTION_BACKUP_COUNT optional Overrides the global backup count for the ERROR log file.
CB_MCP_LOG_WARNING_RETENTION_BACKUP_COUNT optional Overrides the global backup count for the WARNING log file.
CB_MCP_LOG_INFO_RETENTION_BACKUP_COUNT optional Overrides the global backup count for the INFO log file.
CB_MCP_LOG_DEBUG_RETENTION_BACKUP_COUNT optional Overrides the global backup count for the DEBUG log file.
CB_MCP_OAUTH_JWT_JWKS_URI optional Identity provider JWKS endpoint used to verify bearer JWT signatures; required for OAuth, only honored on http transport.
CB_MCP_OAUTH_JWT_ISSUER optional Expected JWT 'iss' claim; required to enable OAuth.
CB_MCP_OAUTH_JWT_AUDIENCE optional Expected JWT 'aud' claim; required to enable OAuth.
CB_MCP_OAUTH_JWT_ALGORITHM optional JWT signing algorithm (RS256/384/512, ES256/384/512, PS256/384/512); default RS256.
CB_MCP_OAUTH_MCP_BASE_URL optional Public base URL of this server; when set, publishes RFC 9728 Protected Resource Metadata.
CB_MCP_OAUTH_SCOPE_READ_LABEL optional Override of the OAuth scope label treated as 'read' access; default couchbase-mcp:read.
CB_MCP_OAUTH_SCOPE_WRITE_LABEL optional Override of the OAuth scope label treated as 'write' access; default couchbase-mcp:write.

Prerequisites: Python 3.10+, a running Couchbase cluster (Capella free tier is easiest), uv installed, and an MCP client such as Claude Desktop or Cursor. PyPI: add to mcpServers with command uvx and args ["couchbase-mcp-server"], setting CB_CONNECTION_STRING, CB_USERNAME, and CB_PASSWORD in env (for mTLS use CB_CLIENT_CERT_PATH and CB_CLIENT_KEY_PATH). Source: clone the repo and run uv --directory <repo-path> run src/mcp_server.py. A Docker image (docker.io/couchbase/mcp-server) is also available.

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

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add couchbase -e CB_CONNECTION_STRING=couchbases://connection-string -e CB_USERNAME=username -e CB_PASSWORD=password -- uvx couchbase-mcp-server

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Check that the couchbase server's tools (e.g., get_buckets_in_cluster) appear in the client's tool list, then ask the AI to call test_cluster_connection or list the buckets — returning real bucket names proves the connection works.

Troubleshooting

  1. Verify the repo path in configuration when running from source (include trailing slash)
  2. Check connection string, username, password, or certificate paths
  3. For Capella, ensure the cluster is accessible from the machine running the MCP server (allowed IP list)
  4. Confirm the database user has permissions for at least one bucket
  5. Ensure uv is installed and accessible; use absolute paths to uv/uvx if needed
  6. Check MCP client logs for errors; run uv sync after updating the source repo
  7. Check the server version with uvx couchbase-mcp-server --version

Things to try

Once connected, you can ask your AI assistant things like:

  • List all buckets in the cluster and the scopes and collections inside each bucket.
  • Show me the schema of the users collection.
  • What are the 5 longest running queries, and do you have index recommendations for them?
  • Read the document with this ID from the airline collection in travel-sample.

Tools 33

get_server_configuration_status read-only
Get server status and configuration without connecting to the cluster (read-only mode, disabled/confirmation-required tools, OAuth settings, resolved logging config)
test_cluster_connection read-only
Check cluster credentials by connecting to the cluster
get_cluster_health_and_services read-only
Get cluster health status and list of all running services
get_buckets_in_cluster read-only
List all buckets in the cluster
get_scopes_in_bucket read-only
List all scopes in the specified bucket
get_collections_in_scope read-only
List all collections in a specified scope and bucket (requires Query service)
get_scopes_and_collections_in_bucket read-only
List all scopes and collections in the specified bucket
get_schema_for_collection read-only
Get the structure for a collection
Show 25 more tools
create_scope writes
Create a new scope in a bucket (Couchbase Server 7.6+ and Capella); disabled by default in read-only mode
create_collection writes
Create a new collection in an existing scope (Couchbase Server 7.6+ and Capella); disabled by default in read-only mode
delete_scope destructive
Delete a scope and all its collections — permanent; disabled by default in read-only mode
delete_collection destructive
Delete a collection and all its documents — permanent; disabled by default in read-only mode
get_document_by_id read-only
Get a document by ID from a specified scope and collection
sub_document_lookup_in read-only
Look up parts of a document (fields, existence checks, array/object counts) by path without fetching the whole document
upsert_document_by_id writes
Upsert a document by ID to a specified scope and collection; disabled by default in read-only mode
insert_document_by_id writes
Insert a new document by ID (fails if it exists); disabled by default in read-only mode
replace_document_by_id writes
Replace an existing document by ID (fails if it doesn't exist); disabled by default in read-only mode
delete_document_by_id destructive
Delete a document by ID from a specified scope and collection; disabled by default in read-only mode
sub_document_mutate_in writes
Modify parts of an existing document (upsert, insert, replace, remove, array ops, counters) by path; disabled by default in read-only mode
list_indexes read-only
List all indexes in the cluster with definitions, with optional filtering and raw index stats
get_index_advisor_recommendations read-only
Get index recommendations from Couchbase Index Advisor for a given SQL++ query
create_index writes
Create a scalar (non-vector) GSI secondary index, deferred by default; disabled by default in read-only mode
build_index writes
Trigger the build of all deferred indexes on a collection; disabled by default in read-only mode
drop_index destructive
Drop a GSI index (scalar or vector) from a collection; disabled by default in read-only mode
run_sql_plus_plus_query writes
Run a SQL++ query on a specified scope; queries are auto-scoped to the bucket/scope; write queries are blocked in read-only mode (default)
explain_sql_plus_plus_query read-only
Generate and evaluate an EXPLAIN plan for a SQL++ query, returning metadata, plan, and findings
get_longest_running_queries read-only
Get longest running queries by average service time
get_most_frequent_queries read-only
Get most frequently executed queries
get_queries_with_largest_response_sizes read-only
Get queries with the largest response sizes
get_queries_with_large_result_count read-only
Get queries with the largest result counts
get_queries_using_primary_index read-only
Get queries that use a primary index (potential performance concern)
get_queries_not_using_covering_index read-only
Get queries that don't use a covering index
get_queries_not_selective read-only
Get queries that are not selective (index scans return far more documents than the final result)

Use cases

Query Couchbase data in natural language and perform document CRUD operations
Explore cluster structure and data models (buckets, scopes, collections, schema)
Analyze query performance bottlenecks and get index recommendations
Create and manage GSI secondary indexes

Supported clients

Claude Desktop
Cursor
Windsurf Editor
VS Code
JetBrains IDEs

Listed from the project's documentation, not tested by this site.

Overview

An officially maintained, self-hosted MCP Server by Couchbase that allows AI agents to connect to Couchbase clusters — whether hosted on Capella or self-managed — and interact with their data. It provides tools across Cluster Health, Data Schema, Key-Value, Query, and Performance categories, with safety controls including read-only mode by default, fine-grained tool disabling, confirmation-required tools (client elicitation), OAuth 2.1 authorization (HTTP transport), and extensive logging configuration. Distributed via PyPI (couchbase-mcp-server), Docker, or source, it supports STDIO and Streamable HTTP transports (plus deprecated SSE).

Similar servers

Source revision 2a754631ab35 Data synced 2026-10-19 Read the FMRS scoring method