Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Server (AI Integration)

redisctl includes a built-in Model Context Protocol (MCP) server that enables AI assistants like Claude to manage your Redis deployments through natural language.

Overview

The MCP server exposes redisctl functionality as tools that AI systems can discover and invoke. This allows you to:

  • Ask an AI to “list all my Redis databases”
  • Request “create a new 256MB database called cache-db”
  • Query “what’s the status of my cluster nodes”

All operations use your existing redisctl profiles for authentication.

Installation

macOS (Homebrew)

brew install redis-developer/homebrew-tap/redisctl

Linux/Windows

Download from GitHub Releases or use Docker:

docker pull ghcr.io/redis-developer/redisctl

See the Installation Guide for all options.

Setting Up Credentials

Before using the MCP server, configure a profile with your Redis credentials:

Redis Cloud

# Interactive setup (prompts for API keys)
redisctl profile add my-cloud-profile --cloud

# Or provide keys directly
redisctl profile add my-cloud-profile --cloud \
  --api-key YOUR_API_KEY \
  --secret-key YOUR_SECRET_KEY

Get your API keys from the Redis Cloud Console under Account > API Keys.

Redis Enterprise

# Interactive setup
redisctl profile add my-enterprise-profile --enterprise

# Or provide credentials directly
redisctl profile add my-enterprise-profile --enterprise \
  --url https://your-cluster:9443 \
  --username admin@redis.com \
  --password YOUR_PASSWORD \
  --insecure  # if using self-signed certs

Verify Your Profile

# Test Cloud connection
redisctl -p my-cloud-profile cloud account get

# Test Enterprise connection
redisctl -p my-enterprise-profile enterprise cluster get

Quick Start

# Start the MCP server (read-only mode, safe for exploration)
redisctl -p my-profile mcp serve

# Enable write operations (create, update, delete)
redisctl -p my-profile mcp serve --allow-writes

# List available tools
redisctl mcp tools

Configuring Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "redisctl": {
      "command": "/path/to/redisctl",
      "args": ["-p", "my-profile", "mcp", "serve"]
    }
  }
}

For write operations:

{
  "mcpServers": {
    "redisctl": {
      "command": "/path/to/redisctl",
      "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
    }
  }
}

Configuring Claude Code

Add to your project’s .mcp.json or global MCP settings:

{
  "mcpServers": {
    "redisctl": {
      "command": "redisctl",
      "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
    }
  }
}

Configuring Cursor

Add to your Cursor MCP configuration file:

macOS: ~/.cursor/mcp.json Windows: %USERPROFILE%\.cursor\mcp.json

{
  "mcpServers": {
    "redisctl": {
      "command": "/path/to/redisctl",
      "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
    }
  }
}

After saving, restart Cursor or use the command palette to reload MCP servers.

Configuring Windsurf

Add to your Windsurf MCP configuration:

macOS: ~/.codeium/windsurf/mcp_config.json Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

{
  "mcpServers": {
    "redisctl": {
      "command": "/path/to/redisctl",
      "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
    }
  }
}

Restart Windsurf after updating the configuration.

Configuring VS Code with Continue

If you’re using Continue in VS Code, add to your Continue configuration:

Config location: ~/.continue/config.json

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "/path/to/redisctl",
          "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
        }
      }
    ]
  }
}

Configuring Zed

Add to your Zed settings (~/.config/zed/settings.json on Linux/macOS):

{
  "context_servers": {
    "redisctl": {
      "command": {
        "path": "/path/to/redisctl",
        "args": ["-p", "my-profile", "mcp", "serve", "--allow-writes"]
      }
    }
  }
}

Available Tools

Redis Cloud Tools (17 tools)

Account & Infrastructure

ToolDescription
cloud_account_getGet account information
cloud_payment_methods_getList all payment methods configured for your account
cloud_database_modules_getList all available database modules (capabilities)
cloud_regions_getGet available regions across cloud providers (AWS, GCP, Azure)

Pro Subscriptions

ToolDescription
cloud_subscriptions_listList all Pro subscriptions
cloud_subscription_getGet Pro subscription details
cloud_pro_subscription_createCreate a new Pro subscription (write)
cloud_pro_subscription_deleteDelete a Pro subscription (write)

Essentials Subscriptions

ToolDescription
cloud_essentials_subscriptions_listList all Essentials subscriptions
cloud_essentials_subscription_getGet Essentials subscription details
cloud_essentials_subscription_createCreate a new Essentials subscription (write)
cloud_essentials_subscription_deleteDelete an Essentials subscription (write)
cloud_essentials_plans_listList available Essentials plans with pricing

Database & Task Operations

ToolDescription
cloud_databases_listList databases in a subscription
cloud_database_getGet database details
cloud_tasks_listList recent async tasks
cloud_task_getGet task status

Redis Enterprise Tools (48 tools)

Cluster Operations

ToolDescription
enterprise_cluster_getGet cluster information
enterprise_cluster_statsGet cluster statistics
enterprise_cluster_settingsGet cluster settings
enterprise_cluster_topologyGet cluster topology
enterprise_cluster_updateUpdate cluster configuration (write)

Database Operations

ToolDescription
enterprise_databases_listList all databases
enterprise_database_getGet database details
enterprise_database_statsGet database statistics
enterprise_database_metricsGet database performance metrics
enterprise_database_createCreate a new database (write)
enterprise_database_updateUpdate database configuration (write)
enterprise_database_deleteDelete a database (write)
enterprise_database_flushFlush all data from database (write)
enterprise_database_exportExport database to external location (write)
enterprise_database_importImport data into database (write)
enterprise_database_backupTrigger database backup (write)
enterprise_database_restoreRestore database from backup (write)

Node Operations

ToolDescription
enterprise_nodes_listList all cluster nodes
enterprise_node_getGet node details
enterprise_node_statsGet node statistics
enterprise_node_updateUpdate node configuration (write)
enterprise_node_removeRemove node from cluster (write)

Shard & Alert Operations

ToolDescription
enterprise_shards_listList all shards
enterprise_shard_getGet shard details
enterprise_alerts_listList active alerts
enterprise_alert_getGet alert details

User & Access Management

ToolDescription
enterprise_users_listList all users
enterprise_user_getGet user details
enterprise_user_createCreate a new user (write)
enterprise_user_deleteDelete a user (write)
enterprise_roles_listList all roles
enterprise_role_getGet role details
enterprise_role_createCreate a new role (write)
enterprise_role_deleteDelete a role (write)
enterprise_acls_listList all Redis ACLs
enterprise_acl_getGet ACL details
enterprise_acl_createCreate a new Redis ACL (write)
enterprise_acl_deleteDelete a Redis ACL (write)

Other Operations

ToolDescription
enterprise_logs_getGet cluster event logs
enterprise_license_getGet license information
enterprise_modules_listList available modules
enterprise_module_getGet module details
enterprise_crdbs_listList Active-Active databases
enterprise_crdb_getGet Active-Active database details
enterprise_crdb_updateUpdate Active-Active database (write)
enterprise_crdb_deleteDelete Active-Active database (write)
enterprise_debuginfo_listList debug info tasks
enterprise_debuginfo_statusGet debug info task status

Total: 65 tools (17 Cloud + 48 Enterprise)

Example Conversations

Once configured, you can interact naturally with your Redis infrastructure:

You: What databases do I have in my enterprise cluster?

Claude: uses enterprise_databases_list You have 2 databases:

  • default-db (uid: 1) - 1GB, active
  • cache-db (uid: 2) - 256MB, active

You: Create a new database called session-store with 512MB

Claude: uses enterprise_database_create Created database session-store (uid: 3) with 512MB memory. Status: active.

You: Show me any active alerts

Claude: uses enterprise_alerts_list No active alerts in your cluster.

You: What Essentials plans are available on AWS?

Claude: uses cloud_essentials_plans_list with provider: AWS Here are the available Essentials plans on AWS:

  • 250MB Cache ($5/month) - us-east-1
  • 1GB Cache ($18/month) - us-east-1
  • 250MB Persistence ($6/month) - us-east-1 …

You: Create a new Essentials subscription with the 250MB plan

Claude: uses cloud_essentials_subscription_create Created Essentials subscription my-cache with plan 250MB. Task ID: abc123. Use cloud_task_get to monitor progress.

Security Considerations

Read-Only Mode (Default)

By default, the MCP server runs in read-only mode. This prevents any destructive operations and is recommended for:

  • Exploring your infrastructure
  • Monitoring and reporting
  • Learning about your deployments

Write Mode

Use --allow-writes only when you need to create or modify resources. Consider:

  • Using separate profiles for read-only vs write access
  • Running write-enabled servers only in development environments
  • Reviewing AI-suggested changes before confirming

Profile-Based Authentication

The MCP server uses your existing redisctl profiles, which means:

  • Credentials are never exposed to the AI
  • You control which environments are accessible
  • Standard profile security applies (keyring support, etc.)

Troubleshooting

Server won’t start

# Check your profile works
redisctl -p my-profile enterprise cluster get

# Verify MCP feature is enabled
redisctl mcp tools

Claude can’t find the server

  1. Ensure the path to redisctl is absolute in your config
  2. Restart Claude Desktop after config changes
  3. Check Claude’s MCP logs for connection errors

Operations timing out

The MCP server inherits redisctl’s timeout settings. For slow operations:

# Enterprise operations may need longer timeouts
redisctl -p my-profile mcp serve --allow-writes

Protocol Details

The MCP server uses:

  • Transport: stdio (standard input/output)
  • Protocol Version: 2024-11-05
  • Capabilities: Tools only (no resources or prompts currently)

For MCP protocol details, see the MCP Specification.