You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,17 +77,18 @@ To demonstrate basic usage of the KDB-X MCP Server, using an empty KDB-X databas
76
77
77
78
1. Open a KDB-X service listening on a port.
78
79
79
-
By default the KDB-X MCP server will connect to KDB-X service on port 5000 - [but this can be changed](#command-line-parameters) via command line flags or environment variables.
80
+
By default the KDB-X MCP server will connect to KDB-X service on port 5000 - [but this can be changed](#command-line-tool) via command line flags or environment variables.
80
81
81
82
> Note: KDB-X is currently not supported on Windows - if you are using Windows we recommend running KDB-X on WSL as outlined in the [prerequisites steps](#prerequisites)
82
83
83
84
```bash
84
85
q -p 5000
85
86
```
86
87
87
-
2. Load the sql interface.
88
+
2. Load the ai and sql interfaces.
88
89
89
90
```q
91
+
\l ai-libs/init.q
90
92
.s.init[]
91
93
```
92
94
@@ -198,56 +200,131 @@ For more info on the supported transports see official documentation
198
200
199
201
> Note: We don't support [sse](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse-deprecated) transport (server-sent events) as it has been deprecated since protocol version 2024-11-05.
200
202
201
-
## Command line Parameters
203
+
## Security Considerations
204
+
205
+
To simplify getting started, we recommend running your MCP Client, KDB-X MCP server, and your KDB-X database on the same internal network.
206
+
207
+
### Encrypting Database Connections
208
+
209
+
If you require an encrypted connection between your KDB-X MCP server and your KDB-X database, you can enable enable TLS with `--db.tls=true`
210
+
211
+
This requires setting up your KDB-X database with TLS as a prerequisite:
212
+
213
+
- You can follow the [kdb+ SSL/TLS guide](https://code.kx.com/q/kb/ssl/) to setup TLS with your KDB-X database
214
+
- If you are using self signed certificates:
215
+
- You will need to specify the location of your self signed CA cert
216
+
- Set the `KX_SSL_CA_CERT_FILE` environment variable to point to the CA cert file that your KDB-X database is using
217
+
- Alternatively, you can bypass certificate verification by setting `KX_SSL_VERIFY_SERVER=NO` for development and testing
218
+
219
+
### Encrypting MCP Client Connections
220
+
221
+
If you require an encrypted connection between your MCP Client and your KDB-X MCP server:
222
+
223
+
- The KDB-X MCP server uses streamable-http transport by default and starts a localhost server at 127.0.0.1:8000. We do not recommend exposing this externally.
224
+
- You can optionally setup an HTTPS proxy in front of your KDB-X MCP server such as [envoy](https://www.envoyproxy.io/) or [nginx](https://nginx.org/) for HTTPS termination
225
+
- When using stdio transport, this is not required as communication is through standard input/output streams on the same host
226
+
227
+
> Note: FastMCP v2 was evaluated for it's authentication features, but the KDB-X MCP Server will remain temporarily on v1 to preserve broad model compatibility until clients/models catch up, at which point we will transition.
| kdbx_run_sql_query | Execute SQL SELECT against KDB-X database |`query`: SQL SELECT query string to execute | JSON object with query results (max 1000 rows) |
409
487
| kdbx_similarity_search | Perform vector similarity search on a KDB-X table |`table_name`: Name of the table to search <br> `query`: Text query to convert to vector and search <br> `n` (optional): Number of results to return | Dictionary containing search result |
488
+
| kdbx_hybrid_search | Perform hybrid search combining vector similarity and sparse text search on a KDB-X table | table_name: Name of the table to search <br> query: Text query to convert to dense and sparse vectors for search <br> n (optional): Number of results to return | Dictionary containing search result |
410
489
411
490
## Development
412
491
@@ -448,7 +527,7 @@ KDB-X public preview has recently been extended. If you have installed KDB-X pri
448
527
449
528
Ensure that your KDB-X database is online and accessible on the specified kdb host and port.
450
529
451
-
The default KDB-X endpoint is `localhost:5000`, but you can update as needed via section [Command line Parameters](#command-line-parameters).
530
+
The default KDB-X endpoint is `localhost:5000`, but you can update as needed via section [Command line Tool](#command-line-tool).
0 commit comments