Set a Redis key-value pair with optional expiration
Get value by key from Redis
Delete one or more keys from Redis
List Redis keys matching a pattern
Redis Database Manager provides a standardized interface for LLMs to interact with Redis key-value stores. This implementation enables AI assistants to perform common Redis operations like setting values, retrieving data, deleting keys, and listing database contents. With this tool, developers can seamlessly integrate Redis database operations into their AI workflows, allowing for persistent storage and retrieval of information across sessions. The server supports optional expiration times for stored values and pattern matching for key retrieval.
You can install the Redis Database Manager in several ways:
The easiest way to install is via Smithery:
npx -y @smithery/cli install @gongrzhe/server-redis-mcp --client claude
You can run the server directly with npx:
npx @gongrzhe/server-redis-mcp@1.0.0 redis://your-redis-host:port
For example:
npx @gongrzhe/server-redis-mcp@1.0.0 redis://localhost:6379
Alternatively, you can install the package globally:
npm install -g @gongrzhe/server-redis-mcp@1.0.0
Then run it:
@gongrzhe/server-redis-mcp redis://your-redis-host:port
To use this server with Claude Desktop, add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"redis": {
"command": "npx",
"args": [
"@gongrzhe/server-redis-mcp@1.0.0",
"redis://localhost:6379"
]
}
}
}
Replace redis://localhost:6379
with your Redis server URL.
If you're using Docker, you can configure it as follows:
{
"mcpServers": {
"redis": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/redis",
"redis://host.docker.internal:6379"
]
}
}
}
Note: For macOS, use host.docker.internal
if the Redis server is running on the host network.
If you want to build the server from source:
npm install
npm run build
To build a Docker image:
docker build -t mcp/redis .
The Redis Database Manager supports a variety of Redis operations through its tools. You can use these tools to store data persistently, retrieve information, and manage your Redis database directly through AI interactions.
For more advanced Redis functionality, check out the extended version with 62 Redis tools at: https://github.com/GongRzhe/REDIS-MCP-Server/tree/redis-plus