Couchbase-Analytics-MCP
Provides tools for interacting with Couchbase Enterprise Analytics service, enabling AI agents to execute SQL++ queries, manage dataverses, datasets, links, indexes, and monitor cluster health via the Analytics API.
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-Analytics-MCPList all datasets with their schemas"
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-Analytics-MCP
A production-grade Model Context Protocol (MCP) server for the Couchbase Enterprise Analytics service. Exposes the full Analytics API surface as 25 strongly-typed MCP tools, with a built-in GUI console, structured logging, Prometheus metrics, OpenTelemetry tracing, and comprehensive test coverage.
Important: This server targets the Analytics service (Apache AsterixDB engine, SQL++, port 8095) — not the Couchbase Query (N1QL) service. All tools call
cluster.analyticsQuery()and/analytics/*REST endpoints exclusively.
Feature matrix
Feature | Status |
25 MCP tools covering full Analytics API | ✅ |
stdio transport (Claude Desktop) | ✅ |
SSE/HTTP transport (remote agents) | ✅ |
Connection pool (min/max/idle reaper) | ✅ |
JWT + API key auth on SSE endpoint | ✅ |
Structured JSON logging (Pino) | ✅ |
Daily log rotation (pino-roll) | ✅ |
Optional Loki push transport | ✅ |
Prometheus | ✅ |
OpenTelemetry traces → Jaeger | ✅ |
| ✅ |
React GUI console at | ✅ |
Monaco SQL++ editor | ✅ |
Schema browser (dataverse → dataset tree) | ✅ |
Live tool call inspector | ✅ |
Unit tests (≥90% coverage) | ✅ |
Integration tests (real Couchbase) | ✅ |
E2E tests (Supertest SSE transport) | ✅ |
Docker multi-stage image | ✅ |
Docker Compose (CB + Prometheus + Grafana + Jaeger) | ✅ |
Helm chart | ✅ |
GitHub Actions CI/CD | ✅ |
Architecture docs + ADRs | ✅ |
Operational runbooks | ✅ |
Quick start
Prerequisites
Node.js ≥ 20
Docker + Docker Compose
Couchbase Server Enterprise ≥ 7.2 with Analytics service enabled
Local development (Docker Compose)
git clone https://github.com/your-org/couchbase-analytics-mcp
cd couchbase-analytics-mcp
# Copy and edit environment
cp .env.example .env
# Start Couchbase + MCP server + Prometheus + Grafana + Jaeger
docker-compose up -d
# GUI console: http://localhost:3000/console
# Prometheus: http://localhost:9091
# Grafana: http://localhost:3001 (admin/admin)
# Jaeger: http://localhost:16686Run against an existing Couchbase cluster
npm install
CB_CONNECTION_STRING=couchbase://my-cluster \
CB_USERNAME=Administrator \
CB_PASSWORD=password \
TRANSPORT=stdio \
node packages/mcp-server/dist/index.jsClaude Desktop integration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"couchbase-analytics": {
"command": "node",
"args": ["/path/to/couchbase-analytics-mcp/packages/mcp-server/dist/index.js"],
"env": {
"CB_CONNECTION_STRING": "couchbase://your-cluster",
"CB_USERNAME": "Administrator",
"CB_PASSWORD": "your-password",
"TRANSPORT": "stdio"
}
}
}
}Environment variables
Variable | Default | Description |
| (required) |
|
| (required) | Couchbase RBAC username |
| (required) | Couchbase RBAC password |
|
| Analytics REST port (18095 for TLS) |
|
| Enable TLS for REST calls |
|
|
|
|
| HTTP server port (SSE + health + GUI) |
|
| Minimum pool connections |
|
| Maximum pool connections |
|
| Idle connection reap threshold |
|
| Default query timeout |
|
|
|
|
|
|
|
| Enable file transport |
|
| Log file path |
| (optional) | Loki push endpoint |
|
| Expose |
|
| Enable OpenTelemetry tracing |
|
| Jaeger HTTP collector |
| (optional) | JWT signing secret for SSE auth |
| (optional) | Static API key for SSE auth |
|
| Serve GUI at |
Tool reference
See docs/api/TOOLS.md for full input/output schemas.
Tool | Group | Description |
| Query | Execute SQL++ statement |
| Query | Return query execution plan |
| Query | Cancel running query |
| Query | Check async query status |
| Query | KV→Analytics replication lag |
| Schema | List all dataverses |
| Schema | List datasets |
| Schema | Field-level dataset description |
| Schema | INFER DATASET → JSON Schema |
| Schema | List Analytics secondary indexes |
| Dataverse | CREATE DATAVERSE |
| Dataverse | DROP DATAVERSE |
| Dataverse | CREATE DATASET (shadow collection) |
| Dataverse | DROP DATASET |
| Dataverse | Modify dataset WHERE predicate |
| Links | List data source links |
| Links | Create CB/S3/Azure/GCS link |
| Links | Update link configuration |
| Links | Delete a link |
| Links | Start ingestion (CONNECT LINK) |
| Links | Pause ingestion (DISCONNECT LINK) |
| Indexes | CREATE Analytics secondary index |
| Indexes | DROP Analytics secondary index |
| Indexes | Collect optimizer statistics |
| Cluster | Per-node resource stats |
| Cluster | Composite health summary |
| Cluster | Analytics service configuration |
| Cluster | Mutate config param (guarded) |
| Cluster | Restart Analytics node(s) (guarded) |
Development
# Install all workspace dependencies
npm install
# Build all packages
npm run build
# Run unit tests with coverage
npm run test:coverage
# Run integration tests (requires Couchbase)
docker-compose up -d couchbase
npm run test:integration -w packages/mcp-server
# Start dev server (hot reload)
npm run dev
# Generate API docs
npm run docsSupport Policy
I truly appreciate your interest in this project! This project is community-maintained. However, I actively monitor and maintain this repo and will try to resolve issues on a best-effort basis.
All inquiries should be through GitHub.
Bug reports: Open a GitHub issue
Feature requests: Open a GitHub issue with the "enhancement" label
Questions: Open a GitHub issueYour collaboration helps me move forward together - thank you! Pull requests and contributions from the community are welcome and encouraged.
Architecture
See docs/architecture/ARCHITECTURE.md for the full component diagram, data flow description, and design decisions.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/celticht32/MCP-Couchbase-Analytics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server