MCP Now
Redis

Redis

by GongRzhe
GitHub

Redis database operations and caching microservice server with support for key-value operations, expiration management, and pattern-based key listing.

redis
key
server
install
docker

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:

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

Installing Manually

1# Using npx with specific version (recommended) 2npx @gongrzhe/[email protected] redis://your-redis-host:port 3 4# Example: 5npx @gongrzhe/[email protected] redis://localhost:6379

Or install globally:

1# Install specific version globally 2npm install -g @gongrzhe/[email protected] 3 4# Run after global installation 5@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:

1{ 2 "mcpServers": { 3 "redis": { 4 "command": "npx", 5 "args": [ 6 "@gongrzhe/[email protected]", 7 "redis://localhost:6379" 8 ] 9 } 10 } 11}

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

1{ 2 "mcpServers": { 3 "redis": { 4 "command": "node", 5 "args": [ 6 "path/to/build/index.js", 7 "redis://10.1.210.223:6379" 8 ] 9 } 10 } 11}

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"
1{ 2 "mcpServers": { 3 "redis": { 4 "command": "docker", 5 "args": [ 6 "run", 7 "-i", 8 "--rm", 9 "mcp/redis", 10 "redis://host.docker.internal:6379" 11 ] 12 } 13 } 14}

Development

Building from Source

  1. Clone the repository
  2. Install dependencies:
    1npm install
  3. Build the project:
    1npm run build

Docker Build

1docker 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.