Home / MCP / Redis MCP Server

Redis MCP Server

Provides Redis key-value operations via an SSE MCP interface with set, get, delete, and list capabilities

other
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "redis_mcp_http": {
            "url": "http://localhost:8080/sse"
        }
    }
}

This Redis MCP Server provides an SSE-based MCP interface to manage Redis key-value operations, including setting, getting, deleting, and listing keys with optional expiration. It enables real-time updates and convenient scripting or integration with MCP clients.

How to use

Connect your MCP client to the Redis MCP Server and start issuing tools to manipulate Redis data. You can perform basic key-value operations, search for keys by pattern, and optionally set per-key expiration. All actions are exposed through a streaming MCP interface that delivers results and status updates as they occur.

Key operations you can perform include setting a value for a key, retrieving a value by key, deleting one or more keys, and listing keys that match a pattern. When you set a key, you may specify an expiration time so the key will automatically expire after the given duration. Use the listing tool to discover keys that fit a given glob-style pattern, which is useful for maintenance and housekeeping.

How to install

Prerequisites you need before installing the server are a Java Development Kit (JDK) version 17 or higher, Maven 3.6 or higher, and a running Redis server.

Build the project to generate the runnable artifact.

Run the MCP server using the standard startup command. You can point the server to your Redis instance by passing the redis URL as a system property.

mvn clean package

java -Dredis.url=redis://localhost:6379 -jar target/redis-mcp-server-{version}.jar

Configuration and running notes

Configure the Redis connection through the redis.url system property. If you need to connect to a different Redis host or port, provide the URL in the command line when starting the server.

You can also integrate this MCP server with Cursor by pointing to the SSE endpoint that the server exposes. Use the URL for the server’s SSE stream so Cursor can receive real-time updates.

Additional configuration and endpoints

The server exposes a small set of MCP tools for Redis operations, enabling practical data management from MCP clients. The primary tools are named for their actions and perform operations against Redis as described below.

Available tools

set

Set a Redis key-value pair with an optional expiration time. Creates or updates the key with the provided value and optional time-to-live.

get

Retrieve the value associated with a Redis key.

delete

Remove one or more keys from Redis. Supports deleting multiple keys in a single operation.

list

List Redis keys that match a given pattern, enabling discovery of keys by prefix or pattern.