Redis MCP Server

✓ verified

Interact with Redis key-value stores from the assistant.

Don't have ToolPiper? We'll take you to the download.

Open repository →

Publisher

Anthropic Reference (archived)

License

MIT

Transport

Local subprocess

Tools

4

What this server does

Four tools: `set` with optional TTL via `expireSeconds`, `get`, `delete` (key or array of keys), and `list` (glob pattern, default `*`). That is the whole surface. No pub/sub, no streams, no transactions, no Lua. If you have ever shelled into `redis-cli` to poke at cached keys during debugging, this gives the model the same affordance from chat. The connection URL is a positional argument: `redis://host:6379` for plaintext, `rediss://host:6379` for TLS. Credentials embed in the URL: `redis://user:password@host:6379`. The server retries on connection failure with exponential backoff (1s initial, 30s max, five attempts) and then exits to avoid infinite reconnect loops. On macOS with Docker, target `redis://host.docker.internal:6379` to reach a Redis on the host. If `localhost` fails with ECONNREFUSED, try the explicit IP `127.0.0.1`. The README documents this footgun specifically because it bites people. Where this fits: inspecting cache state during a debug session ('what is the TTL on session:abc123?'), flushing specific keys ('delete every key matching cache:user:*'), or seeding test data. Where it does not: production tooling. The `list` tool runs `KEYS pattern` under the hood, which scans the entire keyspace and can block a busy Redis briefly on large databases. Use a replica or a staging instance instead of pointing this at prod.

Tools included

  • set

    Set a key to a value.

  • get

    Get the value of a key.

  • delete

    Delete one or more keys.

  • list

    List keys matching a pattern.

The authoritative list comes from the server's tools/list at runtime. This catalog entry may lag the upstream until the next ToolPiper release.

Install in ToolPiper

ToolPiper handles the JSON configuration. Click Install, fill in any required tokens, and the server is ready in your chat.

Don't have ToolPiper? We'll take you to the download.

Install in another client

Install in another MCP client (Claude Desktop, Cursor, Continue, Cline)

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json.

{
  "mcpServers": {
    "redis": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-redis",
        "${REDIS_URL}"
      ]
    }
  }
}

Example prompts

  • "List every key matching 'session:*' and tell me how many there are."

  • "Get the value of cache:user:42 and pretty-print it as JSON."

  • "Set rate-limit:test to 10 with a 60-second expiry."

  • "Delete every key matching 'cache:stale:*'."

Security notes

The connection URL contains credentials if your Redis requires them, so treat the config file like a password. The `list` tool runs `KEYS *` patterns, which is O(n) over the keyspace and can stall production Redis briefly on millions of keys. Use a replica or staging instance, not prod. The upstream Anthropic reference is archived; the official Redis-maintained replacement at redis/mcp-redis is broader (streams, pub/sub, modules) and the more durable choice for new installations. The archived server keeps working but does not gain features.

Related tools