redis/mcp-redis

The official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently

Redis MCP Server – a natural‑language bridge to Redis

What it is – A lightweight Python server that lets AI agents talk to Redis using plain English (or any language supported by an MCP client). It implements the Model Content Protocol (MCP) transport, exposing a set of “tools” that map directly onto Redis data structures (strings, hashes, lists, sets, sorted‑sets, streams, JSON, pub/sub, vector indexes, etc.).

Why it matters – Modern LLM‑driven agents need a way to store, retrieve, and search data without writing low‑level Redis commands. By converting natural‑language requests such as “store the conversation in a stream” or “search this vector” into the appropriate Redis operations, the MCP server lets developers focus on the agent logic while the server handles the database interaction, authentication, and scaling.


Core features

Feature What it does
Natural‑language queries Agents send plain‑text intents; the server translates them to Redis commands.
Full Redis data‑type support Strings, hashes (including embedding vectors), lists, sets, sorted‑sets, streams, JSON, pub/sub, and vector indexes.
MCP integration Works with any MCP client (e.g., Claude Desktop, OpenAI Agents SDK).
Scalable & lightweight Designed for high‑throughput, low‑overhead operation; can run in a Docker container.
Azure Entra ID auth Native OAuth token handling for Azure Managed Redis (service‑principal, managed‑identity, or default credential flows).
CLI & env‑var configuration All connection options (host, port, TLS, ACL, cluster mode) can be set via command‑line flags or environment variables.
Extensible tool set Built‑in tools for each Redis type plus helper tools for docs search, vector‑search management, and server introspection.

Getting started (quick‑start)

  1. Installpip install redis-mcp-server (or use the Docker image mcp/redis).
  2. Run
    uv run redis-mcp-server --url redis://localhost:6379/0
    
    (Replace the URI with your Redis instance; use rediss:// for TLS.)
  3. Configure a client – In Claude Desktop, OpenAI Agents SDK, etc., add an MCP server entry pointing to the command you just started. The client will now be able to issue natural‑language commands that the server translates to Redis operations.

Typical use cases

  • Conversation memory – Store each turn of a chat in a Redis stream for later retrieval or replay.
  • Session caching – Cache LLM responses with expiration using the string tool.
  • Vector‑search back‑end – Create and query vector indexes for semantic search directly from an agent.
  • Real‑time notifications – Publish events via the pub/sub tool and have agents subscribe to updates.
  • Enterprise Azure deployments – Authenticate to Azure Managed Redis with Entra ID, avoiding static passwords.

Installation options

Method How to use
PyPI (recommended) pip install redis-mcp-server then run with uv run redis-mcp-server …
GitHub source uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --url redis://…
Docker docker run --rm -e REDIS_HOST=… -e REDIS_PORT=… mcp/redis
Development Clone repo, uv venv && uv sync, then uv run src/main.py

Configuration highlights

  • CLI flags--url, --host, --port, --ssl, --cluster-mode, etc.
  • Environment variablesREDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_SSL, REDIS_CLUSTER_MODE, plus the Entra ID variables (REDIS_ENTRAID_*).
  • ACL support – You can restrict the server to a read‑only Redis user via standard Redis ACL commands.

Ecosystem integrations

  • OpenAI Agents SDK – Use the server as a tool provider for OpenAI‑based agents.
  • Claude Desktop – Configure the MCP server in Claude’s mcpServers JSON block.
  • VS Code + GitHub Copilot – Run the server locally and let Copilot‑driven agents store/retrieve data.
  • Augment – (listed in the README) – a higher‑level framework that can call the MCP server’s tools.

Where to get help


License

MIT – free for commercial and non‑commercial use.


Bottom line – The Redis MCP Server is a production‑ready bridge that lets LLM‑powered agents treat Redis as a natural‑language‑accessible knowledge store, with full support for Azure‑based secure authentication and all of Redis’s native data structures.

Related

  • Project
  • Project
  • Project
  • Project
  • Project