Redis Database Service MCP Integration
Provides a natural language interaction interface for Redis databases via the MCP protocol, supporting AI agents in efficiently managing and searching Redis data.
Go to CloudBase Platform to run MCP Server
Environment Variables
- REDIS_HOST - Redis database server address (default: localhost)
- REDIS_PORT - Redis database port number (default: 6379)
- REDIS_USERNAME - Redis username (optional)
- REDIS_PWD - Redis password (optional)
- REDIS_SSL - Whether to enable SSL/TLS (default: false)
- REDIS_CA_PATH - SSL certificate path (required when SSL is enabled)
- REDIS_CLUSTER_MODE - Whether cluster mode is enabled (default: false)
🗺️ Feature List
String Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
string_set | Set a string value (with expiration support) | key (key name), value (value), optional expiration (expiration time-seconds) |
string_get | Get the string value | key (key name) |
Hash Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
hash_set | Set a hash field value | key (hash key), field (field name), value (field value) |
hash_get | Get the value of a specified hash field | key (hash key), field (field name) |
hash_get_all | Get all fields and values of a hash | key (hash key) |
hash_delete | Delete the specified hash field | key (hash key), field (field name) |
List Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
list_push | Add elements to a list | key (list key), values (array of values), optional direction (left/right) |
list_pop | Pop an element from a list | key (list key), optional direction (left/right) |
list_range | Get a range of elements from a list | key (list key), start (start index), stop (end index) |
Collection Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
set_add | Add members to a set | key (set key), members (array of members to add) |
set_remove | Remove members from a set | key (set key), members (array of members to remove) |
set_members | Get all members of a set | key (set key) |
set_is_member | Check if a member is in a set | key (set key), member (member) |
Sorted Set Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
sorted_set_add | Add members to a sorted set | key (set key), members (array of objects containing score and member ) |
sorted_set_range | Get sorted set members by index range | key (set key), start (start index), stop (end index), optional with_scores |
sorted_set_range_by_score | Get sorted set members by score range | key (set key), min (minimum score), max (maximum score), optional with_scores |
sorted_set_remove | Remove members from a sorted set | key (sorted set key), members (array of members to remove) |
Stream Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
stream_add | Add an entry to a stream | key (stream key), fields (object of field-value pairs), optional id (entry ID) |
stream_read | Read entries from a stream | streams (object of stream keys and starting IDs), optional count (number of entries to read) |
stream_delete | Delete entries from a stream | key (stream key), ids (array of entry IDs to delete) |
Pub/Sub Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
publish | Publish a message to a channel | channel (channel name), message (message content) |
JSON Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
json_set | Set a JSON document | key (key name), path (JSON path), value (JSON value) |
json_get | Get a JSON document or path value | key (key name), optional path (JSON path) |
json_delete | Delete the specified path in a JSON document | key (key name), path (JSON path) |
General Operations
Tool Identifier | Function Description | Core Parameters |
---|---|---|
key_delete | Delete keys | keys (array of keys to delete) |
key_exists | Check if a key exists | key (key name) |
key_expire | Set key expiration time | key (key name), seconds (expiration time-seconds) |
scan_keys | Scan Redis keys matching a pattern | pattern (matching pattern), optional count (number of keys returned per iteration) |
Repository URL
https://github.com/redis/mcp-redis