Skip to content
MCP server

Redis MCP Server

Read-only Redis and Valkey explorer with safe key scans and a big-key advisor

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
Version
0.5.8
Listing updated
2 days ago

About Redis MCP Server

Redis MCP Server is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Safety on a live instance is the main design point. Key enumeration always uses cursor-based SCAN with a bounded count and iteration cap, never the O(N) KEYS command that can block Redis's single-threaded loop, so the README says it is fine to point at a production instance with millions of keys. Tools run a curated read-only command allowlist, and writes such as SET, DEL, EXPIRE and HSET only work if ALLOW_WRITES=1 is set. EVAL, FUNCTION, SCRIPT, MULTI, MONITOR, SHUTDOWN and cluster commands are never exposed, even with writes on.

redis_health rolls INFO, DBSIZE and recent SLOWLOG into one report covering memory pressure, eviction policy, hit rate, ops per second, persistence, replication role and per-database key counts. redis_advisor acts as a lint pass, flagging big keys, missing TTLs, eviction pressure including the risky noeviction with no-TTL combination, and fork-latency risk, each with a severity and a fix. redis_key_info reports type, TTL, encoding, memory footprint and idle time without reading the value, and redis_get windows collection reads so a huge list cannot flood the model's context.

It works with Redis 6 and later and with Valkey, and a field the server does not report shows as null. Set REDIS_URL, and note that a password-only URL needs the form redis://:password@host:6379. It ships as one bundled file with no runtime dependencies, is MIT licensed and is built by Yaw Labs.

Install

Run in a terminal

claude mcp add redis-mcp -- npx -y @yawlabs/redis-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "redis-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/redis-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "redis-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/redis-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "redis-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/redis-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "redis-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/redis-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "redis-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/redis-mcp"
      ]
    }
  }
}

Tools this server provides (7)

Taken from the project documentation; the running server may differ.

redis_scan
Enumerate keys with cursor-based SCAN, with optional glob match and type filter.
redis_key_info
Inspect one key's type, TTL, encoding, memory and idle time without reading its value.
redis_health
Summarise INFO, DBSIZE and recent SLOWLOG into one health report.
redis_advisor
Report big keys, missing TTLs, eviction pressure and fork-latency risk with fixes.
redis_slowlog
Return recent slow-log entries with command, microseconds, timestamp and client.
redis_get
Read a value by type with windowed collection reads.
redis_command
Run allowed commands; mutating ones need ALLOW_WRITES=1.

What it does

SCAN-based key explorer
Pages through keys with a resumable cursor, glob match and type filter, capped at REDIS_MAX_KEYS.
One-call health report
Summarises memory, eviction, hit rate, persistence, replication and slow commands.
DBA advisor
Finds big keys, missing TTLs, eviction risks and fork-latency risk with suggested fixes.
Key inspection
Reads type, TTL, encoding, memory and idle time without fetching the value.
Windowed reads
Type-aware reads cap collection output to protect model context.
Opt-in writes
Mutating commands need ALLOW_WRITES=1, and arbitrary execution stays blocked.

Good for

  • Find out what is stored in an unfamiliar Redis instance
  • Check a production cache for big keys and missing expiry
  • Review recent slowlog entries after a latency spike
  • Run a quick health check before a deploy

Pricing

Open source

MIT licensed; free to use

Prices change. Check yaw.sh before you buy.

Redis MCP Server FAQ

Is it safe on production?

The README says so: it is read-only by default and enumerates keys with SCAN, never KEYS.

How do I enable writes?

Set ALLOW_WRITES=1; scoping that to dev and test instances is advised, and arbitrary-execution commands stay blocked.

Does it work with Valkey?

Yes, it works with Redis 6 and later and Valkey; some health fields depend on what INFO exposes.

What does it not cover?

EVAL, scripts, pub/sub, MONITOR, cluster management and replication control; the README points to redis-cli for those.

Is Redis MCP Server free?

Yes. Redis MCP Server is open source, so you can use and self-host it for free.

How do I add Redis MCP Server to Claude Code?

Run this command in your terminal: claude mcp add redis-mcp -- npx -y @yawlabs/redis-mcp

What are the best alternatives to Redis MCP Server?

The closest alternatives to Redis MCP Server are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

Alternatives to Redis MCP Server

  1. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  2. PlatypusDB

    MCP server

    Gives MCP clients access to your PlatypusDB database connections, scoped per agent

    Runs locally
    • Open source
    • Databases
  3. Lorebase

    MCP server

    Lets agents read and change a governed, versioned Postgres knowledge graph

    Runs locally
    • Open source
    • Knowledge and memory
  4. Sovaria

    MCP server

    Manage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant

    Not checked yet
    • 4 tools
    • Remote
    • Freemium
    • Databases
  5. Generate realistic connected test data, dbt projects and dashboards from a schema

    • Remote
    • Freemium
    • Databases
  6. semlayer

    MCP server

    Infers a semantic layer from your data warehouse and serves it to agents

    Runs locally
    • Free
    • Databases