Model Context Protocol server for Redis that provides tools for interacting with Redis databases including key-value operations, hashes, lists, JSON documents, and server management
Redis MCP Server provides 20 tools with generally present schemas and descriptions, but significant quality gaps limit production readiness. All tools are explicitly registered via @mcp.tool() decorator in FastMCP. Input schemas are visible for all tools with type declarations. However, descriptions vary widely in quality and depth. Error handling is present but generic (returns string error messages rather than structured guidance). Missing tool annotations (readOnlyHint, destructiveHint) despite clear semantic distinctions (READ_ONLY vs WRITE vs DESTRUCTIVE marked in tool metadata). Parameter descriptions are inconsistent, some tools have detailed parameter descriptions (info, hset), others minimal (dbsize, client_list). Output schemas are undocumented in code; LLMs must infer return types from tool names and descriptions alone. No pagination support despite list-returning tools. Security: no apparent credential injection or rate limiting visible in code.
Get a list of connected clients to the Redis server.
Get the number of keys stored in the Redis database
Retrieve a vector from a Redis hash and convert it back from binary blob. Args: name: The Redis hash key. vector_field: The field name inside the hash. Unless specifically required, use the default field name Returns: The vector as a list of floats, or an error message if retrieval fails.
Delete a field from a Redis hash. Args: name: The Redis hash key. key: The field name inside the hash. Returns: A success message or an error message.
Check if a field exists in a Redis hash. Args: name: The Redis hash key. key: The field name inside the hash. Returns: True if the field exists, False otherwise.
Get the value of a field in a Redis hash. Args: name: The Redis hash key. key: The field name inside the hash. Returns: The field value or an error message.
Missing tool annotations: Tools clearly marked with Risk levels (READ_ONLY, WRITE, DESTRUCTIVE) in metadata but no corresponding readOnlyHint, destructiveHint, or idempotentHint annotations in MCP schema. This prevents clients from applying safety policies (e.g., warning before destructive ops).
Undocumented output schemas: No tool documents its return type structure. LLMs must infer: does info() return a dict? A string? client_list() returns 'list' but list of what? lrange() description says 'JSON string containing the list' but actual type is unclear. LLM cannot reliably chain tools without knowing output field names.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 67 | <=2025-11-25 | v2 |
| 2026-03-09 | C | 68 | - | v1 |
Get all fields and values from a Redis hash. Args: name: The Redis hash key. Returns: A dictionary of field-value pairs or an error message.
Set a field in a hash stored at key with an optional expiration time. Args: name: The Redis hash key. key: The field name inside the hash. value: The value to set. expire_seconds: Optional; time in seconds after which the key should expire. Returns: A success message or an error message.
Get Redis server information and statistics. Args: section: The section of the info command (default, memory, cpu, etc.). Returns: A dictionary of server information or an error message.
Delete a JSON value from Redis at a given path. Args: name: The Redis key where the JSON document is stored. path: The JSON path to delete (default: root '$'). Returns: A success message or an error message.
Retrieve a JSON value from Redis at a given path. Args: name: The Redis key where the JSON document is stored. path: The JSON path to retrieve (default: root '$'). Returns: The retrieved JSON value or an error message.
Set a JSON value in Redis at a given path with an optional expiration time. Args: name: The Redis key where the JSON document is stored. path: The JSON path where the value should be set. value: The JSON value to store (as JSON string, or will be auto-converted). expire_seconds: Optional; time in seconds after which the key should expire. Returns: A success message or an error message.
Get the length of a Redis list.
Remove and return the first element from a Redis list.
Push a value onto the left of a Redis list and optionally set an expiration time.
Get elements from a Redis list within a specific range. Returns: str: A JSON string containing the list of elements or an error message.
Remove elements from a Redis list. Args: name: The name of the list count: Number of elements to remove (0 = all, positive = from head, negative = from tail) element: The element value to remove Returns: A string indicating the number of elements removed.
Remove and return the last element from a Redis list.
Push a value onto the right of a Redis list and optionally set an expiration time.
Store a vector as a field in a Redis hash. Args: name: The Redis hash key. vector_field: The field name inside the hash. Unless specifically required, use the default field name vector: The vector (list of numbers) to store in the hash. Returns: True if the vector was successfully stored, False otherwise.
Inconsistent error handling: Tools return plain string error messages ('Error getting database size: {str(e)}') without structured guidance. LLM cannot distinguish retryable errors (timeout) from user errors (invalid key) from permission errors. No pattern like 'Try search_keys() with pattern' to guide recovery.
Minimal descriptions for simple list tools: lpush, rpush, lpop, rpop, llen, client_list, and dbsize have descriptions under 50 characters with no context on when to use them or what they return. Baseline for A+ tools is 194 chars average. These fail to guide LLM selection.
No pagination or result limits: lrange accepts start/stop but no limit parameter. client_list and hgetall have no pagination. Large result sets will bloat context window. Baseline pattern requires page/offset + limit + total_count.
Parameter 'expire' vs 'expire_seconds' inconsistency: lpush/rpush use 'expire' (integer); hset uses 'expire_seconds'. json_set also uses 'expire_seconds'. Inconsistent naming forces LLM to reason about parameter mappings.
Ambiguous vector tool naming: set_vector_in_hash / get_vector_from_hash are compound names that obscure underlying operation (hset with serialization). Should be hset_vector / hget_vector or document clearly that they are wrappers around hash operations.