Redis

MCP server to interact with Redis Server, AWS Memory DB, etc for caching or other use-cases where in-memory and key-value based storage is appropriate
  • python

25

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "prajwalnayak7-mcp-server-redis": {
      "command": "python",
      "args": [
        "src/server.py"
      ],
      "env": {
        "REDIS_DB": "0",
        "REDIS_HOST": "localhost",
        "REDIS_PORT": "6379"
      }
    }
  }
}

This MCP server provides a Redis integration layer that exposes Redis operations and resources via MCP endpoints and tools. You can query status, read Redis information, manage keys, and perform common Redis operations through a unified MCP interface. It is designed to automatically reconnect to Redis if the connection drops and includes a set of practical tools for everyday Redis usage.

How to use

To use this MCP server, connect your MCP client to the local runtime and start issuing resources and tools that mirror Redis capabilities. You can check the current connection status, inspect server information, and perform core Redis operations like getting and setting values, manipulating lists, hashes, and sets, and publishing messages via Pub/Sub. Each call returns structured responses and includes error handling to guide you when something goes wrong.

How to install

Prerequisites: you need Python and a runtime tool for preparing and running the MCP environment.

  1. Set up the virtual environment and install dependencies using the preferred tooling.

  2. Prepare your Redis connection by configuring environment variables as needed (see the example configuration to determine which values you should provide).

  3. Start the MCP server using the Python entry point.

uv venv
source .venv/bin/activate
uv sync

Additional sections

Configuration and runtime details are designed to be straightforward. Use the example environment file to determine which Redis connection variables to set for your deployment. If Redis is not yet running locally, start Redis or connect to your Redis instance before starting the MCP server.

Security note: ensure your Redis instance is secured for your deployment environment. Use appropriate authentication and network controls to prevent unauthorized access to Redis data.

Troubleshooting tips: if the server cannot reach Redis, check your network connectivity, Redis host and port, and any authentication settings in your environment configuration. Review the server logs for connection errors and retry after verifying Redis availability.

Testing approach: you can verify functionality by issuing a sequence of status checks and Redis operations through MCP tooling, then inspecting the responses for expected values and successful operation results.

Available tools

get_value

Retrieve the value stored at a given Redis key.

set_value

Set a value for a Redis key with an optional expiry.

delete_key

Delete a Redis key from the datastore.

increment

Increment a numeric value stored at a key.

list_push

Push values to a Redis list.

list_range

Get a range of values from a Redis list.

hash_set

Set fields within a Redis hash.

hash_get

Retrieve fields from a Redis hash.

set_add

Add members to a Redis set.

set_members

Get all members of a Redis set.

publish_message

Publish a message to a Redis pub/sub channel.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational