redis-mcp
Provides tools for interacting with a Redis server, enabling AI agents to get and set string keys, scan and inspect keys, retrieve server info, delete keys via UNLINK with confirmation, set expiration, and flush the current database with a confirm phrase.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@redis-mcpshow me the value for key 'user:123'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
redis-mcp
A safe, connection-efficient Redis MCP server.
Design goals
No accidental data loss. Destructive tools (
redis_delete,redis_expire,redis_flushdb) refuse to run unless called withconfirm=true— the tool description instructs the AI to ask the user first.redis_flushdbadditionally requires the literal phraseconfirm_phrase="FLUSH ALL DATA".redis_setrefuses to overwrite an existing key unlessoverwrite=true.Gentle on the Redis server.
One lazy, reused connection per MCP process (
lazyConnect) — no connection churn, no pool needed since stdio MCP calls are sequential.SCANwith cursor + result limits instead ofKEYS(never blocks the server).UNLINKinstead ofDELandFLUSHDB ASYNC— deletes happen in a background thread on the Redis side.Collection reads are truncated to 200 elements.
Related MCP server: mcp-database
Tools
Tool | Description | Destructive? |
| Get a string key | no |
| List keys by pattern (SCAN, limited) | no |
| Type + TTL + value for any key type | no |
| Server INFO (memory, stats, keyspace, …) | no |
| Set a string key (won't overwrite without | no |
| Delete keys via UNLINK | requires |
| Set a key's TTL | requires |
| Wipe the current DB | requires |
Requirements
Node.js ≥ 18
A reachable Redis server
Install
git clone <this-repo> redis-mcp
cd redis-mcp
npm installConfiguration is a single env var:
REDIS_URL— defaultredis://127.0.0.1:6379. Examples:redis://user:pass@host:6379/2,rediss://host:6380(TLS).
Run manually to verify: REDIS_URL=redis://127.0.0.1:6379 node src/index.js (it prints [redis-mcp] ready on stderr).
In all snippets below, replace /absolute/path/to/redis-mcp with where you cloned it.
Claude Code
claude mcp add redis --env REDIS_URL=redis://127.0.0.1:6379 -- node /absolute/path/to/redis-mcp/src/index.jsOr add to .mcp.json in your project (or ~/.claude.json for global):
{
"mcpServers": {
"redis": {
"command": "node",
"args": ["/absolute/path/to/redis-mcp/src/index.js"],
"env": { "REDIS_URL": "redis://127.0.0.1:6379" }
}
}
}Claude Desktop
Add the same mcpServers block to claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json).
Codex (OpenAI Codex CLI)
Add to ~/.codex/config.toml:
[mcp_servers.redis]
command = "node"
args = ["/absolute/path/to/redis-mcp/src/index.js"]
env = { REDIS_URL = "redis://127.0.0.1:6379" }OpenCode
Add to opencode.json (project) or ~/.config/opencode/opencode.json (global):
{
"mcp": {
"redis": {
"type": "local",
"command": ["node", "/absolute/path/to/redis-mcp/src/index.js"],
"environment": { "REDIS_URL": "redis://127.0.0.1:6379" },
"enabled": true
}
}
}Kilo Code
Settings → MCP Servers → Edit MCP Settings (mcp_settings.json), or .kilocode/mcp.json in your project:
{
"mcpServers": {
"redis": {
"command": "node",
"args": ["/absolute/path/to/redis-mcp/src/index.js"],
"env": { "REDIS_URL": "redis://127.0.0.1:6379" }
}
}
}Antigravity (Google)
Agent panel → MCP servers (⚙) → Manage MCP Servers → View raw config (mcp_config.json):
{
"mcpServers": {
"redis": {
"command": "node",
"args": ["/absolute/path/to/redis-mcp/src/index.js"],
"env": { "REDIS_URL": "redis://127.0.0.1:6379" }
}
}
}Safety model
The AI calls a destructive tool without
confirm→ the server refuses and returns a message telling the AI to ask the user first, listing exactly what would be deleted.The user explicitly approves.
The AI retries with
confirm=true(and the confirm phrase for flush).
The gate lives in the server, so it holds even if the client/AI forgets to ask.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseBqualityAmaintenanceThe official Redis MCP Server is a natural language interface designed for agentic applications to efficiently manage and search data in Redis.Last updated53558MIT- Alicense-qualityDmaintenanceMCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.Last updated1MIT
- Alicense-qualityDmaintenanceMCP server for Redis with data operations, permission control, and operation logging. Supports key management, dynamic tool lists, and auto-reconnection.Last updated53MIT
- AlicenseBqualityCmaintenanceRead-only Redis MCP server with a configurable command allowlist for safe production diagnostics, enabling exact read-only subcommands like CLIENT LIST and SLOWLOG GET.Last updated5MIT
Related MCP Connectors
MCP server for managing Prisma Postgres.
An MCP server for deep research or task groups
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wahyuakbarwibowo/redis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server