Skip to content

Commit 1567ef8

Browse files
committed
docs: add readme instructions for EntraID support
1 parent c9e11f0 commit 1567ef8

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The Redis MCP Server is a **natural language interface** designed for agentic ap
3737
- [Redis ACL](#redis-acl)
3838
- [Configuration via command line arguments](#configuration-via-command-line-arguments)
3939
- [Configuration via Environment Variables](#configuration-via-environment-variables)
40+
- [EntraID Authentication for Azure Managed Redis](#entraid-authentication-for-azure-managed-redis)
4041
- [Logging](#logging)
4142
- [Integrations](#integrations)
4243
- [OpenAI Agents SDK](#openai-agents-sdk)
@@ -57,6 +58,7 @@ The Redis MCP Server is a **natural language interface** designed for agentic ap
5758
- **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more.
5859
- **Search & Filtering**: Supports efficient data retrieval and searching in Redis.
5960
- **Scalable & Lightweight**: Designed for **high-performance** data operations.
61+
- **EntraID Authentication**: Native support for Azure Active Directory authentication with Azure Managed Redis.
6062
- The Redis MCP Server supports the `stdio` [transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio). Support to the `stremable-http` transport will be added in the future.
6163

6264
## Tools
@@ -316,6 +318,85 @@ If desired, you can use environment variables. Defaults are provided for all var
316318
| `REDIS_CA_CERTS` | Path to the trusted CA certificates file | None |
317319
| `REDIS_CLUSTER_MODE` | Enable Redis Cluster mode | `False` |
318320

321+
### EntraID Authentication for Azure Managed Redis
322+
323+
The Redis MCP Server supports **EntraID (Azure Active Directory) authentication** for Azure Managed Redis, enabling OAuth-based authentication with automatic token management.
324+
325+
#### Authentication Providers
326+
327+
**Service Principal Authentication** - Application-based authentication using client credentials:
328+
```bash
329+
export REDIS_ENTRAID_AUTH_FLOW=service_principal
330+
export REDIS_ENTRAID_CLIENT_ID=your-client-id
331+
export REDIS_ENTRAID_CLIENT_SECRET=your-client-secret
332+
export REDIS_ENTRAID_TENANT_ID=your-tenant-id
333+
```
334+
335+
**Managed Identity Authentication** - For Azure-hosted applications:
336+
```bash
337+
# System-assigned managed identity
338+
export REDIS_ENTRAID_AUTH_FLOW=managed_identity
339+
export REDIS_ENTRAID_IDENTITY_TYPE=system_assigned
340+
341+
# User-assigned managed identity
342+
export REDIS_ENTRAID_AUTH_FLOW=managed_identity
343+
export REDIS_ENTRAID_IDENTITY_TYPE=user_assigned
344+
export REDIS_ENTRAID_USER_ASSIGNED_CLIENT_ID=your-identity-client-id
345+
```
346+
347+
**Default Azure Credential** - Automatic credential discovery (recommended for development):
348+
```bash
349+
export REDIS_ENTRAID_AUTH_FLOW=default_credential
350+
export REDIS_ENTRAID_SCOPES=https://redis.azure.com/.default
351+
```
352+
353+
#### EntraID Configuration Variables
354+
355+
| Name | Description | Default Value |
356+
|-----------------------------------------|-----------------------------------------------------------|--------------------------------------|
357+
| `REDIS_ENTRAID_AUTH_FLOW` | Authentication flow type | None (EntraID disabled) |
358+
| `REDIS_ENTRAID_CLIENT_ID` | Service Principal client ID | None |
359+
| `REDIS_ENTRAID_CLIENT_SECRET` | Service Principal client secret | None |
360+
| `REDIS_ENTRAID_TENANT_ID` | Azure tenant ID | None |
361+
| `REDIS_ENTRAID_IDENTITY_TYPE` | Managed identity type | `"system_assigned"` |
362+
| `REDIS_ENTRAID_USER_ASSIGNED_CLIENT_ID` | User-assigned managed identity client ID | None |
363+
| `REDIS_ENTRAID_SCOPES` | OAuth scopes for Default Azure Credential | `"https://redis.azure.com/.default"` |
364+
| `REDIS_ENTRAID_RESOURCE` | Azure Redis resource identifier | `"https://redis.azure.com/"` |
365+
366+
#### Key Features
367+
368+
- **Automatic token renewal** - Background token refresh with no manual intervention
369+
- **Graceful fallback** - Falls back to standard Redis authentication when EntraID not configured
370+
- **Multiple auth flows** - Supports Service Principal, Managed Identity, and Default Azure Credential
371+
- **Enterprise ready** - Designed for Azure Managed Redis with centralized identity management
372+
373+
#### Example Configuration
374+
375+
For **local development** with Azure CLI:
376+
```bash
377+
# Login with Azure CLI
378+
az login
379+
380+
# Configure MCP server
381+
export REDIS_ENTRAID_AUTH_FLOW=default_credential
382+
export REDIS_URL=redis://your-azure-redis.redis.cache.windows.net:6379
383+
```
384+
385+
For **production** with Service Principal:
386+
```bash
387+
export REDIS_ENTRAID_AUTH_FLOW=service_principal
388+
export REDIS_ENTRAID_CLIENT_ID=your-app-client-id
389+
export REDIS_ENTRAID_CLIENT_SECRET=your-app-secret
390+
export REDIS_ENTRAID_TENANT_ID=your-tenant-id
391+
export REDIS_URL=redis://your-azure-redis.redis.cache.windows.net:6379
392+
```
393+
394+
For **Azure-hosted applications** with Managed Identity:
395+
```bash
396+
export REDIS_ENTRAID_AUTH_FLOW=managed_identity
397+
export REDIS_ENTRAID_IDENTITY_TYPE=system_assigned
398+
export REDIS_URL=redis://your-azure-redis.redis.cache.windows.net:6379
399+
```
319400

320401
There are several ways to set environment variables:
321402

@@ -438,6 +519,7 @@ You can also configure the Redis MCP Server in Augment manually by importing the
438519

439520
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`.
440521

522+
**Basic Redis connection:**
441523
```json
442524
{
443525
"mcpServers": {
@@ -454,6 +536,27 @@ The simplest way to configure MCP clients is using `uvx`. Add the following JSON
454536
}
455537
```
456538

539+
**Azure Managed Redis with EntraID authentication:**
540+
```json
541+
{
542+
"mcpServers": {
543+
"redis-mcp-server": {
544+
"type": "stdio",
545+
"command": "/Users/mortensi/.local/bin/uvx",
546+
"args": [
547+
"--from", "redis-mcp-server@latest",
548+
"redis-mcp-server",
549+
"--url", "redis://your-azure-redis.redis.cache.windows.net:6379"
550+
],
551+
"env": {
552+
"REDIS_ENTRAID_AUTH_FLOW": "default_credential",
553+
"REDIS_ENTRAID_SCOPES": "https://redis.azure.com/.default"
554+
}
555+
}
556+
}
557+
}
558+
```
559+
457560
If you'd like to test the [Redis MCP Server](https://smithery.ai/server/@redis/mcp-redis) via Smithery, you can configure Claude Desktop automatically:
458561

459562
```bash

0 commit comments

Comments
 (0)