Sponsored by Deepsite.site

Usage Examples

Created By
sahil11158 months ago
Model Context Protocol for cassandra database
Content

Cassandra MCP Server
This Model Context Protocol (MCP) server integrates the Apache Cassandra database with Claude Desktop, enabling database operations through natural language interactions.

  1. Running the Cassandra MCP Server with NPX First, publish your package to npm (or use it locally).
npx @sahil1115/mcp-cassandra-server

Required environment variables (set these before running or in a .env file):

export CASSANDRA_PASSWORD=your_password
export CASSANDRA_CONTACT_POINTS=host1,host2
export CASSANDRA_LOCAL_DC=your_datacenter
export CASSANDRA_KEYSPACE=your_keyspace  # optional
export CASSANDRA_USERNAME=your_username  # defaults to "cassandra"


2. Adding to the Claude Desktop Configuration

Add this to your Claude Desktop config file (usually claude-desktop.config.json):

{
  "tools": [
    {
      "name": "mcp-cassandra-server",
      "command": "npx @sahil1115/mcp-cassandra-server",
      "env": {
        "CASSANDRA_PASSWORD": "your_password",
        "CASSANDRA_CONTACT_POINTS": "host1,host2",
        "CASSANDRA_LOCAL_DC": "your_datacenter",
        "CASSANDRA_KEYSPACE": "your_keyspace"
      },
      "stdio": true
    }
  ]
}

Cassandra MCP Server Features This Model Context Protocol (MCP) server provides integration between Apache Cassandra database and Claude Desktop, enabling database operations through natural language interactions.

Tools

  1. execute_query: Execute CQL queries on the Cassandra database
  • Supports all types of CQL queries (SELECT, INSERT, UPDATE, DELETE)
  • Returns query results in a structured format
  • Parameters can be passed to prevent injection attacks
  1. create_table: Create a new table in the Cassandra database
  • Define table schema with column names and data types
  • Configure primary keys (simple or composite with partition and clustering keys)
  • Automatically creates the table if it doesn't exist
  1. insert_data: Insert data into Cassandra tables
  • Add new records to existing tables
  • Supports all Cassandra data types
  • Auto-converts JavaScript types to Cassandra types
  1. update_data: Update existing data in Cassandra tables
  • Modify records based on specified conditions
  • Update multiple columns in a single operation
  • Uses parameterized queries for safety
  1. delete_data: Remove data from Cassandra tables
  • Delete records based on specified conditions
  • Delete single or multiple records in one operation
  1. list_tables: List all tables in the current keyspace
  • Get an overview of available tables
  • Quick schema discovery

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."
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors