home / mcp / apache cassandra mcp server
This read-only MCP Server allows you to connect to Apache Cassandra data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).
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.
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.
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 installStep 2: Obtain and license the CData JDBC Driver for Apache Cassandra
# Download the driver from the CData siteLicense 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 --licenseStep 3: Configure the JDBC connection using the Connection String utility and save the resulting string for later use
java -jar cdata.jdbc.cassandra.jarCreate 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.prpThe 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.
Retrieves a list of tables available in the Cassandra data source. Output is provided in CSV with headers on the first line.
Retrieves a list of columns for a specified table. Output is provided in CSV with headers on the first line.
Executes a SQL SELECT query against Cassandra and returns the result set.