Redis MCP server
Last verified: 2026-09
Get and set keys in Redis.
Official reference Databases & data Needs a secret Claude Desktop, Cursor, Windsurf, Claude Code, VS Code
What it does
Get and set keys in a Redis instance. Useful for inspecting a cache. A FLUSHDB-capable connection is a production outage waiting for a bad tool call.
It sits in Databases & data: A database MCP is SQL or an API with your credentials.
Good for
- Get a cache key the app is supposedly setting.
- See whether a session or rate-limit key exists.
- Debug a queue length without redis-cli.
- Set a key only on a disposable Redis, never prod.
Tools
- get / set / list keys — Read and write the keyspace the URL can see.
Config (Claude Desktop / Cursor / Windsurf)
Paste the JSON below. Same mcpServers shape. Replace placeholder paths and secrets.
Windows paths look like C:\\Users\\you\\project, not /path/to.
Host-side steps →
Claude Desktop
| OS | Config file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json
(usually C:\Users\<you>\AppData\Roaming\Claude\) |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Cursor
| Scope | macOS / Linux | Windows |
|---|---|---|
| This project | .cursor/mcp.json in the repo root | |
| This user | ~/.cursor/mcp.json |
%USERPROFILE%\.cursor\mcp.json |
Windsurf
| OS | Config file |
|---|---|
| macOS / Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
{
"mcpServers": {
"redis": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-redis",
"redis://localhost:6379"
]
}
}
}
Windsurf remote MCP: use serverUrl instead of url if the block below is HTTP.
One-liner: npx -y @modelcontextprotocol/server-redis redis://localhost:6379
Secrets it wants: REDIS_URL
How to get started
- Use a Redis ACL user that cannot FLUSHALL / CONFIG.
- Point the URL at a dev instance first.
- Ask the model to GET a known key before you let it SET.
Access risk
SET and flush operations are destructive. Network-exposed Redis without a password is worse.
When to skip it
Skip it unless you actually debug Redis. Do not attach prod Redis to a general-purpose chat.
Instead: PostgreSQL, Filesystem.
Vs alternatives
| Server | Official? | Needs a secret? | Best for |
|---|---|---|---|
| Redis | Yes | Yes | Get and set keys in Redis. |
| PostgreSQL | Yes | Yes | Run SQL against a Postgres database. |
| Filesystem | Yes | No | Read and write files inside a folder you choose. |
More in Databases & data
FAQ
Is Redis just get/set?
The official server is a thin key surface. It is not RedisInsight.
What if I point it at prod?
FLUSHDB and key deletes are one confused prompt away if the URL allows writes. Use a replica or a local instance.
URL in the args?
Yes — redis://... after the package name. That URL is a secret.
Redis or Postgres?
Cache/session vs relational. Different data.