R
Redis
community
database
Redis database operations and caching microservice server with support for key-value operations, expiration management, and pattern-based key listing.
Redis MCP Server (@gongrzhe/server-redis-mcp@1.0.0)
A Redis Model Context Protocol (MCP) server implementation for interacting with Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Update
62 Redis MCP tools in https://github.com/GongRzhe/REDIS-MCP-Server/tree/redis-plus
Installation & Usage
Installing via Smithery
To install Redis MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @gongrzhe/server-redis-mcp --client claude
Installing Manually
# Using npx with specific version (recommended) npx @gongrzhe/server-redis-mcp@1.0.0 redis://your-redis-host:port # Example: npx @gongrzhe/server-redis-mcp@1.0.0 redis://localhost:6379
Or install globally:
# Install specific version globally npm install -g @gongrzhe/server-redis-mcp@1.0.0 # Run after global installation @gongrzhe/server-redis-mcp redis://your-redis-host:port
Components
Tools
-
set
- Set a Redis key-value pair with optional expiration
- Input:
(string): Redis keykey
(string): Value to storevalue
(number, optional): Expiration time in secondsexpireSeconds
-
get
- Get value by key from Redis
- Input:
(string): Redis key to retrievekey
-
delete
- Delete one or more keys from Redis
- Input:
(string | string[]): Key or array of keys to deletekey
-
list
- List Redis keys matching a pattern
- Input:
(string, optional): Pattern to match keys (default: *)pattern
Configuration
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your
claude_desktop_config.json
:{ "mcpServers": { "redis": { "command": "npx", "args": [ "@gongrzhe/server-redis-mcp@1.0.0", "redis://localhost:6379" ] } } }
Alternatively, you can use the node command directly if you have the package installed:
{ "mcpServers": { "redis": { "command": "node", "args": [ "path/to/build/index.js", "redis://10.1.210.223:6379" ] } } }
Docker Usage
When using Docker:
- For macOS, use
if the Redis server is running on the host networkhost.docker.internal
- Redis URL can be specified as an argument, defaults to "redis://localhost:6379"
{ "mcpServers": { "redis": { "command": "docker", "args": [ "run", "-i", "--rm", "mcp/redis", "redis://host.docker.internal:6379" ] } } }
Development
Building from Source
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
Docker Build
docker build -t mcp/redis .
License
This MCP server is licensed under the ISC License. For more details, please see the LICENSE file in the project repository.
Related Servers
Apache IoTDB
official
MCP Server for [Apache IoTDB](https://github.com/apache/iotdb) database and its tools
View DetailsGreptimeDB
official
Provides AI assistants with a secure and structured way to explore and analyze data in [GreptimeDB](https://github.com/GreptimeTeam/greptimedb).
View Details