home / mcp / couchbase mcp server

Couchbase MCP Server

This read-only MCP Server allows you to connect to Couchbase data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-couchbase-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/couchbase.prp"
      ]
    }
  }
}

You can run a local, read-only MCP server for Couchbase that surfaces live data through the MCP interface. This lets you ask natural language questions and have the answers pulled from Couchbase without writing SQL, using the CData JDBC Driver under the hood.

How to use

After you start the MCP server, you can interact with it from an MCP client. The server exposes tooling to list available data sources, inspect table structures, run read-only queries, and retrieve results in a structured format. You do not need to write SQL to get live data from Couchbase; simply ask your client questions like “What is the open opportunities count by industry?” or “Show me the tickets in the SUPPORT project.” The tools are available behind standard tool names and run through the local MCP process on your machine.

How to install

# Prerequisites
- Java Runtime Environment (JRE) or JDK 8+ installed
- Maven installed to build the server
- Couchbase data source and CData JDBC Driver for Couchbase installed

# 1. Clone the repository
git clone https://github.com/cdatasoftware/couchbase-mcp-server-by-cdata.git
cd couchbase-mcp-server-by-cdata

# 2. Build the server
mvn clean install

# 3. Download and install the CData JDBC Driver for Couchbase
# Go to the CData website and follow the installation steps for your OS

# 4. License the CData JDBC Driver
# In the installation directory, locate the lib folder and run:
java -jar cdata.jdbc.couchbase.jar --license
# Enter your name, email, and TRIAL (or your license key)

# 5. Configure your connection to the data source (example path shown)
# Run the connection string utility to generate a JDBC URL:
java -jar cdata.jdbc.couchbase.jar
# Configure the connection string and Test Connection. Copy the connection string when complete

# 6. Create a .prp file for your JDBC connection
# Example content for couchbase.prp:
Prefix=couchbase
ServerName=CDataCouchbase
ServerVersion=1.0
DriverPath=PATH\TO\cdata.jdbc.couchbase.jar
DriverClass=cdata.jdbc.couchbase.CouchbaseDriver
JdbcUrl=jdbc:couchbase:InitiateOAuth=GETANDREFRESH;
Tables=

# 7. Start the MCP server
# Ensure you have the .prp file ready and point to it in the start command

Additional setup notes

The MCP server is started using a Java command that runs the MCP JAR with the path to your .prp configuration file. For Couchbase, use the provided .prp file to wire the JDBC driver to your Couchbase instance.

Running the server

java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/couchbase.prp
```
> Note: The server runs in stdio mode, so it communicates with clients on the same machine.

Troubleshooting and tips

If you cannot see or connect to the MCP server, ensure the Java process is running and that the .prp file points to a valid JDBC URL and driver JAR path. If you encounter authentication or OAuth prompts during connection setup, complete those prompts in the driver’s connection utility and re-test. If issues persist, verify that the Couchbase data source is reachable from the host running the MCP server.

Available tools

couchbase_get_tables

Retrieves a list of tables available in the data source. The output is CSV with the first line containing column headers.

couchbase_get_columns

Retrieves a list of columns for a specific table. The output is CSV with the first line containing column headers.

couchbase_run_query

Executes a SQL SELECT query against the data source and returns the results.