Skip to main content
Glama

redis-mcp

Safe, connection-efficient Model Context Protocol server for Redis.

It exposes common Redis inspection and write operations while requiring explicit confirmation for destructive actions.

Features

  • Reuses one lazy Redis connection per MCP process.

  • Uses cursor-based SCAN instead of blocking KEYS.

  • Uses UNLINK and FLUSHDB ASYNC for non-blocking deletion.

  • Limits collection reads to 200 elements.

  • Prevents accidental overwrites unless overwrite=true is set.

  • Gates destructive tools behind explicit confirmation.

Related MCP server: mcp-database

Tools

Tool

Purpose

Confirmation

redis_get

Read a string value

—

redis_scan

Find keys by pattern

—

redis_inspect

Read type, TTL, and value

—

redis_info

Read Redis server info

—

redis_set

Set a string value, optionally with TTL

overwrite=true to replace an existing key

redis_delete

Delete keys with UNLINK

confirm=true

redis_expire

Set a key TTL

confirm=true

redis_flushdb

Delete every key in the current database

confirm=true and confirm_phrase="FLUSH ALL DATA"

Requirements

  • Node.js 18 or newer

  • A reachable Redis server

Install

git clone https://github.com/wahyuakbarwibowo/redis-mcp.git
cd redis-mcp
npm install

Set REDIS_URL to configure Redis. It defaults to redis://127.0.0.1:6379.

REDIS_URL=redis://127.0.0.1:6379 node src/index.js

The server communicates over stdio. It logs readiness to stderr.

MCP configuration

Replace /absolute/path/to/redis-mcp with the path where you cloned the repository.

Claude Code

claude mcp add redis \
  --env REDIS_URL=redis://127.0.0.1:6379 \
  -- node /absolute/path/to/redis-mcp/src/index.js

Claude Desktop, Codex CLI, OpenCode, Kilo Code, and Antigravity

Use this server command in the client’s MCP configuration:

{
  "command": "node",
  "args": ["/absolute/path/to/redis-mcp/src/index.js"],
  "env": { "REDIS_URL": "redis://127.0.0.1:6379" }
}

Each client uses a different wrapper key around this command. See its MCP configuration documentation for the expected format.

Safety model

Destructive tools follow this sequence:

  1. The first call without confirmation is refused and describes the intended action.

  2. The user explicitly approves that exact action.

  3. The client retries with the required confirmation fields.

The checks run inside the server, so they remain effective even if an MCP client or AI agent forgets to ask first.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    The official Redis MCP Server is a natural language interface designed for agentic applications to efficiently manage and search data in Redis.
    53
    3,554 PyPI
    634
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.
    1
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    MCP server for Redis with data operations, permission control, and operation logging. Supports key management, dynamic tool lists, and auto-reconnection.
    18
    37 npm
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Read-only Redis MCP server with a configurable command allowlist for safe production diagnostics, enabling exact read-only subcommands like CLIENT LIST and SLOWLOG GET.
    5
    MIT