Couchbase Data Access Mediator for Cognitive Agents
A specialized Model Context Protocol (MCP) component designed to bridge Large Language Models (LLMs) with Couchbase deployments hosted on the Capella platform. It facilitates comprehensive data interaction, supporting CRUD operations, execution of N1QL queries, and general data lifecycle management via natural language directives.
Author

Aniket310101
Quick Info
Actions
Tags
💾 Cognitive Access Layer for Couchbase on Capella
This Model Context Protocol (MCP) server implementation grants Generative AI models direct, programmatic ingress to Couchbase data services residing within Capella environments. Users can issue commands in plain language to query data buckets, perform essential Create/Read/Update/Delete (CRUD) actions, run advanced N1QL statements, and manage schema elements.
🚀 Initial Setup Guide
-
Prerequisites Check
-
Node.js environment (version 16 or newer required)
- An active, accessible Couchbase database endpoint on Capella
-
The Claude Desktop application installed
-
Installation Procedure
The mediator can be deployed using two distinct methods:
### Method A: Utilizing NPX (Recommended for Expediency)
Execute the following command for immediate deployment:
bash npx -y @couchbasedatabase/couchbase-mcp
### Method B: Source Code Cloning and Local Build
For those preferring a local, source-controlled installation:
bash # Obtain the repository sources git clone https://github.com/Aniket310101/MCP-Server-Couchbase.git cd MCP-Server-Couchbase
# Install necessary dependencies npm install
# Compile the project assets npm run build
- Integration with Claude Desktop
Modify the configuration file for the Claude Desktop client as follows:
Windows Path: %APPDATA%/Claude/claude_desktop_config.json
MacOS Path: ~/Library/Application Support/Claude/claude_desktop_config.json
### Configuration Option 1: Post-Package Installation
{
"mcpServers": {
"couchbase": {
"command": "npx",
"args": ["-y", "@couchbasedatabase/couchbase-mcp"],
"env": {
"COUCHBASE_URL": "
### Configuration Option 2: Post-Manual Build
{
"mcpServers": {
"couchbase": {
"command": "node",
"args": ["path/to/MCP-Server-Couchbase/dist/index.js"],
"env": {
"COUCHBASE_URL": "
-
Connectivity Verification
-
Initiate a restart of the Claude Desktop client.
- Confirm that the Couchbase data mediator services are exposed and accessible within active conversational contexts.
🛠️ Exposed Functional Interfaces
Fundamental Operations
query: Execute structured N1QL database queries.listBuckets: Retrieve a registry of all accessible data buckets.
Namespace (Scope) Administration
createScope: Instantiate a new logical scope within a specified bucket.deleteScope: Terminate an extant scope.listScopes: Enumerate all defined scopes associated with a bucket.
Container (Collection) Administration
createCollection: Provision a new data collection inside a designated scope.dropCollection: Remove a specified collection entity.
Data Record Management
createDocument: Persist a new data record.getDocument: Fetch a record based on its unique identifier.updateDocument: Modify the contents of an existing record.deleteDocument: Erase a record using its ID.bulkCreateDocuments: Ingest a batch of records concurrently.
Index Structure Maintenance
createIndex: Establish a new secondary index on defined attribute fields.createPrimaryIndex: Establish the required primary index for a collection.listIndexes: Display all indexing structures present in a bucket.dropIndex: Decommission an existing index.
Note: Every function permits optional inclusion of scope and collection arguments to precisely target the data context.
