Navigation
Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power - MCP Implementation

Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power

Empowering LLMs to effortlessly interact with Redis databases via MCP tools—your key-value data just got smarter. @gongrzhe/[email protected]

Cloud Platforms
4.3(166 reviews)
249 saves
116 comments

71% of users reported increased productivity after just one week

About Redis MCP Server

What is Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power?

Redis MCP Server is an open-source implementation of the Model Context Protocol (MCP), enabling large language models (LLMs) to interact with Redis databases through standardized tools. This server acts as a bridge between LLMs and Redis key-value stores, allowing seamless execution of operations such as setting keys, retrieving values, and managing data lifecycle efficiently. With over 60+ pre-built tools, it simplifies integration with platforms like Claude Desktop while maintaining performance and scalability.

How to Use Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power?

Installation and configuration options are designed for flexibility:

  • Smithery Integration: Use npx @smithery/cli install @gongrzhe/server-redis-mcp --client claude for automatic setup with Claude Desktop.
  • Manual Installation: Deploy via npm with npx @gongrzhe/server-redis-mcp redis://your-host:port or globally install for repeated use.
  • Docker Deployment: Run containerized instances with docker run -i --rm mcp/redis redis://host.docker.internal:6379, ideal for cross-platform environments.

Redis MCP Server Features

Key Features of Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power?

Core capabilities include:

  • Toolset Granularity: Precise control over Redis operations:
    • set: Store values with optional TTL.
    • get: Retrieve values by key.
    • delete: Remove single or bulk keys.
    • list: Pattern-based key discovery.
  • Platform Compatibility: Supports integration with Claude Desktop through JSON config files and Dockerized workflows.
  • Performance Optimized: Lightweight architecture ensures minimal latency for real-time LLM-Redis interactions.

Use Cases of Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power?

Practical applications span:

  • Dynamic Data Caching: Accelerate LLM responses by pre-storing frequently accessed data in Redis.
  • Real-Time Analytics: Query Redis datasets directly from LLM workflows for immediate insights.
  • Conversation State Management: Store and retrieve session data for chatbots using Redis' fast key-value storage.
  • Automated Workflows: Trigger Redis operations based on LLM-generated commands for task automation.

Redis MCP Server FAQ

FAQ from Redis MCP Server: Seamless LLM-Redis Interaction & Smart Data Power?

  • Is Redis MCP Server compatible with Redis clusters? Yes, supports standard Redis connection URIs including cluster configurations.
  • What authentication methods are supported? Basic auth and SSL/TLS are compatible via Redis URL parameters.
  • How to handle expired keys? Use set tool's expireSeconds parameter to enforce TTL policies programmatically.
  • Where can I contribute to the project? Fork the repository on GitHub and submit pull requests for new tools or optimizations.

Content

Redis MCP Server (@gongrzhe/[email protected])

smithery badge

A Redis Model Context Protocol (MCP) server implementation for interacting with Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.

Update

62 Redis MCP tools in https://github.com/GongRzhe/REDIS-MCP-Server/tree/redis-plus

Installation & Usage

Installing via Smithery

To install Redis MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @gongrzhe/server-redis-mcp --client claude

Installing Manually

# Using npx with specific version (recommended)
npx @gongrzhe/[[email protected]](/cdn-cgi/l/email-protection) redis://your-redis-host:port

# Example:
npx @gongrzhe/[[email protected]](/cdn-cgi/l/email-protection) redis://localhost:6379

Or install globally:

# Install specific version globally
npm install -g @gongrzhe/[[email protected]](/cdn-cgi/l/email-protection)

# Run after global installation
@gongrzhe/server-redis-mcp redis://your-redis-host:port

Components

Tools

  • set

    • Set a Redis key-value pair with optional expiration
    • Input:
      • key (string): Redis key
      • value (string): Value to store
      • expireSeconds (number, optional): Expiration time in seconds
  • get

    • Get value by key from Redis
    • Input: key (string): Redis key to retrieve
  • delete

    • Delete one or more keys from Redis
    • Input: key (string | string[]): Key or array of keys to delete
  • list

    • List Redis keys matching a pattern
    • Input: pattern (string, optional): Pattern to match keys (default: *)

Configuration

Usage with Claude Desktop

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

{
  "mcpServers": {
    "redis": {
      "command": "npx",
      "args": [
        "@gongrzhe/[[email protected]](/cdn-cgi/l/email-protection)",
        "redis://localhost:6379"
      ]
    }
  }
}

Alternatively, you can use the node command directly if you have the package installed:

{
  "mcpServers": {
    "redis": {
      "command": "node",
      "args": [
        "path/to/build/index.js",
        "redis://10.1.210.223:6379"
      ]
    }
  }
}

Docker Usage

When using Docker:

  • For macOS, use host.docker.internal if the Redis server is running on the host network

  • Redis URL can be specified as an argument, defaults to "redis://localhost:6379"

    {
    "mcpServers": {
    "redis": {
    "command": "docker",
    "args": [
    "run",
    "-i",
    "--rm",
    "mcp/redis",
    "redis://host.docker.internal:6379"
    ]
    }
    }
    }

Development

Building from Source

  1. Clone the repository

  2. Install dependencies:

    npm install

  3. Build the project:

    npm run build

Docker Build

docker build -t mcp/redis .

License

This MCP server is licensed under the ISC License. For more details, please see the LICENSE file in the project repository.

Related MCP Servers & Clients