redis-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| REDIS_URL | Yes | Redis connection string, e.g. redis://:pass@host:6379/0 or rediss://... for TLS. | |
| ALLOW_WRITES | No | Set to '1' or 'true' to permit curated mutating commands via redis_command. Arbitrary-execution commands stay blocked regardless. | |
| REDIS_MAX_KEYS | No | Cap on keys returned by a single scan, and on collection elements returned by redis_get. | 1000 |
| REDIS_SCAN_COUNT | No | COUNT hint per SCAN iteration. | 100 |
| REDIS_COMMAND_TIMEOUT_MS | No | Per-command timeout in milliseconds. | 10000 |
| REDIS_CONNECT_TIMEOUT_MS | No | TCP connect timeout in milliseconds. | 10000 |
| REDIS_TLS_REJECT_UNAUTHORIZED | No | Set to 'false' to skip TLS cert verification for managed Redis using private-CA certs. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-first Redis / Valkey explorer. Every tool is read-only unless the server was started with ALLOW_WRITES=1, which unlocks only curated mutating commands through redis_command; EVAL, MULTI, MONITOR, CLUSTER and other arbitrary-execution commands stay blocked either way. Start with redis_health (no arguments needed) to check connectivity and get memory, eviction, hit rate, persistence and the recent slow commands in one call. To find keys use redis_scan and resume with the cursor it returns; never ask redis_command for KEYS, which is blocked. Before reading a key of unknown size, call redis_key_info (type, TTL, encoding, memory) and then redis_get, which windows large values and collections. For 'what should I worry about on this instance', use redis_advisor. For slow commands alone, redis_slowlog. For any other single command, redis_command.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| redis_scanA | Enumerate keys with cursor-based SCAN -- NEVER the O(N) KEYS command, so this is safe to run against a production instance with millions of keys (SCAN yields the event loop between batches). Returns up to REDIS_MAX_KEYS keys (default 1000) matching an optional glob |
| redis_key_infoA | Inspect a single key without reading its (possibly huge) value: type, TTL (seconds and ms, -1 = no expiry, -2 = key missing), internal encoding ( |
| redis_getA | Read a key's value, dispatching by type so you get the right shape without knowing the type in advance: string -> the value (byte-windowed at REDIS_MAX_VALUE_BYTES, default 256 KiB, with |
| redis_commandA | Run a single Redis command through the safety gate. Read-only commands (GET, HGETALL, LRANGE, TYPE, TTL, INFO, ...) always run. Mutating commands (SET, DEL, EXPIRE, HSET, ...) require ALLOW_WRITES=1. KEYS is blocked (use redis_scan). Arbitrary-execution commands (EVAL, FUNCTION, SCRIPT, MULTI, MONITOR, SHUTDOWN, CLUSTER, ...) are never exposed, even with ALLOW_WRITES=1 -- the gate is a curated allowlist, not a blanket 'anything when writes are on'. Use this for commands without a dedicated tool; prefer the typed tools (redis_get, redis_scan, redis_key_info) where they exist. |
| redis_healthA | One-call health snapshot rolled up from INFO + DBSIZE + recent SLOWLOG: server version and mode, uptime, memory used vs maxmemory + eviction policy, connected clients + blocked clients, ops/sec, keyspace hit/miss ratio, total keys per database (and how many lack a TTL), persistence (RDB/AOF) status, replication role, and the most recent slow commands. Use as a connection sanity check and the first stop in 'why is Redis slow / using so much memory?' triage. |
| redis_slowlogA | Recent entries from the Redis slow log -- commands that took longer than |
| redis_advisorA | Rolled-up Redis health lint pass -- one call returns four categories of findings, each with a severity and an actionable fix:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
The core read path is clearly separated: redis_key_info (metadata), redis_get (typed value), and redis_scan (enumeration) have distinct, well-bounded purposes, and redis_command explicitly tells agents to prefer the typed tools. The only real overlap is the health cluster — redis_health, redis_advisor, and redis_slowlog all surface memory/eviction/slow-command data (health even includes 'recent slow commands'), so an agent may hesitate between health and advisor for a triage start.
All seven tools share a uniform `redis_` snake_case prefix, which makes the set instantly recognizable. The suffix convention is slightly mixed (verb-based redis_get/redis_scan/redis_command vs noun-based redis_key_info/redis_health/redis_slowlog/redis_advisor), but each name is still readable and predictable.
Seven tools is a tight, well-scoped surface for a Redis inspection server: read, inspect, enumerate, health, advisor, slowlog, plus a gated escape hatch. Nothing feels redundant in count and each tool has an identifiable job.
Read-side coverage is excellent (values, metadata, scanning, health, slowlog, lint pass) and the write gap is deliberately handled by redis_command behind ALLOW_WRITES. Minor gaps: no dedicated mutate/delete tool for common write workflows, and SLOWLOG RESET is intentionally withheld, so an agent doing writes must fall back to the generic command tool.