Couchbase MCP Server
Provides tools for interacting with Couchbase, enabling AI agents to perform cluster management, KV operations, N1QL queries, index management, query analysis, and schema inference.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Couchbase MCP ServerList all buckets in the cluster"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Couchbase MCP Server
Model Context Protocol (MCP) server that connects AI assistants and agents to Couchbase — locally or over SSH tunnels to remote clusters.
Features
Safety
Read-only mode (default): Blocks write operations during exploration
Write confirmation: Destructive tools require explicit approval
Tool disabling: Turn off specific tools via
CB_DISABLED_TOOLS
Performance
HTTP wrapper: Management and query APIs with SDK fallback
Large result handling: Truncation and export for oversized documents and query results
WAN development profile: Tuned for tunneled / remote clusters
Tools (24)
Category | Tools |
Cluster | connection test, config status, buckets, scopes, collections, health |
KV | get, lookup-in, upsert, insert, replace, delete |
Query | N1QL, cluster queries, schema inference, slow/frequent/large query analysis |
Index | list indexes, advisor recommendations |
Related MCP server: CockroachDB MCP Server
Prerequisites
Python 3.10+
Couchbase Server 7.0+ (local or remote)
jq for environment switching
SSH key for tunneled environments
An MCP client (e.g. Claude Code, Cursor)
Quick start
git clone https://github.com/nethanchowdary/couchbase-mcp-server.git
cd couchbase-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your Couchbase connection detailsRegister with Claude Code
claude mcp add couchbase -s user \
-e "COUCHBASE_SERVER_DIR=$(pwd)" \
-- python -m couchbase_mcp_server.serverRestart the MCP server after config changes:
claude mcp restart couchbaseRegister with Cursor
Add to your MCP config (Settings → MCP):
{
"mcpServers": {
"couchbase": {
"command": "/path/to/couchbase-mcp-server/.venv/bin/python",
"args": ["-m", "couchbase_mcp_server.server"],
"env": {
"COUCHBASE_SERVER_DIR": "/path/to/couchbase-mcp-server"
}
}
}
}Environment switching
Use ./switch.sh to move between local Couchbase, SSH-tunneled clusters, and direct remote hosts without hand-editing .env.
./switch.sh list # Show environments from environments.json
./switch.sh local # Local Couchbase
./switch.sh remote-tunnel # Remote via SSH tunnel (example config)
./switch.sh status # Current env + tunnel stateOn first switch to an environment you will be prompted for:
Couchbase username and password (cached in
~/.couchbase-mcp/credentials.json, mode600)SSH username (tunnel environments only)
Then choose read-only mode and optional tool disables. Restart MCP after switching:
claude mcp restart couchbaseConfigure environments
environments.json — committed example configs (local, remote-tunnel, remote-multinode, remote-direct). Edit hostnames and tunnel targets for your setup.
environments.local.json — optional, gitignored. Copy from environments.local.json.example for private clusters you do not want in git. Entries are merged on top of environments.json.
cp environments.local.json.example environments.local.json
# Edit with your real bastion hosts and node addressesCredential management
./switch.sh credentials list
./switch.sh credentials clear remote-tunnel
./switch.sh credentials clear-allConfiguration reference
Variable | Required | Description |
| Yes | e.g. |
| Yes | Couchbase user |
| Yes | Couchbase password |
| No | Default |
| No | Comma-separated tool names |
| No | Connection timeout |
| No | TLS CA cert |
| No | mTLS client cert |
| No | mTLS client key |
| No | Default |
| No | Project root for |
See .env.example for the full list.
SSH tunnels
tunnel-manager.sh handles single-node and multi-node tunnels. Multi-node setups may require localhost aliases on macOS:
sudo ifconfig lo0 alias 127.0.0.2 upTest tunnel connectivity:
./switch.sh remote-tunnel --test
curl -u user:pass http://127.0.0.1:8091/pools/defaultDevelopment
source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check src testsOr use the wrapper:
./run_mcp_server.shSecurity notes for public repos
Never commit
.env,environments.local.json, or credential filesRotate any Couchbase or SSH credentials that were ever committed or shared
VITE_*-style exposure does not apply here (server-side env), but.envis still regenerated byswitch.shwith passwords — keep it gitignoredUse read-only Couchbase users when exploring production-like data
Project layout
src/couchbase_mcp_server/ # MCP server and tools
lib/credentials.sh # Credential cache helpers
switch.sh # Environment switcher
tunnel-manager.sh # SSH tunnel lifecycle
environments.json # Example environment definitions
tests/License
MIT (add a LICENSE file if you publish publicly).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables large language models to interact directly with Couchbase databases through natural language, supporting operations like querying buckets, performing CRUD operations, and executing N1QL queries.Last updated87MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query and interact with CockroachDB clusters through natural language, supporting schema discovery, CRUD operations, transactions, cluster monitoring, and data export with configurable safety controls.Last updated30Apache 2.0

CrateDB MCP Serverofficial
Alicense-qualityAmaintenanceConnects AI assistants to CrateDB clusters to enable natural-language Text-to-SQL, data analysis, and documentation retrieval. It allows users to manage database operations, troubleshoot cluster issues, and query information through conversational prompts.Last updated7Apache 2.0- Alicense-qualityDmaintenanceEnables AI assistants to interact with and manage multiple database types (PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, Redis) through natural language, supporting query analysis, schema management, data analysis, backup/restore, and security analysis.Last updated642MIT
Related MCP Connectors
Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nethanchowdary/couchbase-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server