Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

MCP-Server-Couchbase

MCP.Pizza Chef: Aniket310101

MCP-Server-Couchbase is a Model Context Protocol server that allows large language models to interact directly with Couchbase databases on Capella clusters. It supports querying buckets, executing N1QL queries, and performing CRUD operations through natural language commands, streamlining database management and data retrieval for developers and applications.

Use This MCP server To

Query Couchbase buckets using natural language Execute complex N1QL queries via LLM integration Perform CRUD operations on Couchbase data programmatically Manage Couchbase Capella clusters through conversational commands Integrate Couchbase data access into AI-driven workflows Automate database querying and updates with LLMs Enable real-time data retrieval from Couchbase in chatbots Simplify database interaction for non-technical users

README

Verified on MseeP

🗄️ Couchbase MCP Server for LLMs

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.

🚀 Quick Start

  1. Prerequisites

    • Node.js 16 or higher
    • A running Couchbase instance on Capella
    • Claude Desktop application
  2. Installation

    Couchbase MCP Server can be installed in two ways:

    Option 1: Using NPX (Recommended)

    The quickest way to get started is using NPX:

    npx -y @couchbasedatabase/couchbase-mcp

    Option 2: Manual Installation

    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
  3. 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

    Option 1: With Package Installation

    {
      "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>"
          }
        }
      }
    }

    Option 2: With Manual Installation

    {
      "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>"
          }
        }
      }
    }
  4. Verify Connection

    • Restart Claude Desktop
    • The Couchbase MCP server tools should now be available in your conversations

📝 Available Tools

Basic Operations

  • query: Execute N1QL queries
  • listBuckets: List available buckets

Scope Management

  • createScope: Create a new scope in a bucket
  • deleteScope: Delete an existing scope
  • listScopes: List all scopes in a bucket

Collection Management

  • createCollection: Create a new collection in a scope
  • dropCollection: Delete a collection from a scope

Document Operations

  • createDocument: Create a new document
  • getDocument: Retrieve a document by ID
  • updateDocument: Update an existing document
  • deleteDocument: Delete a document by ID
  • bulkCreateDocuments: Create multiple documents at once

Index Management

  • createIndex: Create a new index on specified fields
  • createPrimaryIndex: Create a primary index on a collection
  • listIndexes: List all indexes in a bucket
  • dropIndex: Drop an existing index

Each tool supports optional collection and scope parameters for targeting specific data containers.

🔒 Security Considerations

  • Always use environment variables for sensitive credentials
  • Consider running the server behind a reverse proxy for production use
  • Implement appropriate access controls and authentication as needed

📚 Examples

Here are some example interactions with Claude using the MCP server:

  1. List all buckets:

    Could you show me all available buckets in the database?
    
  2. Create a scope and collection:

    Create a new scope called "users" and a collection called "profiles" in it
    
  3. Query documents:

    Find all users who signed up in the last 30 days
    
  4. Create a document:

    Create a new user document with name "John Doe" and email "john@example.com"
    

🤝 Contribution

Contributions are welcome! Please feel free to submit a Pull Request.

🛡️ Security Assessment Badge (MseeP.ai)

MseeP.ai Security Assessment Badge

MCP-Server-Couchbase FAQ

How do I install MCP-Server-Couchbase?
You can install it quickly using NPX with 'npx -y @couchbasedatabase/couchbase-mcp' or clone the GitHub repo and run it manually.
What are the prerequisites for running MCP-Server-Couchbase?
You need Node.js 16 or higher, a running Couchbase instance on Capella, and a compatible LLM host like Claude Desktop.
Can MCP-Server-Couchbase execute N1QL queries?
Yes, it supports executing N1QL queries directly through natural language commands.
Is MCP-Server-Couchbase limited to Capella clusters?
It is designed primarily for Couchbase Capella clusters but may work with other Couchbase instances with proper configuration.
How does MCP-Server-Couchbase handle security?
It relies on secure connection credentials to Couchbase and scoped access permissions to ensure safe database interactions.
Which LLMs can work with MCP-Server-Couchbase?
It is compatible with LLM hosts like Claude, OpenAI GPT models, and Anthropic's Claude, enabling flexible integration.
Can I perform CRUD operations using MCP-Server-Couchbase?
Yes, it supports create, read, update, and delete operations on Couchbase data via natural language.
How does MCP-Server-Couchbase improve developer workflows?
It simplifies database querying and management by allowing natural language interaction, reducing the need for manual query writing.