mcp-redis

by @redis

Redis MCP Server

Query, update, stream, and vector-search Redis data using natural language across strings, hashes, lists, sets, sorted sets, JSON documents, pub/sub, and Redis Streams. Officially maintained by Redis under MIT, this Python server runs via `uvx` or Docker over local stdio.

Databases644pythonMIT

Server facts

mcp-redis

GitHub stars

644

Last commit

Nov 25, 2026

Runtime

python

License

MIT

Tech

Runtime
python
Transports
stdio
Remote access
No
Authentication
Redis Password / ACL / TLS Client Cert / Azure EntraID

Activity

GitHub stars
644
Last commit
Data as of

Tags

  • database
  • genai
  • llm
  • mcp
  • mcp server
  • redis

Overview

Backend engineers wiring redis mcp into Claude Desktop, Cursor, Claude Code, VS Code GitHub Copilot, Augment, or OpenAI Agents SDK get Redis's official MIT-licensed Python interface (`redis-mcp-server` on PyPI and `mcp/redis` on Docker Hub) instead of brittle shell scripts. Running over local `stdio` transport (with `streamable-http` noted as planned future work), the server exposes dedicated tool families covering Redis strings with TTL, hashes capable of storing vector embeddings, lists, sets, sorted sets, stateful pub/sub subscriptions, Redis Streams with consumer groups, JSON path operations, vector query-engine indexing, Redis documentation search, and server diagnostics.

Launch the published PyPI package ephemerally through `uvx` targeting a `redis://` or TLS `rediss://` URI—passing `-qq` to silence stderr install logs—or configure host, port, custom CA/client certificates, and `REDIS_CLUSTER_MODE` through CLI flags or environment variables; Python 3.14+ is targeted for local `uv` runs. For production safety, pair read-only Redis ACL users with `MCP_REDIS_ALLOWED_TOOLS` (for example `get,set,hget,hgetall,dbsize`), which prunes unlisted tools from `tools/list` and fails closed on unknown names. Teams on Azure Managed Redis can authenticate natively through Microsoft EntraID using Service Principal, Managed Identity, or Default Azure Credential flows with automatic token refresh.

Install & configure

Requirements

  • `uv`/`uvx` with Python 3.14+ (or `pip install redis-mcp-server`), or Docker for the official `mcp/redis` image
  • Accessible Redis instance, Redis Cloud (`rediss://`), Redis Cluster, or Azure Managed Redis endpoint
  • Redis username/password (recommended scoped Redis ACL) or Azure EntraID credentials for Managed Redis
Documented launch / install command
pip install redis-mcp-server

Configure MCP clients with `uvx --from redis-mcp-server@latest redis-mcp-server --url redis://localhost:6379/0` (add `-qq` before `--from` to suppress `uvx` stderr install logs) or use the official `mcp/redis` Docker image. Restrict visible tools via `MCP_REDIS_ALLOWED_TOOLS`.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "redis-mcp-server": {
      "command": "uvx",
      "args": [
        "-qq",
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "redis://localhost:6379/0"
      ]
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "redis-mcp-server": {
      "command": "uvx",
      "args": [
        "-qq",
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "redis://localhost:6379/0"
      ]
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "redis-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "-qq",
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "redis://localhost:6379/0"
      ]
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "redis-mcp-server": {
      "command": "uvx",
      "args": [
        "-qq",
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "redis://localhost:6379/0"
      ]
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "redis-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "-qq",
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "redis://localhost:6379/0"
      ]
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
getRetrieves a string value stored under a Redis key for configuration, session, or cache inspection.
setStores a string value in Redis with optional expiration handling for caching and session workflows.
hgetReads an individual field from a Redis hash representing structured objects, profiles, or metadata.
hgetallFetches all field-value pairs from a Redis hash key in a single inspection call.
dbsizeReturns the total key count in the currently selected Redis logical database for server diagnostics.

Use cases

  • Inspect live caches, expiring session keys, and structured Redis hashes directly from Claude Desktop, Cursor, or VS Code Copilot.
  • Manage Redis Streams consumer groups, append/acknowledge entries, and debug pub/sub channels using natural language.
  • Build and query Redis vector indexes and nested JSON documents for RAG prototypes and agent memory.
  • Connect enterprise agents to Azure Managed Redis with automated Microsoft EntraID OAuth token renewal and least-privilege Redis ACLs.

Strengths

  • Official Redis MIT-licensed package covering strings, hashes, lists, sets, sorted sets, JSON, pub/sub, Streams, vector query engine, and docs search.
  • Supports `MCP_REDIS_ALLOWED_TOOLS` fail-closed tool pruning so agents never plan around forbidden write or admin commands.
  • Built-in Microsoft EntraID authentication (Service Principal, Managed Identity, Default Azure Credential) plus `rediss://` TLS and Cluster Mode.
  • Easy zero-clone execution via `uvx` from PyPI or the official `mcp/redis` Docker image.

Limitations

  • Currently supports `stdio` transport only; Streamable HTTP transport is not yet available.
  • Targets Python 3.14+ for local `uv` setups, which may require installing a newer Python toolchain on older workstations.
  • Redis ACL enforcement alone still exposes blocked commands in `tools/list` unless paired with `MCP_REDIS_ALLOWED_TOOLS`.

mcp-redis setup notes

  • mcp-redis's stdio example needs a client that launches local processes.

Frequently asked questions

Add a stdio server running `uvx` with args `["-qq", "--from", "redis-mcp-server@latest", "redis-mcp-server", "--url", "redis://localhost:6379/0"]` in `claude_desktop_config.json` or VS Code's `mcp.json`. You can alternatively run the official `mcp/redis` Docker container and pass `REDIS_HOST`, `REDIS_PORT`, `REDIS_USERNAME`, and `REDIS_PWD` via environment variables.

Related MCP servers