Redis MCP Server

Read, write and vector-search data in a Redis database from an MCP client

Official · Redis Python Local · stdio DatabasesAI and ML

75 popularity score ★ 641 ↓ 16k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs REDIS_HOST. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add redis -e REDIS_HOST=<REDIS_HOST> -- uvx --from redis-mcp-server@latest redis-mcp-server --url '<REDIS_URL>'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "redis": {
      "command": "uvx",
      "args": [
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "<REDIS_URL>"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "redis": {
      "command": "uvx",
      "args": [
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "<REDIS_URL>"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "redis": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "redis-mcp-server@latest",
        "redis-mcp-server",
        "--url",
        "<REDIS_URL>"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.redis]
command = "uvx"
args = ["--from", "redis-mcp-server@latest", "redis-mcp-server", "--url", "<REDIS_URL>"]

[mcp_servers.redis.env]
REDIS_HOST = "<REDIS_HOST>"
Gemini CLITerminal
gemini mcp add --scope user -e REDIS_HOST=<REDIS_HOST> redis uvx -- --from redis-mcp-server@latest redis-mcp-server --url '<REDIS_URL>'
Local (Docker)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs REDIS_HOST. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add redis -e REDIS_HOST=<REDIS_HOST> -- docker run -i --rm -e REDIS_HOST -e REDIS_PORT -e REDIS_USERNAME -e REDIS_PWD mcp/redis
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "redis": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "REDIS_HOST",
        "-e",
        "REDIS_PORT",
        "-e",
        "REDIS_USERNAME",
        "-e",
        "REDIS_PWD",
        "mcp/redis"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "redis": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "REDIS_HOST",
        "-e",
        "REDIS_PORT",
        "-e",
        "REDIS_USERNAME",
        "-e",
        "REDIS_PWD",
        "mcp/redis"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "redis": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "REDIS_HOST",
        "-e",
        "REDIS_PORT",
        "-e",
        "REDIS_USERNAME",
        "-e",
        "REDIS_PWD",
        "mcp/redis"
      ],
      "env": {
        "REDIS_HOST": "<REDIS_HOST>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.redis]
command = "docker"
args = ["run", "-i", "--rm", "-e", "REDIS_HOST", "-e", "REDIS_PORT", "-e", "REDIS_USERNAME", "-e", "REDIS_PWD", "mcp/redis"]

[mcp_servers.redis.env]
REDIS_HOST = "<REDIS_HOST>"
Gemini CLITerminal
gemini mcp add --scope user -e REDIS_HOST=<REDIS_HOST> redis docker -- run -i --rm -e REDIS_HOST -e REDIS_PORT -e REDIS_USERNAME -e REDIS_PWD mcp/redis

Settings 12

REDIS_HOST Required: Redis hostname; default 127.0.0.1, which inside the container is the container itself. The uvx way can pass --url instead.
REDIS_PORT Optional: Redis port, default 6379.
REDIS_USERNAME Optional: ACL user name.
REDIS_PWD Optional: Password for the Redis user.
REDIS_DB Optional: Logical database number, default 0.
REDIS_SSL Optional: Turn TLS on with lowercase true, 1 or t.
REDIS_SSL_CA_PATH Optional: CA certificate used to verify the server.
REDIS_SSL_CERT_REQS Optional: Server certificate check, default required.
REDIS_CLUSTER_MODE Optional: Connect to a Redis Cluster (true, 1 or t).
REDIS_ENTRAID_AUTH_FLOW Optional: service_principal, managed_identity or default_credential to sign in to Azure Managed Redis with Entra ID.
MCP_DOCS_SEARCH_URL Optional: Endpoint for search_redis_documents, default https://redis.io/convai/api/docs/search.
MCP_REDIS_LOG_LEVEL Optional: Log level, default WARNING.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

Redis's own MCP server connects an assistant to one Redis database and exposes the core data structures as separate tools: strings, hashes, lists, sets, sorted sets, streams with consumer groups, JSON documents and pub/sub channels. Most write tools take an optional expiry, so it can be used for caching, sessions or short-lived agent memory as well as for inspecting an existing database.

Version 0.5.1 registers 53 tools (counted in its src/tools files and matching the Docker Hub listing). Besides key and value operations there are query-engine tools that create an HNSW vector index over hashes, store vectors in hash fields and run KNN or filtered hybrid searches, plus server tools for INFO, DBSIZE and the client list. One tool, search_redis_documents, sends a question to Redis's hosted docs search at https://redis.io/convai/api/docs/search by default (changeable with MCP_DOCS_SEARCH_URL).

It runs locally over stdio, started with uvx from PyPI, from a git tag, from a clone, or as the mcp/redis container. The connection is set by a redis:// or rediss:// URL, by individual flags, or by REDIS_* environment variables; flags win over variables. Cluster mode, TLS client certificates and Microsoft Entra ID sign-in for Azure Managed Redis are supported.

What it needs

RuntimePython 3.14+orDocker

A reachable Redis server (local, Redis Cloud, Azure Managed Redis or self-hosted) and its password or ACL user if it has one. uv for the uvx command; the README targets Python 3.14, though pyproject.toml accepts 3.10+. The vector-index and vector-search tools need Redis 8 or the query engine, and the json_* tools need JSON support on the server. Docker for the container way. Entra ID sign-in needs Azure credentials (service principal, managed identity or az login).

Limits

Speaks stdio only; the README says streamable HTTP is planned. In 0.5.1 REDIS_SSL and REDIS_CLUSTER_MODE are only switched on by the lowercase values true, 1 or t (src/common/config.py), so the README's REDIS_SSL: True example leaves TLS off; use true or a rediss:// URL. REDIS_USERNAME has no default in the code, not "default" as the README table says. scan_all_keys gathers every matching key into memory, which its own code warns about for very large databases. The README warns that the main branch may contain breaking changes; pin a release.

Who it suits

Developers who want an assistant to inspect, seed or debug a Redis database, or to use Redis as a cache, queue, stream or vector store from an agent. Because it can delete, rename and overwrite keys with no confirmation step, point it at a development database or connect as a read-only ACL user, as the README shows, when working near production. It needs a Redis server you can reach from your machine; for Upstash's hosted Redis, we also list Upstash's own server (upstash/redis-mcp).

Tools 53

client_list
List the clients currently connected to the Redis server
create_vector_index_hash
Create an HNSW vector index over hash keys (Redis 8)
dbsize
Count the keys in the selected database
delete
Remove a key
expire
Set a time-to-live on a key
get
Read a string value
get_index_info
Show the schema and details of a search index (FT.INFO)
get_indexed_keys_number
Count the keys covered by an index
get_indexes
List the search indexes in the database
get_vector_from_hash
Read a stored vector back from a hash field as numbers
hdel
Remove a field from a hash
hexists
Check whether a hash field exists
hget
Read one hash field
hgetall
Read every field and value of a hash
hset
Write a hash field, optionally with a TTL
hybrid_search
Run a KNN vector search narrowed by a filter expression
info
Return server information and statistics
json_del
Remove the value at a path in a JSON document
json_get
Read the value at a path in a JSON document
json_set
Write a value at a path in a JSON document, optionally with a TTL
llen
Return a list's length
lpop
Remove and return the first list item
lpush
Add an item to the head of a list, optionally with a TTL
lrange
Read a range of list items
lrem
Remove matching items from a list
psubscribe
Open a subscription to channels matching a pattern
publish
Send a message to a pub/sub channel
read_messages
Fetch queued messages for an open subscription
rename
Give a key a new name
rpop
Remove and return the last list item
rpush
Add an item to the tail of a list, optionally with a TTL
sadd
Add a member to a set, optionally with a TTL
scan_all_keys
Collect every key matching a pattern by looping SCAN
scan_keys
Run one SCAN step and return keys plus the next cursor
search_redis_documents
Ask a question of Redis's hosted documentation search
set
Write a string value, optionally with a TTL
set_vector_in_hash
Store a vector as a binary field in a hash
smembers
List the members of a set
srem
Remove a member from a set
subscribe
Open a subscription to one channel and get a handle
type
Report the data type stored at a key
unsubscribe
Close an open subscription
vector_search_hash
Find the nearest vectors stored in hashes (Redis 8+)
xack
Mark stream entries as processed for a consumer group
xadd
Append an entry to a stream, optionally with a TTL
xdel
Remove an entry from a stream
xgroup_create
Create a consumer group on a stream
xgroup_destroy
Delete a consumer group from a stream
xrange
Read entries from a stream
xreadgroup
Read stream entries as a member of a consumer group
zadd
Add a scored member to a sorted set, optionally with a TTL
zrange
Read a range of members from a sorted set
zrem
Remove a member from a sorted set

Similar servers