redis/mcp-redis
The official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
d66c5ea0172eredis-mcp-server0.5.1 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 2 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- 2 tools, prompts and resources registered only in the repository's tests are not counted on this page
Top risks in plain words
- HIGHTool
hybrid_searchruns SQL by design: an agent steered by prompt injection can use it that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Connect it with a read-only database user
hybrid_searchcan run any query it is given. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
hybrid_search, switch them off. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 53 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
None of the tools reaches any of these in the code the scanner could trace.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (53: 53 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
hybrid_searchtool Perform a hybrid search combining a Redis filter expression with KNN vector similarity.Runs SQL
Perform a hybrid search combining a Redis filter expression with KNN vector similarity.
Hybrid search pre-filters documents by metadata before ranking by vector similarity —
the standard pattern for production RAG and semantic search pipelines.
Filter expression examples:
"*" → no filter, pure vector search (same as vector_search_hash)
"@category:{news}" → tag filter
"@year:[2020 2024]" → numeric range
"@lang:{en} @year:[2022 +inf]" → combined tag + range
"@title:redis" → full-text match on a text field
Full filter syntax: https://redis.io/docs/latest/develop/interact/search-and-query/query/
Args:
query_vector: List of floats to use as the query vector.
filter_expression: Redis filter expression to restrict candidates before KNN ranking.
Defaults to '*' (no filter).
index_name: Name of the Redis index (default: 'vector_index').
vector_field: Name of the indexed vector field (default: 'vector').
k: Number of nearest neighbors to return.
return_fields: Additional fields to include in results (optional).
Returns:
A list of matched documents with their similarity score, or an error message.client_listtool Get a list of connected clients to the Redis server.
Get a list of connected clients to the Redis server.
create_vector_index_hashtool Create a Redis 8 vector similarity index using HNSW on a Redis hash.
Create a Redis 8 vector similarity index using HNSW on a Redis hash.
This function sets up a Redis index for approximate nearest neighbor (ANN)
search using the HNSW algorithm and float32 vector embeddings.
Args:
index_name: The name of the Redis index to create. Unless specifically required, use the default name for the index.
prefix: The key prefix used to identify documents to index (e.g., 'doc:'). Unless specifically required, use the default prefix.
vector_field: The name of the vector field to be indexed for similarity search. Unless specifically required, use the default field name
dim: The dimensionality of the vectors stored under the vector_field.
distance_metric: The distance function to use (e.g., 'COSINE', 'L2', 'IP').
Returns:
A string indicating whether the index was created successfully or an error message.dbsizetool Get the number of keys stored in the Redis database
Get the number of keys stored in the Redis database
deletetool Delete a Redis key.
Delete a Redis key.
Args:
key (str): The key to delete.
Returns:
str: Confirmation message or an error message.expiretool Set an expiration time for a Redis key.
Set an expiration time for a Redis key.
Args:
name: The Redis key.
expire_seconds: Time in seconds after which the key should expire.
Returns:
A success message or an error message.gettool Get a Redis string value.
Get a Redis string value.
Args:
key (str): The key to retrieve.
Returns:
str, bytes: The stored value or an error message.get_index_infotool Retrieve schema and information about a specific Redis index using FT.INFO.
Retrieve schema and information about a specific Redis index using FT.INFO.
Args:
index_name (str): The name of the index to retrieve information about.
Returns:
str: Information about the specified index or an error message.get_indexed_keys_numbertool Retrieve the number of indexed keys by the index
Retrieve the number of indexed keys by the index
Args:
index_name (str): The name of the index to retrieve information about.
Returns:
str: Number of indexed keys as a stringget_indexestool List of indexes in the Redis database
List of indexes in the Redis database
Returns:
str: A JSON string containing the list of indexes or an error message.get_vector_from_hashtool Retrieve a vector from a Redis hash and convert it back from binary blob.
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.hdeltool Delete a field from a Redis hash.
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.hexiststool Check if a field exists in a Redis hash.
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.hgettool Get the value of a field in a Redis hash.
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.hgetalltool Get all fields and values from a Redis hash.
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.hsettool Set a field in a hash stored at key with an optional expiration time.
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.infotool Get Redis server information and statistics.
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.json_deltool Delete a JSON value from Redis at a given path.
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.json_gettool Retrieve a JSON value from Redis at a given path.
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.json_settool Set a JSON value in Redis at a given path with an optional expiration time.
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.llentool Get the length of a Redis list.
Get the length of a Redis list.
lpoptool Remove and return the first element from a Redis list.
Remove and return the first element from a Redis list.
lpushtool Push one or more values onto the left of a Redis list and optionally set an expiration time.
Push one or more values onto the left of a Redis list and optionally set an expiration time.
Args:
name: The name of the list
value: A single value, or a list of values pushed in one LPUSH call.
Values are inserted one after another at the head, so [a, b, c]
results in the list starting with c, b, a.
expire: Optional expiration time in seconds
Returns:
A string confirming the push, including the new list length.lrangetool Get elements from a Redis list within a specific range.
Get elements from a Redis list within a specific range.
Returns:
str: A JSON string containing the list of elements or an error message.lremtool Remove elements from a Redis list.
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.psubscribetool Subscribe to Redis channels using a pattern.
Subscribe to Redis channels using a pattern.
Args:
pattern: The Redis channel pattern to subscribe to.
Returns:
A dictionary containing the subscription ID or an error message.publishtool Publish a message to a Redis channel.
Publish a message to a Redis channel.
Args:
channel: The Redis channel to publish to.
message: The message to send.
Returns:
A success message or an error message.read_messagestool Read pending pub/sub messages for an existing subscription.
Read pending pub/sub messages for an existing subscription.
Args:
subscription_id: The ID returned by subscribe() or psubscribe().
timeout_ms: Time to wait for messages in milliseconds. Use 0 for non-blocking.
max_messages: Maximum number of messages to return in one call.
Returns:
A dictionary containing the collected messages or an error message.renametool Renames a Redis key from old_key to new_key.
Renames a Redis key from old_key to new_key.
Args:
old_key (str): The current name of the Redis key to rename.
new_key (str): The new name to assign to the key.
Returns:
Dict[str, Any]: A dictionary containing the result of the operation.
On success: {"status": "success", "message": "..."}
On error: {"error": "..."}rpoptool Remove and return the last element from a Redis list.
Remove and return the last element from a Redis list.
rpushtool Push one or more values onto the right of a Redis list and optionally set an expiration time.
Push one or more values onto the right of a Redis list and optionally set an expiration time.
Args:
name: The name of the list
value: A single value, or a list of values pushed in one RPUSH call
expire: Optional expiration time in seconds
Returns:
A string confirming the push, including the new list length.saddtool Add a value to a Redis set with an optional expiration time.
Add a value to a Redis set with an optional expiration time.
Args:
name: The Redis set key.
value: The value to add to the set.
expire_seconds: Optional; time in seconds after which the set should expire.
Returns:
A success message or an error message.scan_all_keystool Scan and return ALL keys matching a pattern using multiple SCAN iterations.
Scan and return ALL keys matching a pattern using multiple SCAN iterations.
This function automatically handles the SCAN cursor iteration to collect all matching keys.
It's safer than KEYS * for large databases but will still collect all results in memory.
⚠️ WARNING: With very large datasets (millions of keys), this may consume significant memory.
For large-scale operations, consider using scan_keys() with manual iteration instead.
Args:
pattern: Pattern to match keys against (default is "*" for all keys).
batch_size: Number of keys to scan per iteration (default 100).
Returns:
A list of all keys matching the pattern or an error message.scan_keystool Scan keys in the Redis database using the SCAN command (non-blocking, production-safe).
Scan keys in the Redis database using the SCAN command (non-blocking, production-safe).
⚠️ IMPORTANT: This returns PARTIAL results from one iteration. Use scan_all_keys()
to get ALL matching keys, or call this function multiple times with the returned cursor
until cursor becomes 0.
The SCAN command iterates through the keyspace in small chunks, making it safe to use
on large databases without blocking other operations.
Args:
pattern: Pattern to match keys against (default is "*" for all keys).
Common patterns: "user:*", "cache:*", "*:123", etc.
count: Hint for the number of keys to return per iteration (default 100).
Redis may return more or fewer keys than this hint.
cursor: The cursor position to start scanning from (0 to start from beginning).
To continue scanning, use the cursor value returned from previous call.
Returns:
A dictionary containing:
- 'cursor': Next cursor position (0 means scan is complete)
- 'keys': List of keys found in this iteration (PARTIAL RESULTS)
- 'total_scanned': Number of keys returned in this batch
- 'scan_complete': Boolean indicating if scan is finished
Or an error message if something goes wrong.
Example usage:
First call: scan_keys("user:*") -> returns cursor=1234, keys=[...], scan_complete=False
Next call: scan_keys("user:*", cursor=1234) -> continues from where it left off
Final call: returns cursor=0, scan_complete=True when donesearch_redis_documentstool Search Redis documentation and knowledge base to learn about Redis concepts and use cases.
Search Redis documentation and knowledge base to learn about Redis concepts and use cases.
This tool exposes updated and curated documentation, and must be invoked every time the user wants to learn more in areas including:
**Common Use Cases:**
- Session Management: User session storage and management
- Caching: Application-level and database query caching
- Rate Limiting: API throttling and request limiting
- Leaderboards: Gaming and ranking systems
- Semantic Search: AI-powered similarity search
- Agentic Workflows: AI agent state and memory management
- RAG (Retrieval-Augmented Generation): Vector storage for AI applications
- Real-time Analytics: Counters, metrics, and time-series data
- Message Queues: Task queues and job processing
- Geospatial: Location-based queries and proximity search
Args:
question: The question about Redis concepts, data structures, features, or use cases
Returns:
Union[List[Dict[str, Any]], Dict[str, Any]]: A list of documentation results from the API, or a dict with an error message.settool Set a Redis string value with an optional expiration time.
Set a Redis string value with an optional expiration time.
Args:
key (str): The key to set.
value (str, bytes, int, float, dict): The value to store.
expiration (int, optional): Expiration time in seconds.
Returns:
str: Confirmation message or an error message.set_vector_in_hashtool Store a vector as a field in a Redis hash.
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.smemberstool Get all members of a Redis set.
Get all members of a Redis set.
Args:
name: The Redis set key.
Returns:
A list of values in the set or an error message.sremtool Remove a value from a Redis set.
Remove a value from a Redis set.
Args:
name: The Redis set key.
value: The value to remove from the set.
Returns:
A success message or an error message.subscribetool Subscribe to a Redis channel and return a reusable subscription handle.
Subscribe to a Redis channel and return a reusable subscription handle.
Args:
channel: The Redis channel to subscribe to.
Returns:
A dictionary containing the subscription ID or an error message.typetool Returns the string representation of the type of the value stored at key
Returns the string representation of the type of the value stored at key
Args:
key (str): The key to check.
Returns:
str: The type of key, or none when key doesn't existunsubscribetool Unsubscribe and close an existing pub/sub subscription.
Unsubscribe and close an existing pub/sub subscription.
Args:
subscription_id: The ID returned by subscribe() or psubscribe().
Returns:
A dictionary describing the closed subscription or an error message.vector_search_hashtool Perform a KNN vector similarity search using Redis 8 or later version on vectors stored in hash data structures.
Perform a KNN vector similarity search using Redis 8 or later version on vectors stored in hash data structures.
Args:
query_vector: List of floats to use as the query vector.
index_name: Name of the Redis index. Unless specifically specified, use the default index name.
vector_field: Name of the indexed vector field. Unless specifically required, use the default field name
k: Number of nearest neighbors to return.
return_fields: List of fields to return (optional).
Returns:
A list of matched documents or an error message.xacktool Acknowledge entries that were processed by a consumer group.
Acknowledge entries that were processed by a consumer group.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
entry_ids (List[str]): Entry IDs to acknowledge.
Returns:
str: Confirmation message or an error message.xaddtool Add an entry to a Redis stream with an optional expiration time.
Add an entry to a Redis stream with an optional expiration time.
Args:
key (str): The stream key.
fields (dict): The fields and values for the stream entry.
expiration (int, optional): Expiration time in seconds.
Returns:
str: The ID of the added entry or an error message.xdeltool Delete an entry from a Redis stream.
Delete an entry from a Redis stream.
Args:
key (str): The stream key.
entry_id (str): The ID of the entry to delete.
Returns:
str: Confirmation message or an error message.xgroup_createtool Create a consumer group for a Redis stream.
Create a consumer group for a Redis stream.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
start_id (str, optional): Stream ID from which the group starts consuming.
mkstream (bool, optional): Create the stream if it does not exist.
Returns:
str: Confirmation message or an error message.xgroup_destroytool Destroy a consumer group for a Redis stream.
Destroy a consumer group for a Redis stream.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
Returns:
str: Confirmation message or an error message.xrangetool Read entries from a Redis stream.
Read entries from a Redis stream.
Args:
key (str): The stream key.
count (int, optional): Number of entries to retrieve.
Returns:
str: The retrieved stream entries or an error message.xreadgrouptool Read entries from a Redis stream using a consumer group.
Read entries from a Redis stream using a consumer group.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
consumer_name (str): The consumer name.
count (int, optional): Maximum number of entries to retrieve.
block_ms (int, optional): Maximum time to block waiting for entries.
Use None for a non-blocking read. 0 is rejected because Redis treats
BLOCK 0 as an indefinite wait.
stream_id (str, optional): Stream ID to read from. Use ">" for new messages.
Returns:
str: The retrieved stream entries or an error message.zaddtool Add a member to a Redis sorted set with an optional expiration time.
Add a member to a Redis sorted set with an optional expiration time.
Args:
key (str): The sorted set key.
score (float): The score of the member.
member (str): The member to add.
expiration (int, optional): Expiration time in seconds.
Returns:
str: Confirmation message or an error message.zrangetool Retrieve a range of members from a Redis sorted set.
Retrieve a range of members from a Redis sorted set.
Args:
key (str): The sorted set key.
start (int): The starting index.
end (int): The ending index.
with_scores (bool, optional): Whether to include scores in the result.
Returns:
str: The sorted set members in the given range or an error message.zremtool Remove a member from a Redis sorted set.
Remove a member from a Redis sorted set.
Args:
key (str): The sorted set key.
member (str): The member to remove.
Returns:
str: Confirmation message or an error message.Text the model reads (53)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
hset tool
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.hget tool
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.hdel tool
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.hgetall tool
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.hexists tool
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.set_vector_in_hash tool
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.get_vector_from_hash tool
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.json_set tool
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.json_get tool
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.json_del tool
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.lpush tool
Push one or more values onto the left of a Redis list and optionally set an expiration time.
Args:
name: The name of the list
value: A single value, or a list of values pushed in one LPUSH call.
Values are inserted one after another at the head, so [a, b, c]
results in the list starting with c, b, a.
expire: Optional expiration time in seconds
Returns:
A string confirming the push, including the new list length.rpush tool
Push one or more values onto the right of a Redis list and optionally set an expiration time.
Args:
name: The name of the list
value: A single value, or a list of values pushed in one RPUSH call
expire: Optional expiration time in seconds
Returns:
A string confirming the push, including the new list length.lpop tool
Remove and return the first element from a Redis list.
rpop tool
Remove and return the last element from a Redis list.
lrange tool
Get elements from a Redis list within a specific range.
Returns:
str: A JSON string containing the list of elements or an error message.llen tool
Get the length of a Redis list.
lrem tool
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.delete tool
Delete a Redis key.
Args:
key (str): The key to delete.
Returns:
str: Confirmation message or an error message.type tool
Returns the string representation of the type of the value stored at key
Args:
key (str): The key to check.
Returns:
str: The type of key, or none when key doesn't existexpire tool
Set an expiration time for a Redis key.
Args:
name: The Redis key.
expire_seconds: Time in seconds after which the key should expire.
Returns:
A success message or an error message.rename tool
Renames a Redis key from old_key to new_key.
Args:
old_key (str): The current name of the Redis key to rename.
new_key (str): The new name to assign to the key.
Returns:
Dict[str, Any]: A dictionary containing the result of the operation.
On success: {"status": "success", "message": "..."}
On error: {"error": "..."}scan_keys tool
Scan keys in the Redis database using the SCAN command (non-blocking, production-safe).
⚠\ufe0f IMPORTANT: This returns PARTIAL results from one iteration. Use scan_all_keys()
to get ALL matching keys, or call this function multiple times with the returned cursor
until cursor becomes 0.
The SCAN command iterates through the keyspace in small chunks, making it safe to use
on large databases without blocking other operations.
Args:
pattern: Pattern to match keys against (default is "*" for all keys).
Common patterns: "user:*", "cache:*", "*:123", etc.
count: Hint for the number of keys to return per iteration (default 100).
Redis may return more or fewer keys than this hint.
cursor: The cursor position to start scanning from (0 to start from beginning).
To continue scanning, use the cursor value returned from previous call.
Returns:
A dictionary containing:
- 'cursor': Next cursor position (0 means scan is complete)
- 'keys': List of keys found in this iteration (PARTIAL RESULTS)
- 'total_scanned': Number of keys returned in this batch
- 'scan_complete': Boolean indicating if scan is finished
Or an error message if something goes wrong.
Example usage:
First call: scan_keys("user:*") -> returns cursor=1234, keys=[...], scan_complete=False
Next call: scan_keys("user:*", cursor=1234) -> continues from where it left off
Final call: returns cursor=0, scan_complete=True when donescan_all_keys tool
Scan and return ALL keys matching a pattern using multiple SCAN iterations.
This function automatically handles the SCAN cursor iteration to collect all matching keys.
It's safer than KEYS * for large databases but will still collect all results in memory.
⚠\ufe0f WARNING: With very large datasets (millions of keys), this may consume significant memory.
For large-scale operations, consider using scan_keys() with manual iteration instead.
Args:
pattern: Pattern to match keys against (default is "*" for all keys).
batch_size: Number of keys to scan per iteration (default 100).
Returns:
A list of all keys matching the pattern or an error message.search_redis_documents tool
Search Redis documentation and knowledge base to learn about Redis concepts and use cases.
This tool exposes updated and curated documentation, and must be invoked every time the user wants to learn more in areas including:
**Common Use Cases:**
- Session Management: User session storage and management
- Caching: Application-level and database query caching
- Rate Limiting: API throttling and request limiting
- Leaderboards: Gaming and ranking systems
- Semantic Search: AI-powered similarity search
- Agentic Workflows: AI agent state and memory management
- RAG (Retrieval-Augmented Generation): Vector storage for AI applications
- Real-time Analytics: Counters, metrics, and time-series data
- Message Queues: Task queues and job processing
- Geospatial: Location-based queries and proximity search
Args:
question: The question about Redis concepts, data structures, features, or use cases
Returns:
Union[List[Dict[str, Any]], Dict[str, Any]]: A list of documentation results from the API, or a dict with an error message.publish tool
Publish a message to a Redis channel.
Args:
channel: The Redis channel to publish to.
message: The message to send.
Returns:
A success message or an error message.subscribe tool
Subscribe to a Redis channel and return a reusable subscription handle.
Args:
channel: The Redis channel to subscribe to.
Returns:
A dictionary containing the subscription ID or an error message.psubscribe tool
Subscribe to Redis channels using a pattern.
Args:
pattern: The Redis channel pattern to subscribe to.
Returns:
A dictionary containing the subscription ID or an error message.read_messages tool
Read pending pub/sub messages for an existing subscription.
Args:
subscription_id: The ID returned by subscribe() or psubscribe().
timeout_ms: Time to wait for messages in milliseconds. Use 0 for non-blocking.
max_messages: Maximum number of messages to return in one call.
Returns:
A dictionary containing the collected messages or an error message.unsubscribe tool
Unsubscribe and close an existing pub/sub subscription.
Args:
subscription_id: The ID returned by subscribe() or psubscribe().
Returns:
A dictionary describing the closed subscription or an error message.get_indexes tool
List of indexes in the Redis database
Returns:
str: A JSON string containing the list of indexes or an error message.get_index_info tool
Retrieve schema and information about a specific Redis index using FT.INFO.
Args:
index_name (str): The name of the index to retrieve information about.
Returns:
str: Information about the specified index or an error message.get_indexed_keys_number tool
Retrieve the number of indexed keys by the index
Args:
index_name (str): The name of the index to retrieve information about.
Returns:
str: Number of indexed keys as a stringcreate_vector_index_hash tool
Create a Redis 8 vector similarity index using HNSW on a Redis hash.
This function sets up a Redis index for approximate nearest neighbor (ANN)
search using the HNSW algorithm and float32 vector embeddings.
Args:
index_name: The name of the Redis index to create. Unless specifically required, use the default name for the index.
prefix: The key prefix used to identify documents to index (e.g., 'doc:'). Unless specifically required, use the default prefix.
vector_field: The name of the vector field to be indexed for similarity search. Unless specifically required, use the default field name
dim: The dimensionality of the vectors stored under the vector_field.
distance_metric: The distance function to use (e.g., 'COSINE', 'L2', 'IP').
Returns:
A string indicating whether the index was created successfully or an error message.vector_search_hash tool
Perform a KNN vector similarity search using Redis 8 or later version on vectors stored in hash data structures.
Args:
query_vector: List of floats to use as the query vector.
index_name: Name of the Redis index. Unless specifically specified, use the default index name.
vector_field: Name of the indexed vector field. Unless specifically required, use the default field name
k: Number of nearest neighbors to return.
return_fields: List of fields to return (optional).
Returns:
A list of matched documents or an error message.hybrid_search tool
Perform a hybrid search combining a Redis filter expression with KNN vector similarity.
Hybrid search pre-filters documents by metadata before ranking by vector similarity —
the standard pattern for production RAG and semantic search pipelines.
Filter expression examples:
"*" → no filter, pure vector search (same as vector_search_hash)
"@category:{news}" → tag filter
"@year:[2020 2024]" → numeric range
"@lang:{en} @year:[2022 +inf]" → combined tag + range
"@title:redis" → full-text match on a text field
Full filter syntax: https://redis.io/docs/latest/develop/interact/search-and-query/query/
Args:
query_vector: List of floats to use as the query vector.
filter_expression: Redis filter expression to restrict candidates before KNN ranking.
Defaults to '*' (no filter).
index_name: Name of the Redis index (default: 'vector_index').
vector_field: Name of the indexed vector field (default: 'vector').
k: Number of nearest neighbors to return.
return_fields: Additional fields to include in results (optional).
Returns:
A list of matched documents with their similarity score, or an error message.dbsize tool
Get the number of keys stored in the Redis database
info tool
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.client_list tool
Get a list of connected clients to the Redis server.
sadd tool
Add a value to a Redis set with an optional expiration time.
Args:
name: The Redis set key.
value: The value to add to the set.
expire_seconds: Optional; time in seconds after which the set should expire.
Returns:
A success message or an error message.srem tool
Remove a value from a Redis set.
Args:
name: The Redis set key.
value: The value to remove from the set.
Returns:
A success message or an error message.smembers tool
Get all members of a Redis set.
Args:
name: The Redis set key.
Returns:
A list of values in the set or an error message.zadd tool
Add a member to a Redis sorted set with an optional expiration time.
Args:
key (str): The sorted set key.
score (float): The score of the member.
member (str): The member to add.
expiration (int, optional): Expiration time in seconds.
Returns:
str: Confirmation message or an error message.zrange tool
Retrieve a range of members from a Redis sorted set.
Args:
key (str): The sorted set key.
start (int): The starting index.
end (int): The ending index.
with_scores (bool, optional): Whether to include scores in the result.
Returns:
str: The sorted set members in the given range or an error message.zrem tool
Remove a member from a Redis sorted set.
Args:
key (str): The sorted set key.
member (str): The member to remove.
Returns:
str: Confirmation message or an error message.xadd tool
Add an entry to a Redis stream with an optional expiration time.
Args:
key (str): The stream key.
fields (dict): The fields and values for the stream entry.
expiration (int, optional): Expiration time in seconds.
Returns:
str: The ID of the added entry or an error message.xrange tool
Read entries from a Redis stream.
Args:
key (str): The stream key.
count (int, optional): Number of entries to retrieve.
Returns:
str: The retrieved stream entries or an error message.xdel tool
Delete an entry from a Redis stream.
Args:
key (str): The stream key.
entry_id (str): The ID of the entry to delete.
Returns:
str: Confirmation message or an error message.xgroup_create tool
Create a consumer group for a Redis stream.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
start_id (str, optional): Stream ID from which the group starts consuming.
mkstream (bool, optional): Create the stream if it does not exist.
Returns:
str: Confirmation message or an error message.xgroup_destroy tool
Destroy a consumer group for a Redis stream.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
Returns:
str: Confirmation message or an error message.xreadgroup tool
Read entries from a Redis stream using a consumer group.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
consumer_name (str): The consumer name.
count (int, optional): Maximum number of entries to retrieve.
block_ms (int, optional): Maximum time to block waiting for entries.
Use None for a non-blocking read. 0 is rejected because Redis treats
BLOCK 0 as an indefinite wait.
stream_id (str, optional): Stream ID to read from. Use ">" for new messages.
Returns:
str: The retrieved stream entries or an error message.xack tool
Acknowledge entries that were processed by a consumer group.
Args:
key (str): The stream key.
group_name (str): The consumer group name.
entry_ids (List[str]): Entry IDs to acknowledge.
Returns:
str: Confirmation message or an error message.set tool
Set a Redis string value with an optional expiration time.
Args:
key (str): The key to set.
value (str, bytes, int, float, dict): The value to store.
expiration (int, optional): Expiration time in seconds.
Returns:
str: Confirmation message or an error message.get tool
Get a Redis string value.
Args:
key (str): The key to retrieve.
Returns:
str, bytes: The stored value or an error message.What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 53 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 53 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 53 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 53 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQL1 finding the scanner could not decide; see the findings below
- Tools that start processesNot seen in the traced code of 53 capabilities; 53 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 53 capabilities; 53 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 53 capabilities; 53 more call code the scanner could not follow, where it may happen
Where the code is: 53 handlers in 11 files at commit d66c5ea0172e
src/tools/hash.pyhset, hget, hdel, hgetall, hexists, set_vector_in_hash, get_vector_from_hashsrc/tools/json.pyjson_set, json_get, json_delsrc/tools/list.pylpush, rpush, lpop, rpop, lrange, llen, lremsrc/tools/misc.pydelete, type, expire, rename, scan_keys, scan_all_keys, search_redis_documentssrc/tools/pub_sub.pypublish, subscribe, psubscribe, read_messages, unsubscribesrc/tools/redis_query_engine.pyget_indexes, get_index_info, get_indexed_keys_number, create_vector_index_hash, vector_search_hash, hybrid_searchsrc/tools/server_management.pydbsize, info, client_listsrc/tools/set.pysadd, srem, smemberssrc/tools/sorted_set.pyzadd, zrange, zremsrc/tools/stream.pyxadd, xrange, xdel, xgroup_create, xgroup_destroy, xreadgroup, xacksrc/tools/string.pyset, get
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependencies1 package with advisories used only for development, tests or examples; an install of the server leaves them out
- MCP SDK versionNo MCP SDK declared in a manifest
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 53 capabilities; 53 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
1 vulnerable package outside the server itself (used only for development, tests or examples, not shipped)
jaraco-contextPyPI 6.0.1 HIGH 2 advisories 6.1.0
- HIGHGHSA-58pv-8j8x-9vj2 CVE-2026-23949 PYSEC-2026-1469jaraco.context Has a Path Traversal Vulnerability
- MEDIUMPYSEC-2026-1469 CVE-2026-23949 GHSA-58pv-8j8x-9vj2jaraco.context Has a Path Traversal Vulnerability
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | not stated in the code the scanner read; most local servers talk over stdio |
| Sign-in | not checked needs the live server |
| Servers in the code | 1 (Redis MCP Server) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-11 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 9 catalogs (awesome_appcypher, awesome_habitoai, awesome_punkpeye, awesome_yuzehao2023, docker_catalog, github_search, glama, mcp_toplist, mcpservers_org) |
|---|---|
| License | MIT |
| Created | 2025-04-02 |
| Topics | database genai llm mcp mcp-server redis |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.