The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Redis listing page.
The Redis MCP Server is a natural language interface designed for agentic applications to efficiently manage and search data in Redis. It integrates seamlessly with MCP (Model Content Protocol) clients, enabling AI-driven workflows to interact with structured and unstructured data in Redis. Using this MCP Server, you can ask questions like:
stdio transport. Support to the stremable-http transport will be added in the future.This MCP Server provides tools to manage the data stored in Redis.
string tools to set, get strings with expiration. Useful for storing simple configuration values, session data, or caching responses.hash tools to store field-value pairs within a single key. The hash can store vector embeddings. Useful for representing objects with multiple attributes, user profiles, or product information where fields can be accessed individually.list tools with common operations to append and pop items. Useful for queues, message brokers, or maintaining a list of most recent actions.set tools to add, remove and list set members. Useful for tracking unique values like user IDs or tags, and for performing set operations like intersection.sorted set tools to manage data for e.g. leaderboards, priority queues, or time-based analytics with score-based ordering.pub/sub functionality to publish messages, create stateful channel or pattern subscriptions, and read queued messages using returned subscription handles. Useful for real-time notifications, chat applications, or distributing updates to multiple clients.streams tools to add, read, delete, create and destroy consumer groups, and acknowledge processed entries in data streams. Useful for event sourcing, activity feeds, and worker-based event processing with Redis Streams consumer groups.JSON tools to store, retrieve, and manipulate JSON documents in Redis. Useful for complex nested data structures, document databases, or configuration management with path-based access.Additional tools.
docs tool to search Redis documentation, tutorials, and best practices using natural language questions (backed by the MCP_DOCS_SEARCH_URL HTTP API).query engine tools to manage vector indexes and perform vector searchserver management tool to retrieve information about the databaseThe Redis MCP Server is available as a PyPI package and as direct installation from the GitHub repository.
Configuring the latest Redis MCP Server version from PyPI, as an example, can be done importing the following JSON configuration in the desired framework or tool.
The uvx command will download the server on the fly (if not cached already), create a temporary environment, and then run it.
The format to specify the --url argument follows the redis and rediss schemes:
As an example, you can easily connect to a localhost server with:
Where 0 is the logical database you'd like to connect to.
For an encrypted connection to the database (e.g., connecting to a Redis Cloud database), you'd use the rediss scheme.
To verify the server's identity, specify ssl_ca_certs.
For an unverified connection, set ssl_cert_reqs to none
Configure your connection using the available options in the section "Available CLI Options".
You can install the package as follows:
And start it using uv the package in your environment.
However, starting the MCP Server is most useful when delegate to the framework or tool where this MCP Server is configured.
You can configure the desired Redis MCP Server version with uvx, which allows you to run it directly from GitHub (from a branch, or use a tagged release).
It is recommended to use a tagged release, the
mainbranch is under active development and may contain breaking changes.
As an example, you can execute the following command to run the 0.2.0 release:
Check the release notes for the latest version in the Releases section. Additional examples are provided below.
For development or if you prefer to clone the repository:
Once you cloned the repository, installed the dependencies and verified you can run the server, you can configure Claude Desktop or any other MCP Client to use this MCP Server running the main file directly (it uses environment variables). This is usually preferred for development. The following example is for Claude Desktop, but the same applies to any other MCP Client.
uv command full path (e.g. which uv)claude_desktop_config.json configuration file
~/Library/Application\ Support/Claude/You can troubleshoot problems by tailing the log file.
You can use a dockerized deployment of this server. You can either build your own image or use the official Redis MCP Docker image.
If you'd like to build your own image, the Redis MCP Server provides a Dockerfile. Build this server's image with:
Finally, configure the client to create the container at start-up. An example for Claude Desktop is provided below. Edit the claude_desktop_config.json and add:
To use the official Redis MCP Docker image, just replace your image name (mcp-redis in the example above) with mcp/redis.
The Redis MCP Server can be configured in two ways: via command line arguments or via environment variables. The precedence is: command line arguments > environment variables > default values.
You can configure Redis ACL to restrict the access to the Redis database. For example, to create a read-only user:
Configure the user via command line arguments or environment variables.
When using the CLI interface, you can configure the server with command line arguments:
Available CLI Options:
--url - Redis connection URI (redis://user:pass@host:port/db)--host - Redis hostname (default: 127.0.0.1)--port - Redis port (default: 6379)--db - Redis database number (default: 0)--username - Redis username--password - Redis password--ssl - Enable SSL connection--ssl-ca-path - Path to CA certificate file--ssl-keyfile - Path to SSL key file--ssl-certfile - Path to SSL certificate file--ssl-cert-reqs - SSL certificate requirements (default: required)--ssl-ca-certs - Path to CA certificates file--cluster-mode - Enable Redis cluster modeIf desired, you can use environment variables. Defaults are provided for all variables.
| Name | Description | Default Value |
|---|---|---|
REDIS_HOST | Redis IP or hostname | "127.0.0.1" |
REDIS_PORT | Redis port | 6379 |
REDIS_DB | Database | 0 |
REDIS_USERNAME | Default database username | "default" |
REDIS_PWD | Default database password | "" |
REDIS_SSL | Enables or disables SSL/TLS | False |
REDIS_SSL_CA_PATH | CA certificate for verifying server | None |
REDIS_SSL_KEYFILE | Client's private key file for client authentication | None |
REDIS_SSL_CERTFILE | Client's certificate file for client authentication | None |
REDIS_SSL_CERT_REQS | Whether the client should verify the server's certificate | "required" |
REDIS_SSL_CA_CERTS | Path to the trusted CA certificates file | None |
REDIS_CLUSTER_MODE | Enable Redis Cluster mode | False |
The Redis MCP Server supports EntraID (Azure Active Directory) authentication for Azure Managed Redis, enabling OAuth-based authentication with automatic token management.
Service Principal Authentication - Application-based authentication using client credentials:
Managed Identity Authentication - For Azure-hosted applications:
Default Azure Credential - Automatic credential discovery (recommended for development):
| Name | Description | Default Value |
|---|---|---|
REDIS_ENTRAID_AUTH_FLOW | Authentication flow type | None (EntraID disabled) |
REDIS_ENTRAID_CLIENT_ID | Service Principal client ID | None |
REDIS_ENTRAID_CLIENT_SECRET | Service Principal client secret | None |
REDIS_ENTRAID_TENANT_ID | Azure tenant ID | None |
REDIS_ENTRAID_IDENTITY_TYPE | Managed identity type | "system_assigned" |
REDIS_ENTRAID_USER_ASSIGNED_CLIENT_ID | User-assigned managed identity client ID | None |
REDIS_ENTRAID_SCOPES | OAuth scopes for Default Azure Credential | "https://redis.azure.com/.default" |
REDIS_ENTRAID_RESOURCE | Azure Redis resource identifier | "https://redis.azure.com/" |
For local development with Azure CLI:
For production with Service Principal:
For Azure-hosted applications with Managed Identity:
There are several ways to set environment variables:
.env File:
Place a .env file in your project directory with key-value pairs for each environment variable. Tools like python-dotenv, pipenv, and uv can automatically load these variables when running your application. This is a convenient and secure way to manage configuration, as it keeps sensitive data out of your shell history and version control (if .env is in .gitignore).
For example, create a .env file with the following content from the .env.example file provided in the repository:Then edit the .env file to set your Redis configuration:
OR,
This method is useful for temporary overrides or quick testing.
The server uses Python's standard logging and is configured at startup. By default it logs at WARNING and above. You can change verbosity with the MCP_REDIS_LOG_LEVEL environment variable.
DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSETWARN → WARNING, FATAL → CRITICAL"10", "+20")WARNINGHandler behavior
uv, VS Code, pytest) already installed console handlers, the server will NOT add its own; it only lowers overly-restrictive handler thresholds so your chosen level is not filtered out. It will never raise a handler's threshold.Examples
In MCP client configs that support env, add it alongside your Redis settings. For example:
Integrating this MCP Server to development frameworks like OpenAI Agents SDK, or with tools like Claude Desktop, VS Code, or Augment is described in the following sections.
Integrate this MCP Server with the OpenAI Agents SDK. Read the documents to learn more about the integration of the SDK with MCP.
Install the Python SDK.
Configure the OpenAI token:
And run the application.
You can troubleshoot your agent workflows using the OpenAI dashboard.
The preferred way of configuring the Redis MCP Server in Augment is to use the Easy MCP feature.
You can also configure the Redis MCP Server in Augment manually by importing the server via JSON:
The simplest way to configure MCP clients is using uvx. Add the following JSON to your claude_desktop_config.json, remember to provide the full path to uvx.
Basic Redis connection:
Azure Managed Redis with EntraID authentication:
To use the Redis MCP Server with VS Code, you must nable the agent mode tools. Add the following to your settings.json:
You can start the GitHub desired version of the Redis MCP server using uvx by adding the following JSON to your mcp.json file:
If you want to suppress uvx installation messages that may appear as warnings in MCP client logs, use the -qq flag:
The -qq flag enables silent mode, which suppresses "Installed X packages" messages that uvx writes to stderr during package installation.
Alternatively, you can start the server using uv and configure your mcp.json. This is usually desired for development.
For more information, see the VS Code documentation.
Tip: You can prompt Copilot chat to use the Redis MCP tools by including
#redisin your message.
Note: Starting with VS Code v1.102, MCP servers are now stored in a dedicated
mcp.jsonfile instead ofsettings.json.
You can use the MCP Inspector for visual debugging of this MCP Server.
feature-branch)This project is licensed under the MIT License.
For questions or support, reach out via GitHub Issues.
Alternatively, you can join the Redis Discord server and ask in the #redis-mcp-server channel.