Redis MCP Server
Provides tools for connecting to any Redis instance and executing a wide range of Redis commands, including string, hash, list, set, and sorted set operations, as well as key management and database administration.
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 MCP Serverget the value of 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 Server
A Model Context Protocol (MCP) server for Redis. Connect to any Redis instance and execute queries through AI assistants.
Features
🔌 Connect to any Redis instance - Local or remote, with authentication and TLS support
🛠️ 30+ Built-in Tools - Complete Redis operations including strings, hashes, lists, sets, sorted sets
🔒 Command Blacklist - Block dangerous commands (FLUSHALL, SHUTDOWN, etc.)
💾 Connection Management - Save and switch between multiple Redis connections
🌐 Web UI - Browser-based management interface
🔐 Password Encryption - AES-256-GCM encryption for saved passwords
Related MCP server: Redash MCP Server
Screenshots





Installation
1. Clone the repository
git clone https://github.com/minivv/redis-mcp-server.git
cd redis-mcp-server2. Install dependencies and build
npm install
npm run build3. Configure MCP Client
Add to your Claude Desktop, Cursor, or other MCP client configuration:
{
"mcpServers": {
"redis-mcp-server": {
"type": "stdio",
"command": "node",
"args": [
"/your/path/to/redis-mcp-server/build/index.js"
],
"env": {
"MCP_OPEN_BROWSER": "false",
"REDIS_HOST": "127.0.0.1",
"REDIS_PORT": "6379",
"REDIS_PASSWORD": "",
"REDIS_DB": "0"
}
}
}
}⚠️ 注意: 请将
args中的路径/your/path/to/redis-mcp-server/build/index.js改为你本机实际的项目路径,例如/Users/yourname/projects/redis-mcp-server/build/index.js。
Environment Variables
Variable | Default | Description |
|
| Redis host |
|
| Redis port |
| - | Redis password |
|
| Database number (0-15) |
| - | Redis username (for ACL) |
|
| Use TLS connection |
|
| Web UI port |
|
| Auto-open browser on start |
Available Tools
Connection Management
Tool | Description |
| Get current Redis connection details |
| List all saved Redis connections |
| Save a Redis connection configuration |
| Switch to a saved Redis connection |
| Delete a saved Redis connection |
| Test a Redis connection by sending PING |
Query Execution
Tool | Description |
| Execute any Redis command (with blacklist check) |
| Execute read-only Redis commands only |
Key Operations
Tool | Description |
| List keys matching a pattern |
| Get detailed information about a key |
| Delete one or more keys |
| Rename a key |
| Set expiration time for a key |
| Get remaining TTL for a key |
String Operations
Tool | Description |
| Get the value of a string key |
| Set the value of a string key (with optional TTL) |
Hash Operations
Tool | Description |
| Get all or specific fields of a hash |
| Set fields in a hash |
List Operations
Tool | Description |
| Get elements from a list by range |
| Push elements to a list (left or right) |
Set Operations
Tool | Description |
| Get all members of a set |
| Add members to a set |
Sorted Set Operations
Tool | Description |
| Get members from a sorted set |
| Add members with scores to a sorted set |
Database Operations
Tool | Description |
| Select a Redis database (0-15) |
| Get the number of keys in the current database |
| Get Redis server information |
Blacklist Management
Tool | Description |
| Get the current command blacklist configuration |
| Update the command blacklist configuration |
| Reset command blacklist to default patterns |
Command Blacklist
By default, the following commands are blocked:
FLUSHALL- Flush all databasesFLUSHDB- Flush current databaseSHUTDOWN- Shutdown Redis serverDEBUG SEGFAULT- Debug segfaultCONFIG SET- Change Redis configCONFIG REWRITE- Rewrite Redis configSLAVEOF- Set replicationREPLICAOF- Set replicationCLUSTER *- Cluster commandsRESET- Reset connection
You can customize the blacklist through the Web UI or using the update_command_blacklist tool.
Web UI
The Web UI provides a browser-based interface for:
Managing Redis connections
Testing connections
Managing the command blacklist
Testing commands against the blacklist
Access it at http://localhost:3457 (default port).
Configuration Storage
All configuration is stored in ~/.redis-mcp/:
connections.json- Saved connectionscommand-blacklist.json- Command blacklist rules.key- Encryption key for passwords
Security
Passwords are encrypted using AES-256-GCM
Dangerous commands are blocked by default
The encryption key is stored with restricted permissions (0600)
License
MIT
Maintenance
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/minivv/redis-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server