Couchbase
Interact with the data stored in Couchbase clusters using natural language.
⚡Config Installation
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"couchbase": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-couchbase"
]
}
}
}* Note: Requires restart of Claude Desktop app.
Deployment Infrastructure
Adoption Framework for Couchbase
Before installing any skill, define a clear objective and measurable outcome. A useful implementation question is: what workflow becomes faster, safer, or more reliable after this skill is active? If that answer is vague, delay rollout and tighten scope first.
For most teams, a low-risk pattern is preview-first rollout with one owner, one test scenario, and one rollback plan. Capture failures in a structured log so quality decisions are evidence-based. This is especially important for skills that touch file systems, external APIs, or automation chains with downstream side effects.
- Define success metrics before installation.
- Validate permission scope against policy boundaries.
- Run one controlled pilot and document failure categories.
- Promote only after acceptance checks pass consistently.
Pre-Deployment Review Questions
Use these questions before enabling the skill in shared environments. They reduce surprise incidents and make approval decisions consistent across teams.
- What data can this skill read, write, or transmit by default?
- Which failures are recoverable automatically and which require manual stop?
- Do we have verifiable logs that prove safe behavior under load?
- Is rollback tested, documented, and assigned to a clear owner?
If any answer is unclear, keep rollout in preview and close the gap before production use.
Editorial Review Snapshot
This listing includes an editorial QA layer in addition to automated rendering. Review status is based on documentation depth, content uniqueness, and operational safety signals from the upstream repository.
- Last scan date: 2026-01-18
- README depth: 1241 words
- Content diversity score: 0.39 (higher is better)
- Template signal count: 0
- Index status: Index eligible
Recommendation: Pilot in a bounded environment first. Confirm observability and ownership before promoting to shared workflows.
Skill Implementation Board
Actionable utility module for rollout decisions. Use the inputs below to choose a deployment path, then execute the checklist and record an output note.
Input: Security Grade
B
Input: Findings
0
Input: README Depth
1241 words
Input: Index State
Eligible
| Decision Trigger | Action | Expected Output |
|---|---|---|
| Input: risk band moderate, docs strong, findings 0 | Run a preview pilot with fixed ownership and observability checkpoints. | Pilot can start with rollback checklist attached. |
| Input: page is index-eligible | Proceed with external documentation and team onboarding draft. | Reusable rollout runbook ready for team adoption. |
| Input: context tags/scenarios are missing | Define two concrete scenarios before broad rollout. | Clear scope definition before further deployment. |
Execution Steps
- Capture objective, owner, and rollback contact.
- Run one preview pilot with fixed test scenario.
- Record warning behavior and recovery evidence.
- Promote only if pilot output matches expected threshold.
Output Template
skill=couchbase mode=B pilot_result=pass|fail warning_count=0 next_step=rollout|patch|hold
🛡️ Security Analysis
Clean Scan Report
Our static analysis engine detected no common vulnerabilities (RCE, API Leaks, Unbounded FS).
DocumentationREADME.md
Couchbase MCP Server
An MCP server implementation of Couchbase that allows LLMs to directly interact with Couchbase clusters.
Features
- Get a list of all the buckets in the cluster
- Get a list of all the scopes and collections in the specified bucket
- Get a list of all the scopes in the specified bucket
- 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 the structure for a collection
- Get a document by ID from a specified scope and collection
- Upsert a document by ID to a specified scope and collection
- Delete a document by ID from a specified scope and collection
- Run a SQL++ query on a specified scope
- Queries are automatically scoped to the specified bucket and scope, so use collection names directly (e.g., use
SELECT * FROM usersinstead ofSELECT * FROM bucket.scope.users) - There is an option in the MCP server,
CB_MCP_READ_ONLY_QUERY_MODEthat is set to true by default to disable running SQL++ queries that change the data or the underlying collection structure. Note that the documents can still be updated by ID.
- Queries are automatically scoped to the specified bucket and scope, so use collection names directly (e.g., use
- Get the status of the MCP server
- Check the cluster credentials by connecting to the cluster
- List all indexes in the cluster with their definitions, with optional filtering by bucket, scope, collection and index name.
- Get index recommendations from Couchbase Index Advisor for a given SQL++ query to optimize query performance
- Get cluster health status and list of all running services
- Query performance analysis tools:
- Get longest running queries by average service time
- Get most frequently executed queries
- Get queries with the largest response sizes
- Get queries with the largest result counts
- Get queries that use a primary index (potential performance concern)
- Get queries that don't use a covering index
- Get queries that are not selective (index scans return many more documents than final result)
Prerequisites
- 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 of the sample datasets or import your own.
- uv installed to run the server.
- An MCP client such as Claude Desktop installed to connect the server to Claude. The instructions are provided for Claude Desktop and Cursor. Other MCP clients could be used as well.
Configuration
The MCP server can be run either from the prebuilt PyPI package or the source using uv.
Running from PyPI
We publish a pre built PyPI package for the MCP server.
Server Configuration using Pre built Package for MCP Clients
Basic Authentication
{
"mcpServers": {
"couchbase": {
"command": "uvx",
"args": ["couchbase-mcp-server"],
"env": {
"CB_CONNECTION_STRING": "couchbases://connection-string",
"CB_USERNAME": "username",
"CB_PASSWORD": "password"
}
}
}
}
or
mTLS
{
"mcpServers": {
"couchbase": {
"command": "uvx",
"args": ["couchbase-mcp-server"],
"env": {
"CB_CONNECTION_STRING": "couchbases://connection-string",
"CB_CLIENT_CERT_PATH": "/path/to/client-certificate.pem",
"CB_CLIENT_KEY_PATH": "/path/to/client.key"
}
}
}
}
Note: If you have other MCP servers in use in the client, you can add it to the existing
mcpServersobject.
Running from Source
The MCP server can be run from the source using this repository.
Clone the repository to your local machine.
git clone https://github.com/Couchbase-Ecosystem/mcp-server-couchbase.git
Server Configuration using Source for MCP Clients
This is the common configuration for the MCP clients such as Claude Desktop, Cursor, Windsurf Editor.
{
"mcpServers": {
"couchbase": {
"command": "uv",
"args": [
"--directory",
"path/to/cloned/repo/mcp-server-couchbase/",
"run",
"src/mcp_server.py"
],
"env": {
"CB_CONNECTION_STRING": "couchbases://connection-string",
"CB_USERNAME": "username",
"CB_PASSWORD": "password"
}
}
}
}
Note:
path/to/cloned/repo/mcp-server-couchbase/should be the path to the cloned repository on your local machine. Don't forget the trailing slash at the end!
Note: If you have other MCP servers in use in the client, you can add it to the existing
mcpServersobject.
Additional Configuration for MCP Server
The server can be configured using environment variables or command line arguments:
| Environment Variable | CLI Argument | Description | Default |
|---|---|---|---|
CB_CONNECTION_STRING | --connection-string | Connection string to the Couchbase cluster | Required |
CB_USERNAME | --username | Username with access to required buckets for basic authentication | Required (or Client Certificate and Key needed for mTLS) |
CB_PASSWORD | --password | Password for basic authentication | Required (or Client Certificate and Key needed for mTLS) |
CB_CLIENT_CERT_PATH | --client-cert-path | Path to the client certificate file for mTLS authentication | Required if using mTLS (or Username and Password required) |
CB_CLIENT_KEY_PATH | --client-key-path | Path to the client key file for mTLS authentication | Required if using mTLS (or Username and Password required) |
CB_CA_CERT_PATH | --ca-cert-path | Path to server root certificate for TLS if server is configured with a self-signed/untrusted certificate. This will not be required if you are connecting to Capella | |
CB_MCP_READ_ONLY_QUERY_MODE | --read-only-query-mode | Prevent data modification queries | true |
CB_MCP_TRANSPORT | --transport | Transport mode: stdio, http, sse | stdio |
CB_MCP_HOST | --host | Host for HTTP/SSE transport modes | 127.0.0.1 |
CB_MCP_PORT | --port | Port for HTTP/SSE transport modes | 8000 |
Note: For authentication, you need either the Username and Password or the Client Certificate and key paths. Optionally, you can specify the CA root certificate path that will be used to validate the server certificates. If both the Client Certificate & key path and the username and password are specified, the client certificates will be used for authentication.
You can also check the version of the server using:
uvx couchbase-mcp-server --version
Client Specific Configuration
Claude Desktop
Follow the steps below to use Couchbase MCP server with Claude Desktop MCP client
-
The MCP server can now be added to Claude Desktop by editing the configuration file. More detailed instructions can be found on the MCP quickstart guide.
- On Mac, the configuration file is located at
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows, the configuration file is located at
%APPDATA%\Claude\claude_desktop_config.json
Open the configuration file and add the configuration to the
mcpServerssection. - On Mac, the configuration file is located at
-
Restart Claude Desktop to apply the changes.
-
You can now use the server in Claude Desktop to run queries on the Couchbase cluster using natural language and perform CRUD operations on documents.
Logs
The logs for Claude Desktop can be found in the following locations:
- MacOS: ~/Library/Logs/Claude
- Windows: %APPDATA%\Claude\Logs
The logs can be used to diagnose connection issues or other problems with your MCP server configuration. For more details, refer to the official documentation.
Cursor
Follow steps below to use Couchbase MCP server with Cursor:
-
Install Cursor on your machine.
-
In Cursor, go to Cursor > Cursor Settings > Tools & Integrations > MCP Tools. Also, checkout the docs on setting up MCP server configuration from Cursor.
-
Specify the same configuration. You may need to add the server configuration under a parent key of mcpServers.
-
Save the configuration.
-
You will see couchbase as an added server in MCP servers list. Refresh to see i
...(truncated)