Couchbase MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CB_MCP_HOST | No | Host for HTTP/SSE transport modes | 127.0.0.1 |
| CB_MCP_PORT | No | Port for HTTP/SSE transport modes | 8000 |
| CB_PASSWORD | Yes | Password for authentication | |
| CB_USERNAME | Yes | Username with bucket access | |
| CB_BUCKET_NAME | Yes | Name of the bucket to access | |
| CB_MCP_TRANSPORT | No | Transport mode: stdio, http, sse | stdio |
| CB_CONNECTION_STRING | Yes | Connection string to the Couchbase cluster | |
| CB_MCP_READ_ONLY_QUERY_MODE | No | Prevent data modification queries | true |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_buckets_in_clusterA | Get the names of all the accessible buckets in the cluster. |
| get_server_configuration_statusA | 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. |
| test_cluster_connectionA | 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. |
| get_scopes_and_collections_in_bucketA | 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. |
| get_collections_in_scopeA | Get the names of all collections in the given scope and bucket. |
| get_scopes_in_bucketA | Get the names of all scopes in the given bucket. |
| get_cluster_health_and_servicesA | Get cluster health status and list of all running services. This tool provides health monitoring by:
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:
|
| get_document_by_idA | Get a document by its ID from the specified scope and collection. If the document is not found, it will raise an exception. |
| get_schema_for_collectionA | 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. |
| run_sql_plus_plus_queryA | 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. Example: query = "SELECT * FROM users WHERE age > 18" # Incorrect: "SELECT * FROM bucket.scope.users WHERE age > 18" |
| explain_sql_plus_plus_queryA | 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. |
| get_index_advisor_recommendationsA | 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:
Each index object contains:
|
| list_indexesA | 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 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 |
| get_queries_not_selectiveB | Get queries that are not very selective from the system:completed_requests catalog. |
| get_queries_not_using_covering_indexA | Get queries that don't use a covering index from the system:completed_requests catalog. |
| get_queries_using_primary_indexA | Get queries that use a primary index from the system:completed_requests catalog. |
| get_queries_with_large_result_countB | Get queries with the largest result counts from the system:completed_requests catalog. |
| get_queries_with_largest_response_sizesA | Get queries with the largest response sizes from the system:completed_requests catalog. |
| get_longest_running_queriesA | Get the N longest running queries from the system:completed_requests catalog. |
| get_most_frequent_queriesA | Get the N most frequent queries from the system:completed_requests catalog. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Couchbase-Ecosystem/mcp-server-couchbase'
If you have feedback or need assistance with the MCP directory API, please join our Discord server