mcp-registry/redis/mcp-redis

    ==================
      
       /// MCP ///
      /// RED ///
        
    ==================
        
    [server:online]
    [protocol:ready]

redis/mcp-redis

by redis

Official Redis Model-Context-Protocol (MCP) server that lets LLM/agent applications store, search and manage data in Redis through natural-language instructions.

175
48
Open Source

01

string

Set and get Redis string values with optional expiration, ideal for simple configuration, session data, or caching responses

02

hash

Store and retrieve field-value pairs (including vector embeddings) inside a single key, useful for objects like user profiles or products

03

list

Append and pop items from Redis lists, enabling queues, message brokers, or ordered history of actions

04

set

Add, remove, and list unique members in Redis sets for tracking distinct values and performing set operations

05

sorted set

Maintain ordered data by score for leaderboards, priority queues, or time-based analytics

06

pub/sub

Publish messages to channels and subscribe to them for real-time notifications or chat-style communication

07

streams

Add, read, and delete entries in Redis Streams, supporting event sourcing, activity feeds, and consumer groups

08

JSON

Store, retrieve, and manipulate JSON documents in Redis with path-based access for complex nested data

09

query engine

Create and manage vector indexes and perform vector similarity searches

10

server management

Retrieve information and diagnostics about the connected Redis database

Installation

Prerequisites
1. A running Redis 7.2+ (or Redis Stack 7.2+) instance that you can reach from the MCP server.
2. Python 3.9 or later.
3. (Optional) OpenAI or other LLM provider key if you plan to use the built-in natural-language planner.
Steps
1. Clone the repository
git clone https://github.com/redis/mcp-redis.git cd mcp-redis
2. Create and activate a virtual environment
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
3. Install the server and its dependencies
pip install -U pip pip install -e .[all] # installs mcp-redis plus optional vector & auth extras
4. Provide configuration
------------------------------
------------------------------
Either export environment variables or create a .env file in the project root. Example .env REDIS_URL=redis://localhost:6379/0 REDIS_PASSWORD="" OPENAI_API_KEY=<your-openai-key> # optional MCP_SERVER_PORT=8080
5. Run database migrations (creates the schema keys used by the tools)
python -m mcp_redis.cli migrate
6. Start the MCP server
python -m mcp_redis.api --host 0.0.0.0 --port $MCP_SERVER_PORT
7. Test
curl -X POST http://localhost:8080/v1/chat -H "Content-Type: application/json" -d '{"question":"How many keys are stored?"}' Docker (alternative) docker build -t redis/mcp-server . docker run -e REDIS_URL=redis://host.docker.internal:6379/0 -p 8080:8080 redis/mcp-server The server is now reachable at http://localhost:8080 and exposes an OpenAI-compatible /v1/chat/completions endpoint.

Documentation

License: MIT License
Updated 7/30/2025