couchbase-mcp-server 0.4.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/PKG-INFO +47 -25
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/README.md +46 -24
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/pyproject.toml +1 -1
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/PKG-INFO +47 -25
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/mcp_server.py +22 -5
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/tools/__init__.py +9 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/tools/kv.py +20 -6
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/tools/query.py +27 -6
- couchbase_mcp_server-0.5.0/src/tools/server.py +139 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/utils/__init__.py +2 -6
- couchbase_mcp_server-0.5.0/src/utils/config.py +13 -0
- couchbase_mcp_server-0.5.0/src/utils/connection.py +71 -0
- couchbase_mcp_server-0.5.0/src/utils/context.py +64 -0
- couchbase_mcp_server-0.4.0/src/tools/server.py +0 -91
- couchbase_mcp_server-0.4.0/src/utils/config.py +0 -38
- couchbase_mcp_server-0.4.0/src/utils/connection.py +0 -46
- couchbase_mcp_server-0.4.0/src/utils/context.py +0 -80
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/LICENSE +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/setup.cfg +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/SOURCES.txt +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/dependency_links.txt +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/entry_points.txt +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/requires.txt +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/top_level.txt +0 -0
- {couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/utils/constants.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: couchbase-mcp-server
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Couchbase MCP Server - The Developer Data Platform for Critical Applications in Our AI World
|
|
5
5
|
Author-email: Nithish Raghunandanan <devadvocates@couchbase.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -26,7 +26,7 @@ Dynamic: license-file
|
|
|
26
26
|
|
|
27
27
|
An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase that allows LLMs to directly interact with Couchbase clusters.
|
|
28
28
|
|
|
29
|
-
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809)
|
|
29
|
+
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809) [](https://archestra.ai/mcp-catalog/couchbase-ecosystem__mcp-server-couchbase)
|
|
30
30
|
|
|
31
31
|
<a href="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase">
|
|
32
32
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase/badge" alt="Couchbase Server MCP server" />
|
|
@@ -34,7 +34,10 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
34
34
|
|
|
35
35
|
## Features
|
|
36
36
|
|
|
37
|
+
- Get a list of all the buckets in the cluster
|
|
37
38
|
- Get a list of all the scopes and collections in the specified bucket
|
|
39
|
+
- Get a list of all the scopes in the specified bucket
|
|
40
|
+
- Get a list of all the collections in a specified scope and bucket. Note that this tool requires the cluster to have Query service.
|
|
38
41
|
- Get the structure for a collection
|
|
39
42
|
- Get a document by ID from a specified scope and collection
|
|
40
43
|
- Upsert a document by ID to a specified scope and collection
|
|
@@ -53,7 +56,7 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
53
56
|
|
|
54
57
|
## Configuration
|
|
55
58
|
|
|
56
|
-
The MCP server can be run either from the
|
|
59
|
+
The MCP server can be run either from the prebuilt PyPI package or the source using uv.
|
|
57
60
|
|
|
58
61
|
### Running from PyPI
|
|
59
62
|
|
|
@@ -61,6 +64,8 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
61
64
|
|
|
62
65
|
#### Server Configuration using Pre built Package for MCP Clients
|
|
63
66
|
|
|
67
|
+
#### Basic Authentication
|
|
68
|
+
|
|
64
69
|
```json
|
|
65
70
|
{
|
|
66
71
|
"mcpServers": {
|
|
@@ -70,8 +75,27 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
70
75
|
"env": {
|
|
71
76
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
72
77
|
"CB_USERNAME": "username",
|
|
73
|
-
"CB_PASSWORD": "password"
|
|
74
|
-
|
|
78
|
+
"CB_PASSWORD": "password"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
or
|
|
86
|
+
|
|
87
|
+
#### mTLS
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"couchbase": {
|
|
93
|
+
"command": "uvx",
|
|
94
|
+
"args": ["couchbase-mcp-server"],
|
|
95
|
+
"env": {
|
|
96
|
+
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
97
|
+
"CB_CLIENT_CERT_PATH": "/path/to/client-certificate.pem",
|
|
98
|
+
"CB_CLIENT_KEY_PATH": "/path/to/client.key"
|
|
75
99
|
}
|
|
76
100
|
}
|
|
77
101
|
}
|
|
@@ -108,8 +132,7 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
108
132
|
"env": {
|
|
109
133
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
110
134
|
"CB_USERNAME": "username",
|
|
111
|
-
"CB_PASSWORD": "password"
|
|
112
|
-
"CB_BUCKET_NAME": "bucket_name"
|
|
135
|
+
"CB_PASSWORD": "password"
|
|
113
136
|
}
|
|
114
137
|
}
|
|
115
138
|
}
|
|
@@ -123,17 +146,21 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
123
146
|
### Additional Configuration for MCP Server
|
|
124
147
|
|
|
125
148
|
The server can be configured using environment variables or command line arguments:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
149
|
+
| Environment Variable | CLI Argument | Description | Default |
|
|
150
|
+
|--------------------------------|--------------------------|---------------------------------------------------------------------------------------------|------------------------------------------|
|
|
151
|
+
| `CB_CONNECTION_STRING` | `--connection-string` | Connection string to the Couchbase cluster | **Required** |
|
|
152
|
+
| `CB_USERNAME` | `--username` | Username with access to required buckets for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
153
|
+
| `CB_PASSWORD` | `--password` | Password for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
154
|
+
| `CB_CLIENT_CERT_PATH` | `--client-cert-path` | Path to the client certificate file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
155
|
+
| `CB_CLIENT_KEY_PATH` | `--client-key-path` | Path to the client key file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
156
|
+
| `CB_CA_CERT_PATH` | `--ca-cert-path` | Path to server root certificate for TLS if server is configured with a self-signed/untrusted certificate. This will not be required if you are connecting to Capella | |
|
|
157
|
+
| `CB_MCP_READ_ONLY_QUERY_MODE` | `--read-only-query-mode` | Prevent data modification queries | `true` |
|
|
158
|
+
| `CB_MCP_TRANSPORT` | `--transport` | Transport mode: `stdio`, `http`, `sse` | `stdio` |
|
|
159
|
+
| `CB_MCP_HOST` | `--host` | Host for HTTP/SSE transport modes | `127.0.0.1` |
|
|
160
|
+
| `CB_MCP_PORT` | `--port` | Port for HTTP/SSE transport modes | `8000` |
|
|
161
|
+
|
|
162
|
+
> Note: For authentication, you need either the Username and Password or the Client Certificate and key paths. Optionally, you can specify the CA root certificate path that will be used to validate the server certificates.
|
|
163
|
+
> If both the Client Certificate & key path and the username and password are specified, the client certificates will be used for authentication.
|
|
137
164
|
|
|
138
165
|
You can also check the version of the server using:
|
|
139
166
|
|
|
@@ -232,7 +259,6 @@ uvx couchbase-mcp-server \
|
|
|
232
259
|
--connection-string='<couchbase_connection_string>' \
|
|
233
260
|
--username='<database_username>' \
|
|
234
261
|
--password='<database_password>' \
|
|
235
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
236
262
|
--read-only-query-mode=true \
|
|
237
263
|
--transport=http
|
|
238
264
|
```
|
|
@@ -266,7 +292,6 @@ uvx couchbase-mcp-server \
|
|
|
266
292
|
--connection-string='<couchbase_connection_string>' \
|
|
267
293
|
--username='<database_username>' \
|
|
268
294
|
--password='<database_password>' \
|
|
269
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
270
295
|
--read-only-query-mode=true \
|
|
271
296
|
--transport=sse
|
|
272
297
|
```
|
|
@@ -343,7 +368,6 @@ docker run --rm -i \
|
|
|
343
368
|
-e CB_CONNECTION_STRING='<couchbase_connection_string>' \
|
|
344
369
|
-e CB_USERNAME='<database_user>' \
|
|
345
370
|
-e CB_PASSWORD='<database_password>' \
|
|
346
|
-
-e CB_BUCKET_NAME='<bucket_name>' \
|
|
347
371
|
-e CB_MCP_TRANSPORT='<http|sse|stdio>' \
|
|
348
372
|
-e CB_MCP_READ_ONLY_QUERY_MODE='<true|false>' \
|
|
349
373
|
-e CB_MCP_PORT=9001 \
|
|
@@ -372,8 +396,6 @@ The Docker image can be used in `stdio` transport mode with the following config
|
|
|
372
396
|
"CB_USERNAME=<database_user>",
|
|
373
397
|
"-e",
|
|
374
398
|
"CB_PASSWORD=<database_password>",
|
|
375
|
-
"-e",
|
|
376
|
-
"CB_BUCKET_NAME=<bucket_name>",
|
|
377
399
|
"mcp/couchbase"
|
|
378
400
|
]
|
|
379
401
|
}
|
|
@@ -399,9 +421,9 @@ The Couchbase MCP server can also be used as a managed server in your agentic ap
|
|
|
399
421
|
## Troubleshooting Tips
|
|
400
422
|
|
|
401
423
|
- Ensure the path to your MCP server repository is correct in the configuration if running from source.
|
|
402
|
-
- Verify that your Couchbase connection string, database username, password
|
|
424
|
+
- Verify that your Couchbase connection string, database username, password or the path to the certificates are correct.
|
|
403
425
|
- If using Couchbase Capella, ensure that the cluster is [accessible](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) from the machine where the MCP server is running.
|
|
404
|
-
- Check that the database user has proper permissions to access
|
|
426
|
+
- Check that the database user has proper permissions to access at least one bucket.
|
|
405
427
|
- Confirm that the `uv` package manager is properly installed and accessible. You may need to provide absolute path to `uv`/`uvx` in the `command` field in the configuration.
|
|
406
428
|
- Check the logs for any errors or warnings that may indicate issues with the MCP server. The location of the logs depend on your MCP client.
|
|
407
429
|
- If you are observing issues running your MCP server from source after updating your local MCP server repository, try running `uv sync` to update the [dependencies](https://docs.astral.sh/uv/concepts/projects/sync/#syncing-the-environment).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase that allows LLMs to directly interact with Couchbase clusters.
|
|
4
4
|
|
|
5
|
-
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809)
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809) [](https://archestra.ai/mcp-catalog/couchbase-ecosystem__mcp-server-couchbase)
|
|
6
6
|
|
|
7
7
|
<a href="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase">
|
|
8
8
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase/badge" alt="Couchbase Server MCP server" />
|
|
@@ -10,7 +10,10 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
+
- Get a list of all the buckets in the cluster
|
|
13
14
|
- Get a list of all the scopes and collections in the specified bucket
|
|
15
|
+
- Get a list of all the scopes in the specified bucket
|
|
16
|
+
- Get a list of all the collections in a specified scope and bucket. Note that this tool requires the cluster to have Query service.
|
|
14
17
|
- Get the structure for a collection
|
|
15
18
|
- Get a document by ID from a specified scope and collection
|
|
16
19
|
- Upsert a document by ID to a specified scope and collection
|
|
@@ -29,7 +32,7 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
29
32
|
|
|
30
33
|
## Configuration
|
|
31
34
|
|
|
32
|
-
The MCP server can be run either from the
|
|
35
|
+
The MCP server can be run either from the prebuilt PyPI package or the source using uv.
|
|
33
36
|
|
|
34
37
|
### Running from PyPI
|
|
35
38
|
|
|
@@ -37,6 +40,8 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
37
40
|
|
|
38
41
|
#### Server Configuration using Pre built Package for MCP Clients
|
|
39
42
|
|
|
43
|
+
#### Basic Authentication
|
|
44
|
+
|
|
40
45
|
```json
|
|
41
46
|
{
|
|
42
47
|
"mcpServers": {
|
|
@@ -46,8 +51,27 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
46
51
|
"env": {
|
|
47
52
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
48
53
|
"CB_USERNAME": "username",
|
|
49
|
-
"CB_PASSWORD": "password"
|
|
50
|
-
|
|
54
|
+
"CB_PASSWORD": "password"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
or
|
|
62
|
+
|
|
63
|
+
#### mTLS
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"couchbase": {
|
|
69
|
+
"command": "uvx",
|
|
70
|
+
"args": ["couchbase-mcp-server"],
|
|
71
|
+
"env": {
|
|
72
|
+
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
73
|
+
"CB_CLIENT_CERT_PATH": "/path/to/client-certificate.pem",
|
|
74
|
+
"CB_CLIENT_KEY_PATH": "/path/to/client.key"
|
|
51
75
|
}
|
|
52
76
|
}
|
|
53
77
|
}
|
|
@@ -84,8 +108,7 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
84
108
|
"env": {
|
|
85
109
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
86
110
|
"CB_USERNAME": "username",
|
|
87
|
-
"CB_PASSWORD": "password"
|
|
88
|
-
"CB_BUCKET_NAME": "bucket_name"
|
|
111
|
+
"CB_PASSWORD": "password"
|
|
89
112
|
}
|
|
90
113
|
}
|
|
91
114
|
}
|
|
@@ -99,17 +122,21 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
99
122
|
### Additional Configuration for MCP Server
|
|
100
123
|
|
|
101
124
|
The server can be configured using environment variables or command line arguments:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
125
|
+
| Environment Variable | CLI Argument | Description | Default |
|
|
126
|
+
|--------------------------------|--------------------------|---------------------------------------------------------------------------------------------|------------------------------------------|
|
|
127
|
+
| `CB_CONNECTION_STRING` | `--connection-string` | Connection string to the Couchbase cluster | **Required** |
|
|
128
|
+
| `CB_USERNAME` | `--username` | Username with access to required buckets for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
129
|
+
| `CB_PASSWORD` | `--password` | Password for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
130
|
+
| `CB_CLIENT_CERT_PATH` | `--client-cert-path` | Path to the client certificate file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
131
|
+
| `CB_CLIENT_KEY_PATH` | `--client-key-path` | Path to the client key file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
132
|
+
| `CB_CA_CERT_PATH` | `--ca-cert-path` | Path to server root certificate for TLS if server is configured with a self-signed/untrusted certificate. This will not be required if you are connecting to Capella | |
|
|
133
|
+
| `CB_MCP_READ_ONLY_QUERY_MODE` | `--read-only-query-mode` | Prevent data modification queries | `true` |
|
|
134
|
+
| `CB_MCP_TRANSPORT` | `--transport` | Transport mode: `stdio`, `http`, `sse` | `stdio` |
|
|
135
|
+
| `CB_MCP_HOST` | `--host` | Host for HTTP/SSE transport modes | `127.0.0.1` |
|
|
136
|
+
| `CB_MCP_PORT` | `--port` | Port for HTTP/SSE transport modes | `8000` |
|
|
137
|
+
|
|
138
|
+
> Note: For authentication, you need either the Username and Password or the Client Certificate and key paths. Optionally, you can specify the CA root certificate path that will be used to validate the server certificates.
|
|
139
|
+
> If both the Client Certificate & key path and the username and password are specified, the client certificates will be used for authentication.
|
|
113
140
|
|
|
114
141
|
You can also check the version of the server using:
|
|
115
142
|
|
|
@@ -208,7 +235,6 @@ uvx couchbase-mcp-server \
|
|
|
208
235
|
--connection-string='<couchbase_connection_string>' \
|
|
209
236
|
--username='<database_username>' \
|
|
210
237
|
--password='<database_password>' \
|
|
211
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
212
238
|
--read-only-query-mode=true \
|
|
213
239
|
--transport=http
|
|
214
240
|
```
|
|
@@ -242,7 +268,6 @@ uvx couchbase-mcp-server \
|
|
|
242
268
|
--connection-string='<couchbase_connection_string>' \
|
|
243
269
|
--username='<database_username>' \
|
|
244
270
|
--password='<database_password>' \
|
|
245
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
246
271
|
--read-only-query-mode=true \
|
|
247
272
|
--transport=sse
|
|
248
273
|
```
|
|
@@ -319,7 +344,6 @@ docker run --rm -i \
|
|
|
319
344
|
-e CB_CONNECTION_STRING='<couchbase_connection_string>' \
|
|
320
345
|
-e CB_USERNAME='<database_user>' \
|
|
321
346
|
-e CB_PASSWORD='<database_password>' \
|
|
322
|
-
-e CB_BUCKET_NAME='<bucket_name>' \
|
|
323
347
|
-e CB_MCP_TRANSPORT='<http|sse|stdio>' \
|
|
324
348
|
-e CB_MCP_READ_ONLY_QUERY_MODE='<true|false>' \
|
|
325
349
|
-e CB_MCP_PORT=9001 \
|
|
@@ -348,8 +372,6 @@ The Docker image can be used in `stdio` transport mode with the following config
|
|
|
348
372
|
"CB_USERNAME=<database_user>",
|
|
349
373
|
"-e",
|
|
350
374
|
"CB_PASSWORD=<database_password>",
|
|
351
|
-
"-e",
|
|
352
|
-
"CB_BUCKET_NAME=<bucket_name>",
|
|
353
375
|
"mcp/couchbase"
|
|
354
376
|
]
|
|
355
377
|
}
|
|
@@ -375,9 +397,9 @@ The Couchbase MCP server can also be used as a managed server in your agentic ap
|
|
|
375
397
|
## Troubleshooting Tips
|
|
376
398
|
|
|
377
399
|
- Ensure the path to your MCP server repository is correct in the configuration if running from source.
|
|
378
|
-
- Verify that your Couchbase connection string, database username, password
|
|
400
|
+
- Verify that your Couchbase connection string, database username, password or the path to the certificates are correct.
|
|
379
401
|
- If using Couchbase Capella, ensure that the cluster is [accessible](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) from the machine where the MCP server is running.
|
|
380
|
-
- Check that the database user has proper permissions to access
|
|
402
|
+
- Check that the database user has proper permissions to access at least one bucket.
|
|
381
403
|
- Confirm that the `uv` package manager is properly installed and accessible. You may need to provide absolute path to `uv`/`uvx` in the `command` field in the configuration.
|
|
382
404
|
- Check the logs for any errors or warnings that may indicate issues with the MCP server. The location of the logs depend on your MCP client.
|
|
383
405
|
- If you are observing issues running your MCP server from source after updating your local MCP server repository, try running `uv sync` to update the [dependencies](https://docs.astral.sh/uv/concepts/projects/sync/#syncing-the-environment).
|
{couchbase_mcp_server-0.4.0 → couchbase_mcp_server-0.5.0}/src/couchbase_mcp_server.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: couchbase-mcp-server
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Couchbase MCP Server - The Developer Data Platform for Critical Applications in Our AI World
|
|
5
5
|
Author-email: Nithish Raghunandanan <devadvocates@couchbase.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -26,7 +26,7 @@ Dynamic: license-file
|
|
|
26
26
|
|
|
27
27
|
An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase that allows LLMs to directly interact with Couchbase clusters.
|
|
28
28
|
|
|
29
|
-
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809)
|
|
29
|
+
[](https://opensource.org/licenses/Apache-2.0) [](https://www.python.org/downloads/) [](https://pypi.org/project/couchbase-mcp-server/) [](https://mseep.ai/app/13fce476-0e74-4b1e-ab82-1df2a3204809) [](https://archestra.ai/mcp-catalog/couchbase-ecosystem__mcp-server-couchbase)
|
|
30
30
|
|
|
31
31
|
<a href="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase">
|
|
32
32
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Couchbase-Ecosystem/mcp-server-couchbase/badge" alt="Couchbase Server MCP server" />
|
|
@@ -34,7 +34,10 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
34
34
|
|
|
35
35
|
## Features
|
|
36
36
|
|
|
37
|
+
- Get a list of all the buckets in the cluster
|
|
37
38
|
- Get a list of all the scopes and collections in the specified bucket
|
|
39
|
+
- Get a list of all the scopes in the specified bucket
|
|
40
|
+
- Get a list of all the collections in a specified scope and bucket. Note that this tool requires the cluster to have Query service.
|
|
38
41
|
- Get the structure for a collection
|
|
39
42
|
- Get a document by ID from a specified scope and collection
|
|
40
43
|
- Upsert a document by ID to a specified scope and collection
|
|
@@ -53,7 +56,7 @@ An [MCP](https://modelcontextprotocol.io/) server implementation of Couchbase th
|
|
|
53
56
|
|
|
54
57
|
## Configuration
|
|
55
58
|
|
|
56
|
-
The MCP server can be run either from the
|
|
59
|
+
The MCP server can be run either from the prebuilt PyPI package or the source using uv.
|
|
57
60
|
|
|
58
61
|
### Running from PyPI
|
|
59
62
|
|
|
@@ -61,6 +64,8 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
61
64
|
|
|
62
65
|
#### Server Configuration using Pre built Package for MCP Clients
|
|
63
66
|
|
|
67
|
+
#### Basic Authentication
|
|
68
|
+
|
|
64
69
|
```json
|
|
65
70
|
{
|
|
66
71
|
"mcpServers": {
|
|
@@ -70,8 +75,27 @@ We publish a pre built [PyPI package](https://pypi.org/project/couchbase-mcp-ser
|
|
|
70
75
|
"env": {
|
|
71
76
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
72
77
|
"CB_USERNAME": "username",
|
|
73
|
-
"CB_PASSWORD": "password"
|
|
74
|
-
|
|
78
|
+
"CB_PASSWORD": "password"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
or
|
|
86
|
+
|
|
87
|
+
#### mTLS
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"couchbase": {
|
|
93
|
+
"command": "uvx",
|
|
94
|
+
"args": ["couchbase-mcp-server"],
|
|
95
|
+
"env": {
|
|
96
|
+
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
97
|
+
"CB_CLIENT_CERT_PATH": "/path/to/client-certificate.pem",
|
|
98
|
+
"CB_CLIENT_KEY_PATH": "/path/to/client.key"
|
|
75
99
|
}
|
|
76
100
|
}
|
|
77
101
|
}
|
|
@@ -108,8 +132,7 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
108
132
|
"env": {
|
|
109
133
|
"CB_CONNECTION_STRING": "couchbases://connection-string",
|
|
110
134
|
"CB_USERNAME": "username",
|
|
111
|
-
"CB_PASSWORD": "password"
|
|
112
|
-
"CB_BUCKET_NAME": "bucket_name"
|
|
135
|
+
"CB_PASSWORD": "password"
|
|
113
136
|
}
|
|
114
137
|
}
|
|
115
138
|
}
|
|
@@ -123,17 +146,21 @@ This is the common configuration for the MCP clients such as Claude Desktop, Cur
|
|
|
123
146
|
### Additional Configuration for MCP Server
|
|
124
147
|
|
|
125
148
|
The server can be configured using environment variables or command line arguments:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
149
|
+
| Environment Variable | CLI Argument | Description | Default |
|
|
150
|
+
|--------------------------------|--------------------------|---------------------------------------------------------------------------------------------|------------------------------------------|
|
|
151
|
+
| `CB_CONNECTION_STRING` | `--connection-string` | Connection string to the Couchbase cluster | **Required** |
|
|
152
|
+
| `CB_USERNAME` | `--username` | Username with access to required buckets for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
153
|
+
| `CB_PASSWORD` | `--password` | Password for basic authentication | **Required (or Client Certificate and Key needed for mTLS)** |
|
|
154
|
+
| `CB_CLIENT_CERT_PATH` | `--client-cert-path` | Path to the client certificate file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
155
|
+
| `CB_CLIENT_KEY_PATH` | `--client-key-path` | Path to the client key file for mTLS authentication| **Required if using mTLS (or Username and Password required)** |
|
|
156
|
+
| `CB_CA_CERT_PATH` | `--ca-cert-path` | Path to server root certificate for TLS if server is configured with a self-signed/untrusted certificate. This will not be required if you are connecting to Capella | |
|
|
157
|
+
| `CB_MCP_READ_ONLY_QUERY_MODE` | `--read-only-query-mode` | Prevent data modification queries | `true` |
|
|
158
|
+
| `CB_MCP_TRANSPORT` | `--transport` | Transport mode: `stdio`, `http`, `sse` | `stdio` |
|
|
159
|
+
| `CB_MCP_HOST` | `--host` | Host for HTTP/SSE transport modes | `127.0.0.1` |
|
|
160
|
+
| `CB_MCP_PORT` | `--port` | Port for HTTP/SSE transport modes | `8000` |
|
|
161
|
+
|
|
162
|
+
> Note: For authentication, you need either the Username and Password or the Client Certificate and key paths. Optionally, you can specify the CA root certificate path that will be used to validate the server certificates.
|
|
163
|
+
> If both the Client Certificate & key path and the username and password are specified, the client certificates will be used for authentication.
|
|
137
164
|
|
|
138
165
|
You can also check the version of the server using:
|
|
139
166
|
|
|
@@ -232,7 +259,6 @@ uvx couchbase-mcp-server \
|
|
|
232
259
|
--connection-string='<couchbase_connection_string>' \
|
|
233
260
|
--username='<database_username>' \
|
|
234
261
|
--password='<database_password>' \
|
|
235
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
236
262
|
--read-only-query-mode=true \
|
|
237
263
|
--transport=http
|
|
238
264
|
```
|
|
@@ -266,7 +292,6 @@ uvx couchbase-mcp-server \
|
|
|
266
292
|
--connection-string='<couchbase_connection_string>' \
|
|
267
293
|
--username='<database_username>' \
|
|
268
294
|
--password='<database_password>' \
|
|
269
|
-
--bucket-name='<couchbase_bucket_to_use>' \
|
|
270
295
|
--read-only-query-mode=true \
|
|
271
296
|
--transport=sse
|
|
272
297
|
```
|
|
@@ -343,7 +368,6 @@ docker run --rm -i \
|
|
|
343
368
|
-e CB_CONNECTION_STRING='<couchbase_connection_string>' \
|
|
344
369
|
-e CB_USERNAME='<database_user>' \
|
|
345
370
|
-e CB_PASSWORD='<database_password>' \
|
|
346
|
-
-e CB_BUCKET_NAME='<bucket_name>' \
|
|
347
371
|
-e CB_MCP_TRANSPORT='<http|sse|stdio>' \
|
|
348
372
|
-e CB_MCP_READ_ONLY_QUERY_MODE='<true|false>' \
|
|
349
373
|
-e CB_MCP_PORT=9001 \
|
|
@@ -372,8 +396,6 @@ The Docker image can be used in `stdio` transport mode with the following config
|
|
|
372
396
|
"CB_USERNAME=<database_user>",
|
|
373
397
|
"-e",
|
|
374
398
|
"CB_PASSWORD=<database_password>",
|
|
375
|
-
"-e",
|
|
376
|
-
"CB_BUCKET_NAME=<bucket_name>",
|
|
377
399
|
"mcp/couchbase"
|
|
378
400
|
]
|
|
379
401
|
}
|
|
@@ -399,9 +421,9 @@ The Couchbase MCP server can also be used as a managed server in your agentic ap
|
|
|
399
421
|
## Troubleshooting Tips
|
|
400
422
|
|
|
401
423
|
- Ensure the path to your MCP server repository is correct in the configuration if running from source.
|
|
402
|
-
- Verify that your Couchbase connection string, database username, password
|
|
424
|
+
- Verify that your Couchbase connection string, database username, password or the path to the certificates are correct.
|
|
403
425
|
- If using Couchbase Capella, ensure that the cluster is [accessible](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) from the machine where the MCP server is running.
|
|
404
|
-
- Check that the database user has proper permissions to access
|
|
426
|
+
- Check that the database user has proper permissions to access at least one bucket.
|
|
405
427
|
- Confirm that the `uv` package manager is properly installed and accessible. You may need to provide absolute path to `uv`/`uvx` in the `command` field in the configuration.
|
|
406
428
|
- Check the logs for any errors or warnings that may indicate issues with the MCP server. The location of the logs depend on your MCP client.
|
|
407
429
|
- If you are observing issues running your MCP server from source after updating your local MCP server repository, try running `uv sync` to update the [dependencies](https://docs.astral.sh/uv/concepts/projects/sync/#syncing-the-environment).
|
|
@@ -78,9 +78,22 @@ async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
|
|
|
78
78
|
help="Couchbase database password (required for operations)",
|
|
79
79
|
)
|
|
80
80
|
@click.option(
|
|
81
|
-
"--
|
|
82
|
-
envvar="
|
|
83
|
-
|
|
81
|
+
"--ca-cert-path",
|
|
82
|
+
envvar="CB_CA_CERT_PATH",
|
|
83
|
+
default=None,
|
|
84
|
+
help="Path to the server trust store (CA certificate) file. The certificate at this path is used to verify the server certificate during the authentication process.",
|
|
85
|
+
)
|
|
86
|
+
@click.option(
|
|
87
|
+
"--client-cert-path",
|
|
88
|
+
envvar="CB_CLIENT_CERT_PATH",
|
|
89
|
+
default=None,
|
|
90
|
+
help="Path to the client certificate file used for mTLS authentication.",
|
|
91
|
+
)
|
|
92
|
+
@click.option(
|
|
93
|
+
"--client-key-path",
|
|
94
|
+
envvar="CB_CLIENT_KEY_PATH",
|
|
95
|
+
default=None,
|
|
96
|
+
help="Path to the client certificate key file used for mTLS authentication.",
|
|
84
97
|
)
|
|
85
98
|
@click.option(
|
|
86
99
|
"--read-only-query-mode",
|
|
@@ -121,7 +134,9 @@ def main(
|
|
|
121
134
|
connection_string,
|
|
122
135
|
username,
|
|
123
136
|
password,
|
|
124
|
-
|
|
137
|
+
ca_cert_path,
|
|
138
|
+
client_cert_path,
|
|
139
|
+
client_key_path,
|
|
125
140
|
read_only_query_mode,
|
|
126
141
|
transport,
|
|
127
142
|
host,
|
|
@@ -133,7 +148,9 @@ def main(
|
|
|
133
148
|
"connection_string": connection_string,
|
|
134
149
|
"username": username,
|
|
135
150
|
"password": password,
|
|
136
|
-
"
|
|
151
|
+
"ca_cert_path": ca_cert_path,
|
|
152
|
+
"client_cert_path": client_cert_path,
|
|
153
|
+
"client_key_path": client_key_path,
|
|
137
154
|
"read_only_query_mode": read_only_query_mode,
|
|
138
155
|
"transport": transport,
|
|
139
156
|
"host": host,
|
|
@@ -19,16 +19,22 @@ from .query import (
|
|
|
19
19
|
|
|
20
20
|
# Server tools
|
|
21
21
|
from .server import (
|
|
22
|
+
get_buckets_in_cluster,
|
|
23
|
+
get_collections_in_scope,
|
|
22
24
|
get_scopes_and_collections_in_bucket,
|
|
25
|
+
get_scopes_in_bucket,
|
|
23
26
|
get_server_configuration_status,
|
|
24
27
|
test_cluster_connection,
|
|
25
28
|
)
|
|
26
29
|
|
|
27
30
|
# List of all tools for easy registration
|
|
28
31
|
ALL_TOOLS = [
|
|
32
|
+
get_buckets_in_cluster,
|
|
29
33
|
get_server_configuration_status,
|
|
30
34
|
test_cluster_connection,
|
|
31
35
|
get_scopes_and_collections_in_bucket,
|
|
36
|
+
get_collections_in_scope,
|
|
37
|
+
get_scopes_in_bucket,
|
|
32
38
|
get_document_by_id,
|
|
33
39
|
upsert_document_by_id,
|
|
34
40
|
delete_document_by_id,
|
|
@@ -41,6 +47,9 @@ __all__ = [
|
|
|
41
47
|
"get_server_configuration_status",
|
|
42
48
|
"test_cluster_connection",
|
|
43
49
|
"get_scopes_and_collections_in_bucket",
|
|
50
|
+
"get_collections_in_scope",
|
|
51
|
+
"get_scopes_in_bucket",
|
|
52
|
+
"get_buckets_in_cluster",
|
|
44
53
|
"get_document_by_id",
|
|
45
54
|
"upsert_document_by_id",
|
|
46
55
|
"delete_document_by_id",
|
|
@@ -9,18 +9,25 @@ from typing import Any
|
|
|
9
9
|
|
|
10
10
|
from mcp.server.fastmcp import Context
|
|
11
11
|
|
|
12
|
+
from utils.connection import connect_to_bucket
|
|
12
13
|
from utils.constants import MCP_SERVER_NAME
|
|
13
|
-
from utils.context import
|
|
14
|
+
from utils.context import get_cluster_connection
|
|
14
15
|
|
|
15
16
|
logger = logging.getLogger(f"{MCP_SERVER_NAME}.tools.kv")
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
def get_document_by_id(
|
|
19
|
-
ctx: Context,
|
|
20
|
+
ctx: Context,
|
|
21
|
+
bucket_name: str,
|
|
22
|
+
scope_name: str,
|
|
23
|
+
collection_name: str,
|
|
24
|
+
document_id: str,
|
|
20
25
|
) -> dict[str, Any]:
|
|
21
26
|
"""Get a document by its ID from the specified scope and collection.
|
|
22
27
|
If the document is not found, it will raise an exception."""
|
|
23
|
-
|
|
28
|
+
|
|
29
|
+
cluster = get_cluster_connection(ctx)
|
|
30
|
+
bucket = connect_to_bucket(cluster, bucket_name)
|
|
24
31
|
try:
|
|
25
32
|
collection = bucket.scope(scope_name).collection(collection_name)
|
|
26
33
|
result = collection.get(document_id)
|
|
@@ -32,6 +39,7 @@ def get_document_by_id(
|
|
|
32
39
|
|
|
33
40
|
def upsert_document_by_id(
|
|
34
41
|
ctx: Context,
|
|
42
|
+
bucket_name: str,
|
|
35
43
|
scope_name: str,
|
|
36
44
|
collection_name: str,
|
|
37
45
|
document_id: str,
|
|
@@ -39,7 +47,8 @@ def upsert_document_by_id(
|
|
|
39
47
|
) -> bool:
|
|
40
48
|
"""Insert or update a document by its ID.
|
|
41
49
|
Returns True on success, False on failure."""
|
|
42
|
-
|
|
50
|
+
cluster = get_cluster_connection(ctx)
|
|
51
|
+
bucket = connect_to_bucket(cluster, bucket_name)
|
|
43
52
|
try:
|
|
44
53
|
collection = bucket.scope(scope_name).collection(collection_name)
|
|
45
54
|
collection.upsert(document_id, document_content)
|
|
@@ -51,11 +60,16 @@ def upsert_document_by_id(
|
|
|
51
60
|
|
|
52
61
|
|
|
53
62
|
def delete_document_by_id(
|
|
54
|
-
ctx: Context,
|
|
63
|
+
ctx: Context,
|
|
64
|
+
bucket_name: str,
|
|
65
|
+
scope_name: str,
|
|
66
|
+
collection_name: str,
|
|
67
|
+
document_id: str,
|
|
55
68
|
) -> bool:
|
|
56
69
|
"""Delete a document by its ID.
|
|
57
70
|
Returns True on success, False on failure."""
|
|
58
|
-
|
|
71
|
+
cluster = get_cluster_connection(ctx)
|
|
72
|
+
bucket = connect_to_bucket(cluster, bucket_name)
|
|
59
73
|
try:
|
|
60
74
|
collection = bucket.scope(scope_name).collection(collection_name)
|
|
61
75
|
collection.remove(document_id)
|