Redis MCP server
Redis's official MCP server: read and write strings, hashes, lists, streams, JSON, and vector search.
The Redis MCP Server is Redis's official integration that gives an agent natural-language access to a Redis instance across every core data type. It exposes tools for strings, hashes (including binary vector fields), lists, sets, sorted sets, JSON documents, and streams with consumer groups, plus pub/sub publish and subscribe, key management (delete, expire, rename, type, and production-safe SCAN), and server introspection (DBSIZE, INFO, CLIENT LIST). It also ships a Redis Query Engine surface for creating HNSW vector indexes and running KNN and hybrid vector searches, making it useful as a semantic-memory or RAG backend, and a documentation search tool for answering Redis concept questions.
It is a Python server installed and run with uvx from the redis-mcp-server PyPI package over stdio, and a Docker image (mcp/redis) is also published. The connection target is supplied either with the --url command-line flag or through environment variables such as REDIS_HOST, REDIS_PORT, REDIS_PWD, and REDIS_DB, with TLS and Redis Cluster options available and EntraID/Azure authentication supported for managed deployments.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"redis": {
"command": "uvx",
"args": [
"--from",
"redis-mcp-server@latest",
"redis-mcp-server",
"--url",
"redis://localhost:6379/0"
],
"env": {
"REDIS_HOST": "<REDIS_HOST>",
"REDIS_PWD": "<REDIS_PWD>"
}
}
}
}claude mcp add redis -- uvx --from redis-mcp-server@latest redis-mcp-server --url redis://localhost:6379/0Available tools
| Tool | Description |
|---|---|
| set | Set a string value with an optional expiration time. |
| get | Get a string value. |
| hset | Set a field in a hash with an optional expiration time. |
| hget | Get the value of a field in a hash. |
| hdel | Delete a field from a hash. |
| hgetall | Get all fields and values from a hash. |
| hexists | Check whether a field exists in a hash. |
| set_vector_in_hash | Store a vector as a field in a hash. |
| get_vector_from_hash | Retrieve a vector from a hash and convert it back from a binary blob. |
| lpush | Push a value onto the left of a list, optionally with an expiration. |
| rpush | Push a value onto the right of a list, optionally with an expiration. |
| lpop | Remove and return the first element of a list. |
| rpop | Remove and return the last element of a list. |
| lrange | Get elements from a list within a range. |
| llen | Get the length of a list. |
| lrem | Remove elements from a list. |
| sadd | Add a value to a set with an optional expiration time. |
| srem | Remove a value from a set. |
| smembers | Get all members of a set. |
| zadd | Add a member to a sorted set with an optional expiration time. |
| zrange | Retrieve a range of members from a sorted set. |
| zrem | Remove a member from a sorted set. |
| xadd | Add an entry to a stream with an optional expiration time. |
| xrange | Read entries from a stream. |
| xdel | Delete an entry from a stream. |
| xgroup_create | Create a consumer group for a stream. |
| xgroup_destroy | Destroy a consumer group for a stream. |
| xreadgroup | Read entries from a stream using a consumer group. |
| xack | Acknowledge entries processed by a consumer group. |
| publish | Publish a message to a pub/sub channel. |
| subscribe | Subscribe to a channel and return a reusable subscription handle. |
| psubscribe | Subscribe to channels matching a pattern. |
| read_messages | Read pending pub/sub messages for an existing subscription. |
| unsubscribe | Unsubscribe and close an existing pub/sub subscription. |
| json_set | Set a JSON value at a given path with an optional expiration time. |
| json_get | Retrieve a JSON value at a given path. |
| json_del | Delete a JSON value at a given path. |
| get_indexes | List the search indexes in the Redis database. |
| get_index_info | Retrieve the schema and information for an index via FT.INFO. |
| get_indexed_keys_number | Retrieve the number of keys indexed by an index. |
| create_vector_index_hash | Create a Redis 8 HNSW vector similarity index on a hash. |
| vector_search_hash | Run a KNN vector similarity search over vectors stored in hashes. |
| hybrid_search | Run a hybrid search combining a filter expression with KNN vector similarity. |
| dbsize | Get the number of keys stored in the database. |
| info | Get Redis server information and statistics. |
| client_list | Get the list of clients connected to the server. |
| delete | Delete a key. |
| type | Return the type of the value stored at a key. |
| expire | Set an expiration time for a key. |
| rename | Rename a key from one name to another. |
| scan_keys | Scan keys using the non-blocking, production-safe SCAN command. |
| scan_all_keys | Scan and return all keys matching a pattern across multiple SCAN iterations. |
| search_redis_documents | Search the Redis documentation and knowledge base. |
Required configuration
- REDIS_HOSTOptional
Redis host when --url is not supplied (default 127.0.0.1).
- REDIS_PORTOptional
Redis port when --url is not supplied (default 6379).
- REDIS_PWDOptional
Redis password when --url is not supplied.
- REDIS_USERNAMEOptional
Redis username for ACL auth (default 'default').
- REDIS_DBOptional
Redis logical database number (default 0).
What you can do with it
Semantic memory for an agent
Create an HNSW vector index, store embeddings in hashes, and let the agent run KNN or hybrid searches to recall relevant context at query time.
Inspect and operate a cache
Ask the agent to SCAN for keys matching a pattern, check their types and TTLs, read stream entries, and report server stats from INFO without leaving the chat.
FAQ
- Is it free?
- Yes. The Redis MCP Server is free and open source under the MIT license; you only need a reachable Redis instance, which can be local, self-hosted, or Redis Cloud.
- Does it support remote/OAuth?
- It runs locally over stdio via uvx (or a Docker image) and connects with a Redis URL or host/password env vars rather than OAuth. For managed Redis it supports EntraID/Azure authentication.