Was this page helpful?
MCP Toolbox for Databases¶
MCP Toolbox for Databases is an
open source MCP server that exposes database operations as tools consumable by
AI agents and LLMs. The ScyllaDB integration lets agents execute pre-defined CQL
statements against a ScyllaDB cluster via the scylladb-cql tool type.
Prerequisites¶
Install MCP Toolbox for Databases following the official installation guide.
Configure a ScyllaDB Source¶
A source tells MCP Toolbox how to connect to your ScyllaDB cluster. Create a
tools.yaml file and add a source block of type: scylladb.
Self-hosted ScyllaDB:
kind: source
name: my-scylladb-source
type: scylladb
hosts:
- 127.0.0.1
keyspace: my_keyspace
protoVersion: 4
username: ${USER_NAME}
password: ${PASSWORD}
ScyllaDB Cloud:
When connecting to ScyllaDB Cloud, set localDC to the datacenter name shown
on the Connect tab of your cluster in the
ScyllaDB Cloud Console. This enables
DC-aware, token-aware load balancing, which is required for ScyllaDB Cloud
connections.
kind: source
name: my-scylladb-cloud-source
type: scylladb
hosts:
- node-0.your-cluster.us-east-1.cloud.scylladb.com
- node-1.your-cluster.us-east-1.cloud.scylladb.com
- node-2.your-cluster.us-east-1.cloud.scylladb.com
keyspace: my_keyspace
username: ${USER_NAME}
password: ${PASSWORD}
localDC: AWS_US_EAST_1
Tip
Use environment variable replacement with the format ${ENV_NAME} instead
of hardcoding credentials into the configuration file.
Source Reference¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Must be |
|
string[] |
yes |
List of contact point addresses (e.g., |
|
string |
no |
Name of the keyspace to connect to. |
|
integer |
no |
CQL native protocol version (e.g., |
|
string |
no |
ScyllaDB username. |
|
string |
no |
ScyllaDB password. |
|
string |
no |
Datacenter name for DC-aware load balancing (e.g.,
|
|
string |
no |
Path to a CA certificate file. Use when connecting to a self-hosted ScyllaDB cluster with a private or custom CA. Not needed for ScyllaDB Cloud. |
|
string |
no |
Path to the client certificate file for mutual TLS (mTLS). |
|
string |
no |
Path to the client private key file for mutual TLS (mTLS). Required
together with |
|
bool |
no |
Whether to verify the server hostname against its TLS certificate.
Defaults to |
Define a scylladb-cql Tool¶
A scylladb-cql tool executes a pre-defined CQL statement against the
configured source. The statement is executed as a prepared statement;
positional placeholders use ?.
Basic parameters:
kind: tool
name: search_users_by_email
type: scylladb-cql
source: my-scylladb-source
statement: |
SELECT user_id, email, first_name, last_name, created_at
FROM users
WHERE email = ?
description: |
Use this tool to retrieve user information by email address.
Returns user ID, email, first name, last name, and creation timestamp.
Example:
{{
"email": "user@example.com",
}}
parameters:
- name: email
type: string
description: User's email address
Template parameters allow dynamic identifiers such as keyspace or table names. Because template parameters are interpolated before the statement is prepared, they are more vulnerable to CQL injection. Use basic parameters whenever possible.
kind: tool
name: list_keyspace_table
type: scylladb-cql
source: my-scylladb-source
statement: |
SELECT * FROM {{.keyspace}}.{{.tableName}};
description: |
Use this tool to list all rows from a table in a keyspace.
Example:
{{
"keyspace": "my_keyspace",
"tableName": "users",
}}
templateParameters:
- name: keyspace
type: string
description: Keyspace containing the table
- name: tableName
type: string
description: Table to select from
Tool Reference¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Must be |
|
string |
yes |
Name of the ScyllaDB source to execute the statement on. |
|
string |
yes |
Description of the tool passed to the LLM. |
|
string |
yes |
CQL statement to execute. |
|
[]string |
no |
List of authentication requirements for the source. |
|
parameters |
no |
Positional parameters inserted into the prepared CQL statement. |
|
templateParameters |
no |
Template parameters interpolated into the CQL statement before it is prepared. Use only when dynamic identifiers are required. |