Redis MCP server

OfficialRedis520Config last verified Jun 1, 2026

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

~/.claude.json
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>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add redis -- uvx --from redis-mcp-server@latest redis-mcp-server --url redis://localhost:6379/0

Available tools

ToolDescription
setSet a string value with an optional expiration time.
getGet a string value.
hsetSet a field in a hash with an optional expiration time.
hgetGet the value of a field in a hash.
hdelDelete a field from a hash.
hgetallGet all fields and values from a hash.
hexistsCheck whether a field exists in a hash.
set_vector_in_hashStore a vector as a field in a hash.
get_vector_from_hashRetrieve a vector from a hash and convert it back from a binary blob.
lpushPush a value onto the left of a list, optionally with an expiration.
rpushPush a value onto the right of a list, optionally with an expiration.
lpopRemove and return the first element of a list.
rpopRemove and return the last element of a list.
lrangeGet elements from a list within a range.
llenGet the length of a list.
lremRemove elements from a list.
saddAdd a value to a set with an optional expiration time.
sremRemove a value from a set.
smembersGet all members of a set.
zaddAdd a member to a sorted set with an optional expiration time.
zrangeRetrieve a range of members from a sorted set.
zremRemove a member from a sorted set.
xaddAdd an entry to a stream with an optional expiration time.
xrangeRead entries from a stream.
xdelDelete an entry from a stream.
xgroup_createCreate a consumer group for a stream.
xgroup_destroyDestroy a consumer group for a stream.
xreadgroupRead entries from a stream using a consumer group.
xackAcknowledge entries processed by a consumer group.
publishPublish a message to a pub/sub channel.
subscribeSubscribe to a channel and return a reusable subscription handle.
psubscribeSubscribe to channels matching a pattern.
read_messagesRead pending pub/sub messages for an existing subscription.
unsubscribeUnsubscribe and close an existing pub/sub subscription.
json_setSet a JSON value at a given path with an optional expiration time.
json_getRetrieve a JSON value at a given path.
json_delDelete a JSON value at a given path.
get_indexesList the search indexes in the Redis database.
get_index_infoRetrieve the schema and information for an index via FT.INFO.
get_indexed_keys_numberRetrieve the number of keys indexed by an index.
create_vector_index_hashCreate a Redis 8 HNSW vector similarity index on a hash.
vector_search_hashRun a KNN vector similarity search over vectors stored in hashes.
hybrid_searchRun a hybrid search combining a filter expression with KNN vector similarity.
dbsizeGet the number of keys stored in the database.
infoGet Redis server information and statistics.
client_listGet the list of clients connected to the server.
deleteDelete a key.
typeReturn the type of the value stored at a key.
expireSet an expiration time for a key.
renameRename a key from one name to another.
scan_keysScan keys using the non-blocking, production-safe SCAN command.
scan_all_keysScan and return all keys matching a pattern across multiple SCAN iterations.
search_redis_documentsSearch 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.
← Browse all databases servers