Python implementation of an MCP (Model Context Protocol) server that lets LLM-powered tools run CRUD operations and SQL++ queries against a Couchbase bucket.
https://github.com/Couchbase-Ecosystem/mcp-server-couchbaseSkip the API wrapper dance. This MCP server gives Claude, Cursor, and other LLM tools direct access to your Couchbase cluster through natural language queries and CRUD operations.
You're building with LLMs, and your data lives in Couchbase. Instead of writing custom API endpoints or forcing your LLM to work through rigid interfaces, this server lets you ask questions like "Show me all user profiles with purchase activity in the last 30 days" and get actual results from your bucket.
The server handles the translation between natural language and SQL++, manages document operations, and keeps your data safe with built-in read-only query modes.
Direct Data Access: Your LLM can read documents, run SQL++ queries, and perform CRUD operations without you writing a single API endpoint.
Smart Query Translation: Ask for "users who signed up this month" and watch it generate the proper SQL++ query against your collections.
Safety Controls: Read-only mode is enabled by default - your LLM can explore and analyze but won't accidentally modify production data unless you explicitly allow it.
Collection Introspection: The server can discover your bucket structure, understand your schemas, and work with any collection layout.
Data Analysis Sessions: "Compare Q3 sales performance across regions" becomes a conversation instead of writing queries and formatting results.
Rapid Prototyping: Build AI features that need real data without mocking or creating test datasets. Point your LLM at actual user profiles, transaction logs, or inventory data.
Document Operations: "Create a user profile for Sarah with email [email protected] and department Engineering" - the LLM handles the JSON structure and upsert logic.
Schema Exploration: "What fields are available in the user collection?" gives your LLM immediate context about your data structure for better query generation.
Clone and configure:
git clone https://github.com/Couchbase-Ecosystem/mcp-server-couchbase.git
Add to your Claude Desktop config:
{
"mcpServers": {
"couchbase": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-server-couchbase/", "run", "src/mcp_server.py"],
"env": {
"CB_CONNECTION_STRING": "couchbases://your-cluster",
"CB_USERNAME": "your-username",
"CB_PASSWORD": "your-password",
"CB_BUCKET_NAME": "your-bucket"
}
}
}
}
Restart Claude, and you're connected. Works identically with Cursor and Windsurf.
The server supports both stdio and Server-Sent Events transport, runs in Docker for containerized deployments, and integrates with managed services through Smithery.ai.
For production use, the configurable read-only mode lets you give LLMs broad access to explore and analyze data while preventing accidental modifications. When you do need write access, granular permissions through Couchbase RBAC keep things secure.
Your LLM conversations become data conversations. Instead of describing what's in your database, you're working directly with the actual data, getting real insights, and building features that matter.