================== /// 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.
string
Set and get Redis string values with optional expiration, ideal for simple configuration, session data, or caching responses
hash
Store and retrieve field-value pairs (including vector embeddings) inside a single key, useful for objects like user profiles or products
list
Append and pop items from Redis lists, enabling queues, message brokers, or ordered history of actions
set
Add, remove, and list unique members in Redis sets for tracking distinct values and performing set operations
sorted set
Maintain ordered data by score for leaderboards, priority queues, or time-based analytics
pub/sub
Publish messages to channels and subscribe to them for real-time notifications or chat-style communication
streams
Add, read, and delete entries in Redis Streams, supporting event sourcing, activity feeds, and consumer groups
JSON
Store, retrieve, and manipulate JSON documents in Redis with path-based access for complex nested data
query engine
Create and manage vector indexes and perform vector similarity searches
server management
Retrieve information and diagnostics about the connected Redis database
Installation
Steps
git clone https://github.com/redis/mcp-redis.git
cd mcp-redis
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -U pip
pip install -e .[all] # installs mcp-redis plus optional vector & auth extras
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
python -m mcp_redis.cli migrate
python -m mcp_redis.api --host 0.0.0.0 --port $MCP_SERVER_PORT
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.