servers / couchbase
Couchbase MCP server
communitystdiolocalwrite capablehealthy
Interact with the data stored in Couchbase clusters using natural language.
01Tools · 21
How to read this: tool names here are observed from a live tools/list handshake. The Risk label is a heuristic inferred from the tool name (write/destructive verbs), not from executing the tool — a conservative guess, not a verified capability. We never escalate risk from a description. Found one that's wrong? Tell us — we fix on report.
| Tool | Risk | Side effects | Approval |
|---|---|---|---|
| get_queries_with_large_result_count Get queries with the largest result counts from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| list_indexes List indexes in the cluster with optional filtering by bucket, scope, collection, and index name.
Filters must be provided hierarchically: scope requires bucket, collection requires both, index requires all three.
Set ``return_raw_index_stats=True`` to get the unprocessed source row for each index.
Each result contains: name, definition (CREATE INDEX statement), status, isPrimary, bucket, scope, collection, lastScanTime.
If a required field is missing, the entry contains warning and raw_index_stats instead.
Source depends on cluster version: v8+ queries ``system:indexes`` via the
query service (RBAC-scoped — the connected user sees only indexes on
keyspaces they can access); older clusters fall back to the admin-level
Index Service REST API ``/getIndexStatus``. | read | false | unknown |
| get_queries_with_largest_response_sizes Get queries with the largest response sizes from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_scopes_and_collections_in_bucket Get the names of all scopes and collections in the bucket.
Returns a dictionary with scope names as keys and lists of collection names as values. | read | false | unknown |
| get_queries_not_selective Get queries that are not very selective from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_document_by_id Get a document by its ID from the specified scope and collection.
If the document is not found, it will raise an exception. | read | false | unknown |
| get_queries_not_using_covering_index Get queries that don't use a covering index from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_buckets_in_cluster Get the names of all the accessible buckets in the cluster. | read | false | unknown |
| get_most_frequent_queries Get the N most frequent queries from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_index_advisor_recommendations Get index recommendations from Couchbase Index Advisor for a given SQL++ query.
The Index Advisor analyzes the query and provides recommendations for optimal indexes.
This tool works with SELECT, UPDATE, DELETE, or MERGE queries.
The queries will be run on the specified scope in the specified bucket.
Returns a dictionary with:
- current_used_indexes: Array of currently used indexes (if any)
- recommended_indexes: Array of recommended secondary indexes (if any)
- recommended_covering_indexes: Array of recommended covering indexes (if any)
Each index object contains:
- index: The CREATE INDEX SQL++ command
- statements: Array of statement objects with the query and run count | read | false | unknown |
| get_collections_in_scope Get the names of all collections in the given scope and bucket. | read | false | unknown |
| get_server_configuration_status Get the server status and configuration without establishing connection.
This tool can be used to verify if the server is running and check the configuration. | read | false | unknown |
| get_schema_for_collection Get the schema for a collection in the specified scope.
Returns a dictionary with the collection name and the schema returned by running INFER query on the Couchbase collection. | read | false | unknown |
| explain_sql_plus_plus_query Generate and evaluate an EXPLAIN plan for a SQL++ query. It provides information about the execution plan for the query.
The EXPLAIN statement is run in the specified scope in the specified bucket.
It returns query metadata along with an extracted plan and plan evaluation. | read | false | unknown |
| lookup_subdocument Look up parts of a document without fetching the whole thing, using Couchbase
sub-document operations. Use this instead of get_document_by_id when you only need
a few fields, a presence check, or the size of an array/object inside a document —
AND you already know the exact field path(s) to look up (e.g. from a prior
get_document_by_id call on this same document, from the user explicitly naming the
field, or from a known/confirmed schema for this collection).
IMPORTANT: Do NOT guess field paths. If you don't already know the document's exact
field names/structure, call get_document_by_id first (or instead) — a guessed path
that doesn't exist returns a per-path error here rather than the real data, and
reporting "not found" for a wrong guess is worse than just fetching the whole
document and reading the right field.
Provide one or more of the following. Each is a list of sub-document paths using
Couchbase's dot/bracket path syntax (e.g. "address.city", "tags[0]", "tags[-1]" for
the last array element):
- get_paths: fetch the VALUE at each path.
- exists_paths: check whether each path exists, without fetching its value (cheaper
than get_paths — no payload transfer — when you only need a yes/no answer).
- count_paths: get the number of elements in the array or object at each path (fails
per-path if the path isn't an array/object).
At least one of get_paths, exists_paths, or count_paths must be provided. As a rule of
thumb, keep the combined number of paths across all three to 16 or fewer — Couchbase
limits subdocument operations per call, though the exact limit is server-side and may
change. If the server rejects the call (too many paths, or another constraint like path
length or nesting depth), the whole call fails with {"error": "..."}.
A path that doesn't exist (or otherwise fails, e.g. count on a non-array/object) does
NOT fail the whole call — it is reported individually as {"error": ...} in the
returned dict so the other requested paths can still be resolved.
Returns a dict with a key for each category that was requested (only requested
categories are included):
{
"get": {"<path>": {"value": <value>} | {"error": "..."}},
"exists": {"<path>": {"value": true | false} | {"error": "..."}},
"count": {"<path>": {"value": <count>} | {"error": "..."}},
}
On a connection/lookup failure, or an invalid request (no paths / too many paths),
returns {"error": "<message>"} instead. | read | false | unknown |
| get_queries_using_primary_index Get queries that use a primary index from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_scopes_in_bucket Get the names of all scopes in the given bucket. | read | false | unknown |
| get_longest_running_queries Get the N longest running queries from the system:completed_requests catalog.
Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query. | read | false | unknown |
| get_cluster_health_and_services Get cluster health status and list of all running services.
This tool provides health monitoring by:
- Getting health status of all running services with latency information (via ping)
- Listing all services running on the cluster with their endpoints
- Showing connection status and node information for each service
If bucket_name is provided, it actively pings services from the perspective of the bucket.
Otherwise, it uses cluster-level ping to get the health status of the cluster.
Returns:
- Cluster health status with service-level connection details and latency measurements | read | false | unknown |
| test_cluster_connection Test the connection to Couchbase cluster and optionally to a bucket.
This tool verifies the connection to the Couchbase cluster and bucket by establishing the connection if it is not already established.
If bucket name is not provided, it will not try to connect to the bucket specified in the MCP server settings.
Returns connection status and basic cluster information. | read | false | unknown |
| run_sql_plus_plus_query Run a SQL++ query on a scope and return the results as a list of JSON objects.
The query will be run on the specified scope in the specified bucket.
The query should use collection names directly without bucket/scope prefixes, as the scope context is automatically set.
Use ``named_parameters`` to bind values to ``$name`` placeholders in the
query instead of concatenating user input into the statement. This prevents
SQL++ injection
Example:
query = "SELECT * FROM users WHERE age > 18"
# Incorrect: "SELECT * FROM bucket.scope.users WHERE age > 18"
For creating a new index, prefer the create_index tool over a raw CREATE INDEX statement
here — it defers the build by default and tells you the recommended next step. Use
list_indexes to check whether an index is online before relying on it in a query plan. | write | true | unknown |
02Install & source
uvx couchbase-mcp-server
uvxdocker run mcp/couchbase-src
docker- repohttps://github.com/Couchbase-Ecosystem/mcp-server-couchbase
- homepagehttps://mcp-server.couchbase.com/
- licenseApache-2.0
- adoption34 stars · 33 forks
03Access granted
Query a database · destructiveQuery a database · write
The access this server can exercise, inferred from its verified tools — not a declared OAuth scope.
05Provenance & freshness
sourcesAwesome MCP Servers (wong2) [p6]
last_checked2026-08-16 18:45Z
next_check2026-08-16 21:40Z
cadenceevery 3h
verifiedtools_list:passed handshake:passed metadata:passed tools_list:passed handshake:passed metadata:passed tools_list:passed handshake:passed metadata:passed tools_list:passed
index_statusindex — 9 unique facts >= 5
06Badge
Add the “as seen on MCPExplorer” badge to your README.
[](https://mcpexplorer.com/servers/couchbase)
Next step
This is one server. A loadout combines the right servers, governance, and proven plays for a whole job — assembled deliberately, not tool-dumped.
Explore loadouts →