datastax-opscenter-mcp-server
Provides monitoring and management capabilities for Apache Cassandra clusters through the DataStax OpsCenter API, including metrics, schema, and event tracking.
Provides integration with DataStax OpsCenter for monitoring and managing Apache Cassandra clusters, including cluster management, metrics collection, node monitoring, schema information, and event tracking.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datastax-opscenter-mcp-serverShow me the cluster health summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DataStax OpsCenter MCP Server
A Model Context Protocol (MCP) server that provides access to DataStax OpsCenter API for monitoring and managing Apache Cassandra and DataStax Enterprise clusters.
π Features
This MCP server provides tools to:
Cluster Management: Get cluster configurations and detailed information
Metrics Collection: Retrieve performance metrics at cluster, node, and table levels
Node Monitoring: Query individual node information and metrics
Schema Information: Access keyspace and table schemas
Event Tracking: Monitor cluster events and alerts
Comprehensive Metrics: Support for 100+ metrics including:
Cluster metrics (read/write ops, latency, memory usage)
Thread pool metrics (pending/active tasks)
Table metrics (disk usage, SSTable counts, latency)
OS metrics (CPU, memory, disk, network)
Related MCP server: opencode-cli-mcp
π Prerequisites
Node.js: Version 18.x, 20.x, or 22.x
DataStax OpsCenter: Version 6.8.x or compatible
Access: Network connectivity to your OpsCenter instance
οΏ½ Documentation
Cassandra Troubleshooting Guide - Comprehensive guide for production troubleshooting with 9-phase workflow, critical thresholds, and emergency procedures
Metrics Coverage Analysis - Complete coverage report of all 340+ OpsCenter metrics
Metrics Quick Reference - Fast lookup guide for metric names to MCP tools
GitHub Copilot Instructions - Development guidelines and project architecture
οΏ½π§ Installation
1. Clone the Repository
git clone https://github.com/yourusername/datastax-opscenter-mcp.git
cd datastax-opscenter-mcp2. Install Dependencies
npm install3. Build the Project
npm run buildThis compiles TypeScript to JavaScript in the build/ directory.
βοΈ Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes |
| OpsCenter base URL |
| No | - | Username for authentication (if enabled) |
| No | - | Password for authentication (if enabled) |
π Setup for VS Code with GitHub Copilot
1. Locate Your VS Code MCP Settings File
macOS/Linux:
code ~/.vscode/mcp-settings.jsonWindows:
code %APPDATA%\Code\User\mcp-settings.jsonIf the file doesn't exist, create it.
2. Add Server Configuration
Add the following to your mcp-settings.json:
{
"mcpServers": {
"datastax-opscenter": {
"command": "node",
"args": [
"/absolute/path/to/datastax-opscenter-mcp/build/index.js"
],
"env": {
"OPSCENTER_URL": "http://your-opscenter-host:8888",
"OPSCENTER_USERNAME": "your_username",
"OPSCENTER_PASSWORD": "your_password"
}
}
}
}β οΈ Important:
Replace
/absolute/path/to/datastax-opscenter-mcpwith the actual path where you cloned the repoUpdate
OPSCENTER_URL,OPSCENTER_USERNAME, andOPSCENTER_PASSWORDwith your valuesOn Windows, use forward slashes or escaped backslashes in paths:
C:/Users/YourName/datastax-opscenter-mcp/build/index.js
3. Restart VS Code
Close and reopen VS Code for the changes to take effect.
4. Verify Installation
Open GitHub Copilot Chat in VS Code
Type
@datastax-opscenterand you should see the server availableTry a test command:
@datastax-opscenter get_cluster_configs
π₯οΈ Setup for Claude Desktop
1. Locate Claude Desktop Configuration
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json2. Edit Configuration File
Open the configuration file and add the MCP server:
{
"mcpServers": {
"datastax-opscenter": {
"command": "node",
"args": [
"/absolute/path/to/datastax-opscenter-mcp/build/index.js"
],
"env": {
"OPSCENTER_URL": "http://localhost:8888",
"OPSCENTER_USERNAME": "admin",
"OPSCENTER_PASSWORD": "password"
}
}
}
}β οΈ Configuration Notes:
Use absolute paths for the
argsparameterRemove
OPSCENTER_USERNAMEandOPSCENTER_PASSWORDif your OpsCenter doesn't require authenticationUpdate
OPSCENTER_URLto match your OpsCenter instance
3. Restart Claude Desktop
Completely quit and restart the Claude Desktop application.
4. Verify Installation
In Claude Desktop, you should see the MCP server connected. Try:
Can you get the cluster configurations from OpsCenter?π³ Docker Setup (Optional)
If you prefer running the MCP server in a container:
1. Create Dockerfile
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
ENV OPSCENTER_URL=http://localhost:8888
CMD ["node", "build/index.js"]2. Build and Run
docker build -t datastax-opscenter-mcp .
docker run -it \
-e OPSCENTER_URL=http://your-opscenter:8888 \
-e OPSCENTER_USERNAME=admin \
-e OPSCENTER_PASSWORD=password \
datastax-opscenter-mcpπ Quick Start Examples
Once configured, you can use the MCP server to monitor your Cassandra clusters:
Available Tools
Cluster Operations
get_cluster_configs
Get configuration information for all clusters managed by OpsCenter.
get_cluster_info
Get detailed information about a specific cluster.
Parameters:
cluster_id
get_nodes
Get list of all nodes in a cluster with their properties.
Parameters:
cluster_idNote: Returns full node details (can be large for big clusters)
get_nodes_summary β¨ NEW
Get a concise summary of nodes organized by datacenter.
Parameters:
cluster_id(required)datacenter(optional) - Filter by specific datacenter
Returns: Node counts, IPs, hostnames, racks by datacenter
Use Case: Quick cluster topology overview without large payloads
Example:
{ "total_nodes": 68, "datacenter_counts": { "us-east1-v1": 15, "us-central1-v1": 15, "HD_ATC": 18, "HD_SSC": 20 } }
get_node_info
Get detailed information about a specific node.
Parameters:
cluster_id,node_ip
Metrics Collection
get_cluster_metrics
Retrieve cluster-wide metrics.
Parameters:
cluster_id(required)datacenter(default: "all")metric(required) - e.g., "write-ops", "read-ops", "data-load"start- Unix timestamp in secondsend- Unix timestamp in secondsstep- Time interval in minutes (1, 5, 120, or 1440)function- Aggregation: "min", "max", or "average"
Example metrics:
write-ops: Write requests per secondread-ops: Read requests per seconddata-load: Live disk space usedheap-used: Java heap memory usagepending-compaction-tasks: Pending compactions
get_node_metrics
Retrieve metrics for a specific node.
Parameters: Same as cluster metrics, plus
node_ip
get_bulk_node_metrics β¨ NEW
Retrieve metrics for ALL nodes in a datacenter with automatic aggregation.
Parameters:
cluster_id(required)datacenter(required) - e.g., "us-east1-v1"metric(required) - e.g., "read-ops", "write-ops"start(optional) - Defaults to 1 hour agoend(optional) - Defaults to current timestep(optional) - Default: 5 minutesfunction(optional) - Default: "average"
Returns:
Aggregate time-series (total, average, min, max per timestamp)
Overall statistics
Per-node details and error status
Use Case: Get total read/write volume for entire datacenter
Example:
{ "cluster_id": "Production_Cluster", "datacenter": "us-east1-v1", "metric": "read-ops", "nodes": {"total": 15, "with_data": 15}, "overall_statistics": { "total_sum": 785160, "average": 14.54, "max": 17.89 } }
get_table_metrics
Retrieve metrics for a specific table.
Parameters:
cluster_id,datacenter,keyspace,table,metricTime range and aggregation parameters
Example table metrics:
cf-write-ops: Table write operations per secondcf-read-ops: Table read operations per secondcf-live-disk-used: Disk space used by tablecf-live-sstables: Number of SSTables
get_new_metrics
Retrieve multiple metrics using the unified API.
Parameters:
cluster_id,metrics(comma-separated)nodesornode_group("*" for all)stepin seconds (60, 300, 7200, or 86400)node_aggregation(0 or 1)
list_available_metrics
List all available metric types with descriptions.
Parameters:
category(optional) - "cluster", "threadpool", "table", "os"
Schema Operations
get_keyspaces
Get list of all keyspaces in a cluster.
Parameters:
cluster_id
get_keyspace_schema
Get schema information for a specific keyspace.
Parameters:
cluster_id,keyspace
Event Monitoring
get_events
Get events and alerts for a cluster.
Parameters:
cluster_id,limit(default: 100)
π Quick Start Examples
Once configured, you can use the MCP server to monitor your Cassandra clusters:
Example 1: List All Clusters
In VS Code Copilot Chat:
@datastax-opscenter get_cluster_configsIn Claude Desktop:
Show me all Cassandra clusters managed by OpsCenterExample 2: Get Cluster Topology Overview β¨ NEW
Get a summary of all nodes in "Production_Cluster" organized by datacenterUsing get_nodes_summary tool:
Shows node counts per datacenter
Lists node IPs, hostnames, racks
Lightweight response (no large payloads)
Example 3: Analyze Datacenter Read Volume β¨ NEW
What is the total read request volume for all nodes in us-east1-v1
datacenter of "Production_Cluster" for the last hour?Using get_bulk_node_metrics tool:
Automatically queries all 15 nodes in us-east1-v1
Aggregates metrics across all nodes
Returns total, average, min, max statistics
Includes per-timestamp breakdown
Example 4: Check Cluster Health
Get detailed information about the cluster "Production_Cluster"Example 5: Monitor Read Performance
Show me read operations per second for "Production_Cluster"
in the last 3 hours with 5-minute intervalsExample 6: Analyze Table Performance
What is the disk usage and read latency for the table
"users" in keyspace "app_data" on cluster "Production_Cluster"?Example 7: Node Health Check
Get heap memory usage and CPU metrics for node 10.0.1.50
in cluster "Production_Cluster" for the last hourExample 1: Get Cluster Information
// Get all clusters
await callTool("get_cluster_configs", {});
// Get specific cluster details
await callTool("get_cluster_info", {
cluster_id: "Test_Cluster"
});Example 2: Monitor Write Performance
// Get write operations per second for last hour
const now = Math.floor(Date.now() / 1000);
const oneHourAgo = now - 3600;
await callTool("get_cluster_metrics", {
cluster_id: "Test_Cluster",
datacenter: "all",
metric: "write-ops",
start: oneHourAgo,
end: now,
step: 5, // 5-minute intervals
function: "average"
});Example 3: Check Node Health
// Get node CPU usage
await callTool("get_node_metrics", {
cluster_id: "Test_Cluster",
node_ip: "10.11.12.150",
metric: "os-cpu-user",
start: oneHourAgo,
end: now
});Example 4: Analyze Table Performance
// Get table read latency
await callTool("get_table_metrics", {
cluster_id: "Test_Cluster",
datacenter: "all",
keyspace: "Keyspace1",
table: "Users",
metric: "cf-read-latency-op",
function: "max"
});Example 5: Discover Available Metrics
// List all cluster metrics
await callTool("list_available_metrics", {
category: "cluster"
});
// List all available metrics
await callTool("list_available_metrics", {});Metric Categories
Cluster Metrics
Performance metrics aggregated across the cluster:
Operations:
write-ops,read-ops,write-failures,read-failuresLatency:
write-histogram,read-histogramMemory:
heap-used,heap-max,nonheap-usedCache:
key-cache-hit-rate,row-cache-hit-rateCompaction:
pending-compaction-tasks,total-bytes-compacted
Thread Pool Metrics
Thread pool activity and queue depths:
Pending:
pending-read-stage,pending-mutation-stage,pending-flushesActive:
active-read-stage,active-mutation-stageCompleted:
completed-read-stage,completed-mutation-stage
Table Metrics
Per-table performance and storage:
Operations:
cf-write-ops,cf-read-opsLatency:
cf-write-latency-op,cf-read-latency-opStorage:
cf-live-disk-used,cf-total-disk-used,cf-live-sstablesSSTable stats:
cf-sstables-per-read,cf-partition-size
Operating System Metrics
Host-level resource utilization:
CPU:
os-cpu-user,os-cpu-system,os-cpu-idle,os-loadMemory:
os-memory-used,os-memory-freeDisk:
os-disk-used,os-disk-free,os-disk-read-throughputNetwork:
os-net-received,os-net-sent
Time Range Parameters
All metric queries support time range filtering:
start: Unix timestamp in seconds (beginning of range)end: Unix timestamp in seconds (end of range)step: Data point intervalFor legacy API: minutes (1, 5, 120, 1440)
For new-metrics API: seconds (60, 300, 7200, 86400)
Aggregation Functions
Metrics can be aggregated using:
min: Minimum value in the time periodmax: Maximum value in the time periodaverage: Average value in the time period
API Reference
Based on DataStax OpsCenter 6.8 API:
π οΈ Development
Project Structure
datastax-opscenter-mcp/
βββ src/
β βββ index.ts # Main MCP server implementation
βββ build/ # Compiled JavaScript output
β βββ index.js
β βββ index.d.ts
βββ .github/
β βββ copilot-instructions.md # AI coding assistant guide
βββ package.json
βββ tsconfig.json
βββ .gitignore
βββ README.mdDevelopment Commands
# Install dependencies
npm install
# Build the project
npm run build
# Watch mode for development (auto-rebuild on changes)
npm run watch
# Run the compiled server
npm start
# Run directly with environment variables
OPSCENTER_URL=http://localhost:8888 npm startMaking Changes
Edit TypeScript source in
src/index.tsRun
npm run buildornpm run watchRestart VS Code or Claude Desktop to pick up changes
Adding New Tools
To add a new MCP tool:
Add the tool definition to the
toolsarray insrc/index.tsAdd the handler case in the
CallToolRequestSchemahandlerUpdate the README with usage examples
Rebuild:
npm run build
π API Reference
Available MCP Tools
π Troubleshooting
Common Issues
β "Cannot connect to OpsCenter"
Problem: Error: connect ECONNREFUSED
Solutions:
Verify OpsCenter is running:
curl http://localhost:8888/cluster-configsCheck the
OPSCENTER_URLin your configurationVerify firewall allows connections to OpsCenter port (default: 8888)
Test network connectivity:
telnet your-opscenter-host 8888
β "Authentication Failed"
Problem: 401 Unauthorized
Solutions:
Verify OpsCenter requires authentication (check OpsCenter settings)
Set correct
OPSCENTER_USERNAMEandOPSCENTER_PASSWORDRemove authentication env vars if OpsCenter doesn't require them
Check credentials by logging into OpsCenter web UI
β "MCP Server Not Showing Up"
VS Code:
Check the path in
mcp-settings.jsonis absolute and correctVerify the file exists:
ls /path/to/datastax-opscenter-mcp/build/index.jsCheck for syntax errors in
mcp-settings.jsonRestart VS Code completely
Check VS Code Output panel for MCP errors
Claude Desktop:
Verify configuration file location matches your OS
Use absolute paths in the configuration
Quit Claude Desktop completely (not just close window)
Check Claude Desktop logs:
macOS:
~/Library/Logs/Claude/Windows:
%APPDATA%\Claude\logs\
β "Metric Not Found"
Problem: API Error (400): Invalid metric
Solutions:
Use the
list_available_metricstool to see valid metrics:@datastax-opscenter list_available_metricsCheck metric spelling and hyphens (e.g.,
read-opsnotread_ops)Verify the metric category matches your request:
Cluster metrics: use
get_cluster_metricsNode metrics: use
get_node_metricsTable metrics: use
get_table_metrics
β "Build Errors"
Problem: TypeScript compilation fails
Solutions:
Ensure Node.js version is compatible:
node --version # Should be 18.x, 20.x, or 22.xClear and reinstall dependencies:
rm -rf node_modules package-lock.json npm install npm run buildCheck TypeScript version:
npm list typescript
π Debug Mode
Enable verbose logging by checking stderr output:
VS Code:
Check Output panel β Select "MCP" from dropdown
Claude Desktop:
Check logs directory for your OS (see above)
Manual Testing:
OPSCENTER_URL=http://localhost:8888 node build/index.jsπ€ Contributing
Contributions are welcome! Here's how you can help:
Reporting Issues
Search existing issues first
Include:
OpsCenter version
Node.js version
Error messages and stack traces
Steps to reproduce
Submitting Pull Requests
Fork the repository
Create a feature branch:
git checkout -b feature/your-feature-nameMake your changes
Test thoroughly:
npm run build # Test with VS Code or Claude DesktopCommit with clear messages:
git commit -m "Add feature: description"Push and create a pull request
Development Guidelines
Follow existing TypeScript code style
Add JSDoc comments for new functions
Update README.md with new features
Test with both authenticated and unauthenticated OpsCenter
Ensure backwards compatibility
π License
MIT License - see LICENSE file for details
π Acknowledgments
Model Context Protocol by Anthropic
DataStax OpsCenter API Documentation
Apache Cassandra Community
π Support
Issues: GitHub Issues
Discussions: GitHub Discussions
OpsCenter API Docs: DataStax Documentation
πΊοΈ Roadmap
Support for DataStax OpsCenter 7.x
Grafana-style dashboard generation
Alert configuration tools
Backup/restore operations
Repair management
Performance recommendations
WebSocket support for real-time metrics
Made with β€οΈ for the Cassandra community
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sangeethdba/datastax-opscenter-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server