Troubleshooting
- reference
Common issues and fixes for the Couchbase MCP Server, covering connections, transport, OAuth, and logging.
Common issues that you might run into while using the Couchbase MCP Server and their solutions.
uv/uvx Issues
If you see errors related to uv or uvx, check the following:
-
uvxnot found: Ensureuvis on your system PATH. Install uv following the official instructions. If installed via a package manager, verify it’s on your PATH. -
Run
which uv(macOS/Linux) orwhere uv(Windows) to find the path. You may need to provide the absolute path touv/uvxin thecommandfield of your MCP client configuration. -
After updating source code, run
uv syncto update dependencies. This is only required when running from source after pulling new changes.
Connection Issues
If you see errors related to connecting to the Couchbase cluster, check the following:
-
Check credentials: Ensure your connection string, username, password, or certificate paths are correct.
-
Cluster accessibility: Ensure the cluster is accessible from the machine running the MCP server. If using Couchbase Capella, ensure the machine’s IP is allowed in the cluster settings — required only when connecting over the public Internet, not on a VPC or a private network to Capella.
-
Bucket permissions: Check that the database user has proper permissions to access at least one bucket.
-
Connection string format: Use
couchbases://for Capella and TLS-enabled clusters,couchbase://for unencrypted local connections. -
Use
couchbase://for unencrypted connections -
Certificates for TLS: If you’re connecting with TLS enabled on non-Capella clusters, ensure that the certificate is configured correctly via
CB_CA_CERT_PATH.
Transport Mode Issues
If the MCP client is unable to communicate with the server, check the following based on your configured transport mode:
-
stdio: Ensure the MCP client is configured to launch the server as a subprocess. Check the client’s server configuration for the correct command and arguments to start the server.
-
HTTP: Check that the configured port is not in use. Verify that the URL ends with
/mcp. Also check if the client configuration is set correctly. -
Port conflicts: If the default port 8000 is in use, set a different port with
CB_MCP_PORTor--port. -
Host binding: By default, the server binds to
127.0.0.1(localhost only). To allow external connections, setCB_MCP_HOST=0.0.0.0or--host.
Read-Only Mode Issues
If you’re trying to perform write operations but they’re not working as expected, check the following:
-
Check whether
CB_MCP_READ_ONLY_MODE=true(the default). -
When
CB_MCP_READ_ONLY_MODE=true, KV write tools are not loaded and SQL++ write queries are blocked. SetCB_MCP_READ_ONLY_MODE=falseto allow write operations. -
See Read-Only Mode for the full behavior reference.
Tool Disabling Issues
If a tool you expect to be disabled is still executing, check the following:
-
Verify tool names are spelled exactly as listed in the Tools reference.
-
If using a file path for
CB_MCP_DISABLED_TOOLS, ensure the file exists and is readable by the server process. If using Docker, ensure the file is included in the container and the path is correct. -
Remember that disabling tools alone does not prevent operations - RBAC is the authoritative security control. See Security.
Elicitation/Tools Requiring Confirmation
If the tool you expect to require confirmation is executing without it, check the following:
-
Ensure that the MCP client supports Elicitation. If the client does not support it, the tools will be executed without requiring confirmation.
-
Verify tool names are spelled exactly as listed in the Tools reference.
-
If using a file path for
CB_MCP_CONFIRMATION_REQUIRED_TOOLS, ensure the file exists and is readable by the server process. If using Docker, ensure the file is included in the container and the path is correct.
Environment Variable Issues
If you’re setting environment variables but they do not seem to be taking effect, check the following:
-
Variables not taking effect: Ensure variables are set in the
envblock of your MCP client configuration, not as system environment variables (unless your client supports that). -
CLI vs environment variable conflicts: Command line arguments take priority over environment variables. If a setting is not behaving as expected, check if it’s being overridden by a CLI argument.
-
See Environment Variables for the full reference.
OAuth Issues
OAuth applies only to the Streamable HTTP transport — it’s ignored on stdio. For the full configuration reference, see OAuth.
Quick first-pass diagnosis
Before digging in, confirm these five things — a surprising number of OAuth issues are resolved here:
| # | Check | Expected | |
|---|---|---|---|
1 |
What transport is the server on? |
Streamable HTTP ( |
|
2 |
What does the startup log say about OAuth? |
One of |
|
3 |
Does the PRM endpoint respond? |
|
|
4 |
Does an unauthenticated tool call return 401? |
A |
|
5 |
Decode a sample token and confirm |
Values match what the server expects |
Server startup
| Symptom | Meaning | Fix | |
|---|---|---|---|
|
You set some but not all of the required JWT settings. |
OAuth is all-or-nothing: set all of |
|
|
You enabled PRM ( |
With PRM, the issuer is published as the authorization-server URL and must be a valid |
|
Log: |
The server is running with no OAuth — all requests are accepted unauthenticated. |
You passed none of the OAuth settings (a dropped shell line-continuation |
|
Log: |
OAuth flags were detected but the server started on |
Add |
|
Log: |
You asked for PRM but configured no token verifier. |
Set the JWT settings. PRM is meaningless without a verifier — it advertises an authorization server but validates nothing. |
|
|
PRM is not mounted. |
PRM is published only when |
401 Unauthorized — token validation
Returned by the auth middleware before any tool runs; the log shows Auth error returned: invalid_token (status=401). Decode the token and compare it against your server config.
| Symptom | Meaning | Fix | |
|---|---|---|---|
|
Token’s |
Decode a sample token, copy the |
|
|
Token’s |
Decode a token, copy |
|
|
The |
Mint a fresh token. If you suspect clock skew, run NTP on the server host — the server applies no leeway by default. |
403 Forbidden — scope enforcement
Returned after JWT validation succeeds; the message names the required and missing scopes.
| Symptom | Meaning | Fix | |
|---|---|---|---|
|
The token does not carry the required scope. |
Decode the token and check both the |
|
SQL++ tool rejected for a write-only token |
By design, |
If the agent must run SQL++, mint a token carrying both |
|
SQL++ INSERT/UPDATE rejected even with both scopes |
Read-only mode is on, or the token lacks |
Set |
Couchbase-layer errors (after OAuth succeeds)
These appear after the JWT validated and the scope check passed — they come from the Couchbase SDK or RBAC, not the OAuth layer.
| Symptom | Meaning | Fix | |
|---|---|---|---|
|
|
Verify the cluster credentials directly — |
|
|
The server started without cluster credentials. |
Set |
|
Reads succeed but writes fail |
The Couchbase user lacks RBAC write permission on the target keyspace. |
RBAC is the ultimate authority — even a valid |
Logging Issues
The MCP server’s own logging is configured at startup through environment variables or CLI flags — see Logging for the full configuration reference.
Every start emits one INFO boot summary line reporting the resolved configuration: the level in effect, which sinks are live, and the exact file paths being written.
For example:
2026-06-29T18:08:49+0530 - couchbase - INFO - Logging configured: level=INFO, sinks=stderr,file, log_files={'INFO': 'mcp_server.info.log', 'WARNING': 'mcp_server.warning.log', 'ERROR': 'mcp_server.error.log'}, max_bytes=1048576
When logging behaves unexpectedly, read this line first — then work through the table below.
| Symptom | Likely cause | Fix | |
|---|---|---|---|
No log files anywhere |
The |
Set |
|
Files exist but one stays empty |
Each level’s file is filtered to exactly its level, so an idle server may legitimately have an empty |
This is expected. The |
|
A per-level file I expected is missing (for example, no |
That level is below the configured threshold — a file is created only for levels at or above |
Lower the level to include it: |
|
Server logged "File logging is disabled…" warning |
The |
Expected when running |
|
I set a log level and nothing changed |
An invalid level value silently fell back to |
Check the boot output for |
|
A sink I configured is being ignored |
An unrecognized |
Look for |
|
I set a rotation size to |
|
The server logs a warning and falls back to the 1 MB default; rotation cannot be disabled this way. To control disk usage, adjust |
|
Startup warning: |
You’re using the deprecated byte-based size variable. |
Switch to |
|
|
|
Set |
|
An |
Stack traces are emitted at |
Re-run at |
|
No logs at all from the server |
Either |
Confirm the boot line appears; for stdio clients, see Checking Logs below for client log locations. |
|
|
The |
This file captures resolved environment/system info. It’s written only when the |
Checking Logs
To configure the MCP server’s own logs — log level, console/file output, and file logging for support — see Logging.
The MCP client also keeps its own logs. Check the MCP client logs for errors or warnings:
| Client | Log Location | |
|---|---|---|
Claude Desktop |
|
|
Cursor |
Bottom panel > Output > "Cursor MCP" |
|
Windsurf |
Check Windsurf output panel |
|
VS Code |
Command Palette > "MCP: List Servers" > Show Output |
|
JetBrains |
|
|
Factory |
|