NoSQL document database
## Couchbase MCP Server: Multi-Model NoSQL Database The **Couchbase MCP Server** integrates Couchbase into Google Antigravity, enabling multi-model database operations with SQL++, full-text search, and mobile sync directly from your development environment. ### Why Couchbase MCP? - **SQL++**: SQL for JSON with powerful querying - **Full-Text Search**: Built-in search with fuzzy matching - **Mobile Sync**: Sync Gateway for mobile apps - **Memory-First**: Sub-millisecond latency - **Scalable**: Linear scaling with auto-sharding ### Key Features #### 1. SQL++ Queries ```python # Query documents result = await mcp.query(""" SELECT META().id, name, email, orders FROM users WHERE status = $status AND ARRAY_COUNT(orders) > $min_orders ORDER BY created_at DESC LIMIT 50 """, params={"status": "active", "min_orders": 5}) for row in result["rows"]: print(f"User: {row['name']} - {len(row['orders'])} orders") ``` #### 2. Document Operations ```python # Insert document await mcp.upsert( bucket="users", key="user::123", document={ "type": "user", "name": "John Doe", "email": "john@example.com", "orders": [] } ) # Get document doc = await mcp.get(bucket="users", key="user::123") # Update with sub-document await mcp.mutate_in( bucket="users", key="user::123", specs=[ {"op": "upsert", "path": "last_login", "value": "2024-01-15"}, {"op": "array_append", "path": "orders", "value": "order::456"} ] ) ``` #### 3. Full-Text Search ```python # Search documents result = await mcp.search( index="products-index", query={ "query": "laptop gaming", "fields": ["name", "description"], "fuzziness": 1 }, highlight=True, limit=20 ) for hit in result["hits"]: print(f"Product: {hit['fields']['name']} - Score: {hit['score']}") ``` #### 4. Bucket Operations ```python # List buckets buckets = await mcp.list_buckets() for bucket in buckets: print(f"Bucket: {bucket['name']} - {bucket['itemCount']} docs") # Get bucket stats stats = await mcp.get_bucket_stats(bucket="users") print(f"RAM used: {stats['ram_used']}") print(f"Disk used: {stats['disk_used']}") ``` ### Configuration ```json { "mcpServers": { "couchbase": { "command": "npx", "args": ["-y", "@anthropic/mcp-couchbase"], "env": { "COUCHBASE_URL": "couchbase://localhost", "COUCHBASE_USERNAME": "Administrator", "COUCHBASE_PASSWORD": "your-password", "COUCHBASE_BUCKET": "default" } } } } ``` ### Use Cases **User Profiles**: Store and query complex user profiles. **Product Catalog**: Full-text search across product data. **Session Store**: Low-latency session management. **Mobile Apps**: Sync data with mobile applications. The Couchbase MCP enables multi-model NoSQL operations within your development environment.
{
"mcpServers": {
"couchbase": {
"mcpServers": {
"couchbase": {
"env": {
"CB_URL": "couchbase://localhost",
"CB_PASSWORD": "password",
"CB_USERNAME": "admin"
},
"args": [
"-y",
"couchbase-mcp-server"
],
"command": "npx"
}
}
}
}
}