MCP Recipe
Inspect Redis keys before mutating
Influzer starter recipe: connect Redis MCP to a non-production instance, survey key patterns and TTLs first, then ask for a safe read — before any SET/DEL/FLUSH.
MCP servers used
Compatible clients (author-reported, not verified by Influzer): Cursor, Claude Code, Claude Desktop
Prerequisites
- Redis reachable from your machine (prefer local/staging)
uvxavailable forredis-mcp-server- Connection URL only in MCP config — never in the chat
- Prefer a read-limited Redis ACL user
Required permissions
Redis MCP can read and write keys depending on the ACL. Point it at staging. Never run FLUSHALL/FLUSHDB. Secrets and session tokens in Redis are sensitive — do not dump values into public channels.
Setup
Install the official Redis MCP (redis-mcp-server via uvx). Put the real Redis URL only in local MCP config or env. Use a staging instance and a restricted ACL when possible.
{
"mcpServers": {
"redis": {
"command": "uvx",
"args": [
"--from",
"redis-mcp-server@latest",
"redis-mcp-server",
"--url",
"redis://127.0.0.1:6379/0"
]
}
}
}
Using Redis MCP against my staging instance, summarize the main key patterns (e.g. session:*, cache:*) and typical TTLs.
Then propose a read-only plan to inspect one cache key and one session key metadata (type + TTL) without printing secrets.
Do not run SET/DEL/FLUSHALL/FLUSHDB or overwrite keys unless I explicitly approve afterward.
Expected result
A keyspace overview (patterns + sample TTLs) and a proposed read-only inspection plan — no destructive commands.
Sample output
Patterns: session:, cache:product:, lock:checkout:*
session:* ~12k keys, TTL ~1800s
Next: GET one cache:product:* sample; do not DEL or FLUSH.
Troubleshooting
uvxmissing: install uv, or follow https://github.com/redis/mcp-redis install docs- Connection refused: check host/port/TLS (
rediss://) and ACL user - Stdio only — not usable from ChatGPT’s remote-only MCP path