Usage Examples

by sahil1115

214 downloads
Not rated
GitHub

About

Model Context Protocol for cassandra database

Details

Author
sahil1115
Downloads
214
Categories
Database

- Natural language interface for Cassandra database operations.
- Six built‑in tools: execute_query, create_table, insert_data, update_data, delete_data, and list_tables.
- Supports all CQL query types (SELECT, INSERT, UPDATE, DELETE) with parameterized queries to prevent injection.
- Auto‑converts JavaScript types to Cassandra data types during insertion.
- Primary key configuration for composite and clustering keys in table creation.
- Deletes single or multiple records in one operation based on conditions.

Run the server via npx: npx @sahil1115/mcp-cassandra-server. Set required environment variables (CASSANDRA_PASSWORD, CASSANDRA_CONTACT_POINTS, CASSANDRA_LOCAL_DC; optionally CASSANDRA_KEYSPACE and CASSANDRA_USERNAME defaulting to "cassandra"). Add the server to Claude Desktop configuration as a stdio tool with the same environment variables.

Usage Examples

Here are examples of how you can interact with the Cassandra database using natural language:

Querying Data

You can ask questions like: - "Show me all users from the 'users' table" - "Find the latest 10 orders from customer 'ABC123'" - "What's the average age of users in the 'customers' table?"

Creating Tables

You can give instructions like: - "Create a new 'products' table with columns for id, name, price, and category" - "Set up a users table with email as the primary key" - "Create a time series table for temperature readings with device_id and timestamp as the primary key"

Inserting Data

You can request data insertions like: - "Add a new user named Sarah Smith with email sarah@example.com and age 32" - "Insert a product with ID 12345, name 'Wireless Earbuds', price $99.99" - "Add a new temperature reading of 72.5°F for device ABC at the current time"

Updating Data

You can ask for updates like: - "Update user john@example.com to have phone number 555-123-4567" - "Change the price of product 12345 to $89.99" - "Mark all orders from customer ABC123 as 'shipped'"

Deleting Data

You can request deletions like: - "Delete user with email john@example.com" - "Remove all products in the 'discontinued' category" - "Delete temperature readings older than January 1st, 2023"

Complex Operations

You can perform more complex operations with natural language: - "Find all orders placed by customers in New York in the last month." - "Calculate the total sales by category for the current quarter." - "List the top 5 most active users based on login count."
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.