Architecture
- concept
Component breakdown and request flow for the Couchbase MCP Server’s Operational Insights topology.
The Couchbase MCP Server for Operational Insights is a self-hosted bridge between AI agents and a Couchbase Operational Insights endpoint.
It follows a three-tier topology — MCP Client → MCP Server → Operational Insights Cluster.
The server exposes Operational Insights capabilities as MCP tools, enforces authentication and safety controls, and talks to the cluster through the couchbase-operational-insights Python SDK.
Clients connect over one of two transports: stdio (local subprocess) or Streamable HTTP (networked, multi-client).
| The Operational Insights MCP server supports only self-managed deployments. Capella-hosted Operational Insights is not supported. |
This page covers the Operational Insights (operational-insights) server.
For the components that both servers share, see Architecture.
How It Works — A Quick Example
The following example illustrates a typical request.
An analyst asks: "Which databases do we have, and how many orders came in last month in the sales database?"
-
On receiving the prompt, the agent first discovers what’s available by calling
operational_insights_get_databases_in_cluster, thenoperational_insights_get_scopes_in_databaseandoperational_insights_get_collections_in_scopefor thesalesdatabase. -
It calls
operational_insights_get_schema_for_collectionto infer the real structure of the orders collection, rather than guessing field names. -
With the real schema known, it generates a SQL++ analytics query grounded in that schema.
-
It submits the query with
operational_insights_run_query_sync(or, for a long-running query,operational_insights_run_query_asyncfollowed byoperational_insights_get_async_query_results), and the server returns the results over the MCP protocol.
Finally, the agent’s LLM shapes the result into a natural-language answer for the analyst. Notably, the model never touches the Operational Insights cluster directly — every data access goes through the MCP server.
Components & Responsibilities
| Component | Responsibility | Learn more |
|---|---|---|
MCP Client |
The AI agent or IDE (VS Code, Claude Desktop, Cursor, …) that discovers and invokes tools. |
|
Transport |
How the client reaches the server: |
|
MCP Server |
The server process (distributed via PyPI and Docker, built on the FastMCP SDK), running the |
|
Tool layer |
The tools the server exposes — database, scope, and collection discovery, schema inference, and query execution/management — split into read and write tools. |
|
Safety controls |
Server-side gating of which tools load and run: read-only mode, disabled tools, and confirmation/elicitation. |
|
OAuth resource server |
On Streamable HTTP, verifies client JWTs (signature via JWKS, plus |
|
couchbase-operational-insights SDK |
The client library the server uses to perform SQL++ query operations against the Operational Insights cluster. |
— |
Operational Insights Cluster |
A self-managed Couchbase Operational Insights deployment. RBAC on the server’s credentials is the authoritative data-access control. |
|
Identity Provider / Authorization Server |
External service that authenticates users/agents and issues signed JWTs (exposes JWKS and issuer). |
|
Reverse proxy / TLS |
For networked deployments, terminates TLS in front of the server so the connection encrypts traffic and tokens in transit. |
|
Logging / observability |
Structured logs with configurable level and sinks (stderr / file). |
Network Path
The MCP server connects to the Operational Insights cluster over HTTP(S) via the couchbase-operational-insights SDK, typically port 8095 (HTTP) or 18095 (HTTPS).
Authentication Planes
The server has two independent authentication planes:
-
Client → Server: secured with OAuth (Streamable HTTP only). Decides which client may connect and which tools it may call.
-
Server → Operational Insights Cluster: uses your Operational Insights cluster credentials (Basic Auth or mTLS, set via
CB_OPERATIONAL_INSIGHTS_*environment variables). Decides what data the server can actually touch.