- Home
- MCP servers
- Apache Cassandra
Apache Cassandra
- java
1
GitHub Stars
java
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"cdatasoftware-apache-cassandra-mcp-server-by-cdata": {
"command": "java",
"args": [
"-jar",
"/PATH/TO/CDataMCP-jar-with-dependencies.jar",
"/PATH/TO/apache-cassandra.prp"
]
}
}
}You run a local, read-only MCP server that exposes live Apache Cassandra data through a simple MCP interface. This lets large language models query Cassandra data without writing SQL, while remaining on your own machine for quick, private access.
How to use
Once the MCP server is running on your machine, you interact with it using an MCP client. The server presents three built-in tools you can use to explore and read data: list available tables, list columns for a specific table, and run a SELECT-style query. You do not need to write SQL to ask questions. Instead, you ask your AI assistant to retrieve information such as counts, joins between tables, or specific records, and the client translates your natural language request into the appropriate tool calls behind the scenes.
The server is designed for local, read-only access. It wraps the CData JDBC Driver for Apache Cassandra to present Cassandra data as relational models, so you can query data live without managing SQL syntax yourself.
Typical usage patterns include asking questions like what is the distribution of a column, how many records match a condition, or how two tables relate. You can rely on the AI client to decide which tables and columns are relevant, using the tools exposed by the MCP Server to fetch the necessary metadata and data.
How to install
Prerequisites you need on your machine
Java development tools are required to build and run the MCP server. You also need the CData JDBC Driver for Apache Cassandra installed locally to connect to Cassandra.
Step 1: Clone the project and build the MCP server
git clone https://github.com/cdatasoftware/apache-cassandra-mcp-server-by-cdata.git
cd apache-cassandra-mcp-server-by-cdata
mvn clean install
Step 2: Obtain and license the CData JDBC Driver for Apache Cassandra
# Download the driver from the CData site
License the driver by running the license command from the driver's lib folder. The exact path depends on your OS.
java -jar cdata.jdbc.cassandra.jar --license
Step 3: Configure the JDBC connection using the Connection String utility and save the resulting string for later use
java -jar cdata.jdbc.cassandra.jar
Create a properties file for the JDBC connection. This example shows the required fields you typically fill in to enable access.
env
Prefix=cassandra
ServerName=CDataCassandra
ServerVersion=1.0
DriverPath=PATH\\TO\\cdata.jdbc.cassandra.jar
DriverClass=cdata.jdbc.cassandra.CassandraDriver
JdbcUrl=jdbc:cassandra:InitiateOAuth=GETANDREFRESH;
Tables=
Step 4: Start the MCP server using the generated property file
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/apache-cassandra.prp
Additional notes
The MCP server runs on stdio, meaning it is intended to be used from clients running on the same machine. It emits a simple set of tools that your AI client can invoke to retrieve table metadata and run read-only queries.
If you plan to use the server with a client like Claude Desktop, you will register the MCP server in the client’s configuration and point it to the Java runtime and the MCP JAR along with your generated .prp file.
Available tools
apache_cassandra_get_tables
Retrieves a list of tables available in the Cassandra data source. Output is provided in CSV with headers on the first line.
apache_cassandra_get_columns
Retrieves a list of columns for a specified table. Output is provided in CSV with headers on the first line.
apache_cassandra_run_query
Executes a SQL SELECT query against Cassandra and returns the result set.