Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

REDIS-MCP-Server

MCP.Pizza Chef: GongRzhe

The Redis MCP Server is a Model Context Protocol server implementation designed to facilitate interaction between large language models (LLMs) and Redis databases. By exposing Redis key-value store functionalities through a standardized set of MCP tools, it allows LLMs to query, update, and manage Redis data in real time. This server supports over 60 Redis-specific tools, enabling rich and flexible data operations. Installation is straightforward via Smithery or manual npx commands, making it easy to integrate with various LLM clients like Claude Desktop. The Redis MCP Server is ideal for developers looking to enhance AI workflows with fast, structured access to Redis data stores.

Use This MCP server To

Query Redis key-value data in real time Update Redis entries via LLM commands Manage Redis data structures through AI workflows Integrate Redis data access into AI copilots Automate Redis database operations with LLMs Enable LLMs to cache and retrieve session data Support AI-driven analytics on Redis-stored data Facilitate multi-step reasoning with Redis context

README

Redis MCP Server (@gongrzhe/server-redis-mcp@1.0.0)

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/server-redis-mcp@1.0.0 redis://your-redis-host:port

# Example:
npx @gongrzhe/server-redis-mcp@1.0.0 redis://localhost:6379

Or install globally:

# Install specific version globally
npm install -g @gongrzhe/server-redis-mcp@1.0.0

# 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/server-redis-mcp@1.0.0",
        "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.

REDIS-MCP-Server FAQ

How do I install the Redis MCP Server?
You can install it automatically via Smithery CLI with 'npx -y @smithery/cli install @gongrzhe/server-redis-mcp --client claude' or manually using 'npx @gongrzhe/server-redis-mcp@1.0.0 redis://your-redis-host:port'.
Can the Redis MCP Server work with LLMs other than Claude?
Yes, it is designed to be provider-agnostic and can work with LLMs like OpenAI's GPT-4, Anthropic's Claude, and Google Gemini.
What Redis operations does the server support?
It supports over 60 Redis MCP tools, enabling querying, updating, and managing various Redis data types and commands.
Is the Redis MCP Server secure for production use?
The server follows MCP principles for secure, scoped, and observable interactions, but you should also implement Redis security best practices.
How does the Redis MCP Server integrate with existing MCP clients?
It acts as a lightweight MCP server exposing Redis functionality, which MCP clients can connect to for real-time Redis data access.
Can I customize the Redis MCP Server tools?
Yes, since the server is open source, you can extend or modify the available tools to fit your specific Redis use cases.
Does the server support Redis clusters or only single instances?
The current implementation primarily targets single Redis instances, but it can be extended to support clusters with additional configuration.
Where can I find the source code and documentation?
The source code and documentation are available on GitHub at https://github.com/modelcontextprotocol/servers/tree/main/src/redis.