Couchbase LLM Integration
STDIOMCP server enabling LLMs to interact with Couchbase databases through natural language.
MCP server enabling LLMs to interact with Couchbase databases through natural language.
A Model Context Protocol (MCP) server that enables LLMs to interact directly with Couchbase databases on Capella clusters. Query buckets, perform CRUD operations, execute N1QL queries, and manage data seamlessly through natural language.
Prerequisites
Installation
Couchbase MCP Server can be installed in two ways:
The quickest way to get started is using NPX:
npx -y @couchbasedatabase/couchbase-mcp
If you prefer to clone and run the project manually:
# Clone the repository git clone https://github.com/Aniket310101/MCP-Server-Couchbase.git cd MCP-Server-Couchbase # Install dependencies npm install # Build the project npm run build
Claude Desktop Integration
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%/Claude/claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{ "mcpServers": { "couchbase": { "command": "npx", "args": ["-y", "@couchbasedatabase/couchbase-mcp"], "env": { "COUCHBASE_URL": "<COUCHBASE CONNECTION STRING>", "COUCHBASE_BUCKET": "<BUCKET NAME>", "COUCHBASE_USERNAME": "<COUCHBASE USERNAME>", "COUCHBASE_PASSWORD": "<COUCHBASE PASSWORD>" } } } }
{ "mcpServers": { "couchbase": { "command": "node", "args": ["path/to/MCP-Server-Couchbase/dist/index.js"], "env": { "COUCHBASE_URL": "<COUCHBASE CONNECTION STRING>", "COUCHBASE_BUCKET": "<BUCKET NAME>", "COUCHBASE_USERNAME": "<COUCHBASE USERNAME>", "COUCHBASE_PASSWORD": "<COUCHBASE PASSWORD>" } } } }
Verify Connection
query
: Execute N1QL querieslistBuckets
: List available bucketscreateScope
: Create a new scope in a bucketdeleteScope
: Delete an existing scopelistScopes
: List all scopes in a bucketcreateCollection
: Create a new collection in a scopedropCollection
: Delete a collection from a scopecreateDocument
: Create a new documentgetDocument
: Retrieve a document by IDupdateDocument
: Update an existing documentdeleteDocument
: Delete a document by IDbulkCreateDocuments
: Create multiple documents at oncecreateIndex
: Create a new index on specified fieldscreatePrimaryIndex
: Create a primary index on a collectionlistIndexes
: List all indexes in a bucketdropIndex
: Drop an existing indexEach tool supports optional collection
and scope
parameters for targeting specific data containers.
Here are some example interactions with Claude using the MCP server:
List all buckets:
Could you show me all available buckets in the database?
Create a scope and collection:
Create a new scope called "users" and a collection called "profiles" in it
Query documents:
Find all users who signed up in the last 30 days
Create a document:
Create a new user document with name "John Doe" and email "[email protected]"
Contributions are welcome! Please feel free to submit a Pull Request.