Skip to main content

Tools

The Couchbase MCP Server exposes several tools across multiple categories. The list of supported tools is constantly evolving so check the GitHub readme for the latest set of tools. Each tool is available to LLMs through the MCP protocol.

Cluster Setup & Health

Tools for checking server status and cluster connectivity.

Source

ToolDescription
get_server_configuration_statusGet the status and configuration of the MCP server
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

Data Model & Schema Discovery

Tools for exploring buckets, scopes, collections, and document schemas.

Source

ToolDescription
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
get_scopes_and_collections_in_bucketGet a list of all the scopes and collections in the specified bucket
get_schema_for_collectionInfer the document structure for a collection

Document KV Operations

Tools for reading and writing documents by ID. Tools that modify data are disabled by default when CB_MCP_READ_ONLY_MODE=true.

Source

ToolDescription
get_document_by_idGet a document by ID from a specified scope and collection
upsert_document_by_idInsert or update a document by ID
insert_document_by_idInsert a new document by ID (fails if document exists)
replace_document_by_idReplace an existing document by ID (fails if document doesn't exist)
delete_document_by_idDelete a document by ID

Query and Indexing

Tools for running SQL++ queries, listing indexes, and getting index recommendations.

Source (query) | Source (index)

ToolDescription
run_sql_plus_plus_queryRun a SQL++ query on a specified scope
explain_sql_plus_plus_queryProvides information about the execution plan for the statement. This includes operators such as scans, joins, and filters; it aids in performance tuning by showing index usage, cost estimates, and data access paths
list_indexesList all indexes in the cluster with their definitions, with optional filtering
get_index_advisor_recommendationsGet index recommendations from Couchbase Index Advisor for a given SQL++ query

Query Performance Analysis

Tools for identifying slow queries, missing indexes, and optimization opportunities. These tools query system:completed_requests.

Source

ToolDescription
get_longest_running_queriesGet longest running queries by average service time
get_most_frequent_queriesGet most frequently executed queries
get_queries_not_selectiveGet queries that are not selective
get_queries_not_using_covering_indexGet queries that do not use a covering index
get_queries_using_primary_indexGet queries that use a primary index (potential performance concern)
get_queries_with_largest_response_sizesGet queries with the largest response sizes
get_queries_with_large_result_countGet queries with the largest result counts