Redis is a Databases MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent manage Redis Cloud with natural language. Install in 1 minute with mcpizy install redis.
Databases
Manage Redis Cloud with natural language
Official homepagemcpizy install redisnpx -y @redis/mcp-servergetGet the value of a key
Inputs
keystringrequiredsetSet a key to a value with optional TTL
Inputs
keystringrequiredvaluestringrequiredexnumberoptionaldeleteDelete one or more keys
Inputs
keysstring[]requiredlist_keysMatch keys by pattern (uses SCAN)
Inputs
patternstringoptionalhgetallGet all fields of a hash
Inputs
keystringrequiredinfoGet Redis server info and stats
Works identically across clients. Only the config file path differs.
~/.claude.json{
"mcpServers": {
"redis": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-redis",
"redis://localhost:6379"
]
}
}
}.cursor/mcp.json{
"mcpServers": {
"redis": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-redis",
"redis://localhost:6379"
]
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"redis": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-redis",
"redis://localhost:6379"
]
}
}
}Use a Redis connection URL (rediss:// for TLS)
REDIS_URLPaste any of these prompts into Claude Code, Cursor or another MCP-compatible client.
“Get the value of `session:user:42`”
Uses: get
“Set `rate_limit:api:127.0.0.1` to 100 with a 60s TTL”
Uses: set
“List all keys matching `cache:*` and count them”
Uses: list_keys
“Show me Redis memory and hit/miss stats”
Uses: info
Redis MCP exposes core Redis commands as agent tools: `get`, `set`, `del`, `keys`, `scan`, `hget`, `hset`, `lpush`, `zrange`, `info`. Authentication is a connection string with optional ACL credentials. The MCP is intentionally close to the Redis CLI surface — the agent can do anything you can do in `redis-cli` plus a few convenience wrappers.
We use Redis MCP for two main workflows. First, cache debugging: a user reports stale data, the agent runs `get` against the expected cache key, finds the cached value, and either deletes (forcing refresh) or inspects the TTL. Second, rate-limit triage: many apps store rate-limit counters in Redis with predictable keys (`ratelimit:user:123`); the agent walks them, identifies abusers, and resets counters for false positives. Token cost is the lowest of any DB MCP — most operations return scalars or short lists, ~100-300 tokens per call.
Compared to Postgres MCP for application state, Redis wins for ephemeral data (sessions, caches, rate limits) and loses for anything you'd want to query relationally. Compared to KV stores like Cloudflare KV or AWS DynamoDB, Redis wins on raw speed (sub-millisecond) and richer data types (sorted sets, hashes); the cloud KVs win on managed-service simplicity. The honest trade-off: `KEYS` is O(N) and dangerous on production Redis; the MCP exposes it, but agents that habitually run `KEYS *` on a 10M-key DB will freeze the server. Prefer `SCAN` in cursored loops.
`KEYS *` is the most common foot-gun. On production with millions of keys, `KEYS` blocks Redis until it completes — potentially seconds to minutes — and locks out every other client. Have the system prompt explicitly forbid `KEYS` and prefer `SCAN`.
Redis Cluster (multi-shard) does not support multi-key commands across shards. `MGET key1 key2 key3` will fail with `CROSSSLOT` if the keys are on different shards. The agent has to either pin keys to the same hash slot (`{user:123}:field`) or call `GET` per key.
TTLs are not preserved across `SET` operations unless you pass `KEEPTTL`. Agents often overwrite values with a fresh `SET` and accidentally remove the expiration, turning a cache into a permanent store. Pin this.
`info` returns a large multi-section text blob. The agent will sometimes try to parse it all when asked about a single metric; better to filter with `info <section>` (e.g. `info memory`).
Honest pros/cons against the closest databases MCP servers.
| Server | Strengths | Trade-offs |
|---|---|---|
| Memcached MCP (community) | Simpler, lighter — pure key/value caching | No data structures beyond strings, no persistence |
| Cloudflare KV MCP | Managed, globally replicated, no infra | Higher latency (~50ms), no sorted sets / hashes |
| DynamoDB MCP (community) | Full managed AWS, durable | Higher latency, different mental model (item-based) |
If Redis doesn't fit your stack, these Databases MCP servers solve similar problems.
The Redis MCP server is an Databases Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents manage Redis Cloud with natural language. It exposes Redis's capabilities as tools the AI can call directly from your editor or CLI.
The fastest way is the MCPizy CLI: run `mcpizy install redis` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y @redis/mcp-server` and restarting Claude Code.
Yes. The Redis MCP server is free and open source (see the GitHub repository linked on this page). You may still need a Redis account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.
Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.
Once installed, your AI agent can manage Redis Cloud with natural language directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run Redis operations, inspect results, chain Redis with other MCP servers (see our Workflow Recipes), and automate repetitive databases tasks without leaving your editor.