> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/ai-and-agents/mcp/hosted/redis.md).

# Redis

Give an agent access to Redis through the ilert MCP connector, and the two gates on reading key values.

#### Required permissions

<table><thead><tr><th width="177.515625">Tool</th><th width="178.515625">Required Permission</th><th>Description</th></tr></thead><tbody><tr><td><code>list_databases</code></td><td><code>read</code></td><td>List all Redis databases. Useful for discovering which database numbers hold data.</td></tr><tr><td><code>scan_keys</code></td><td><code>read</code></td><td>List keys in a database matching a pattern. Useful for discovering available keys and their naming patterns.</td></tr><tr><td><code>get_key_info</code></td><td><code>read</code></td><td>Get detailed information about a key: type, TTL, size, and encoding. Helps understand key structure without reading its contents.</td></tr><tr><td><code>get_key_values</code></td><td><code>read</code></td><td>Read the values of multiple keys (up to 1 KB each). Returns the actual stored data.</td></tr><tr><td><code>get_metrics</code></td><td><code>read</code></td><td>Get Redis metrics including server info, memory usage, stats, clients, persistence, replication, CPU, and keyspace.</td></tr><tr><td><code>get_info</code></td><td><code>read</code></td><td>Get the raw output of the Redis <code>INFO</code> command, for cases where the parsed metrics are not enough.</td></tr></tbody></table>

{% hint style="warning" %}
`get_key_values` returns the actual values stored in Redis, which may contain sensitive data. It is treated as a sensitive tool and is gated **twice**, both off by default:

* `REDIS_ENABLE_SENSITIVE_TOOLS=true` on the connector you deploy — without it the connector refuses the request, whatever the agent asks for
* the `get_key_values` tool enabled on the agent's **Tools** tab

Even with both enabled, a call reads at most **20 keys** and each value is truncated to **1 KB**. Keys holding a non-string type, and binary values that are not valid text, are reported as such rather than returned.
{% endhint %}

#### Deploy the ilert MCP connector

ilert does not connect to your Redis instance directly. The Redis MCP server calls the **ilert MCP connector**, a service you deploy in your own network and expose over a public HTTPS URL. Deployment, the auth token and all configuration options are on its own page:

{% content-ref url="/pages/cKuRiKPs7NQX5toTeOJo" %}
[ilert MCP connector](/ai-and-agents/mcp/ilert-mcp-connector.md)
{% endcontent-ref %}

Enable Redis on the connector with these variables:

```bash
REDIS_ENABLED=true
REDIS_HOST=redis.internal
REDIS_PORT=6379
REDIS_PASSWORD=your_password
REDIS_ENABLE_SENSITIVE_TOOLS=false
```

Leave `REDIS_PASSWORD` unset if no password is configured. There is no database-number setting — the agent selects the Redis database per request.

Keep `REDIS_ENABLE_SENSITIVE_TOOLS` at `false` unless you want the agent to read key **contents** — see the note above. Everything else, including key metadata and server metrics, works without it.

#### Connect Redis with agent

To connect Redis with your AI SRE agent:

{% stepper %}
{% step %}
Navigate to **Agents** in the ilert navigation menu
{% endstep %}

{% step %}
Open the agent detail view for the agent you want to configure
{% endstep %}

{% step %}
Go to the **Tools** tab
{% endstep %}

{% step %}
Under the **ilert hosted MCP servers** section, locate the **Redis** card
{% endstep %}

{% step %}
Click **Connect** on the Redis card
{% endstep %}

{% step %}
In the connection dialog that appears:

* **Select connector:** Choose "Create new connector" (or select an existing connector if you have one)
* **Type:** Select **Bearer Token** from the dropdown
* **Secret name:** Enter a name for your connector (e.g., "Redis Production" or "Redis Main")
* **Secret value:** Enter the `AUTH_TOKEN` value from your connector deployment
* **Host URL:** Enter the public URL where your connector is reachable (e.g., `https://ilert-mcp-connector.example.com`)
  {% endstep %}

{% step %}
Click **Connect** to complete the connection
{% endstep %}

{% step %}
After connecting, you can enable or disable specific tools needed for alert investigation, such as:

* `list_databases` - List all Redis databases
* `scan_keys` - List keys in a database matching a pattern
* `get_key_info` - Get a key's type, TTL, size, and encoding
* `get_key_values` - Read the values of multiple keys (sensitive, disabled by default, also needs `REDIS_ENABLE_SENSITIVE_TOOLS` on the connector)
* `get_metrics` - Get server info, memory, stats, clients, persistence, replication, CPU, and keyspace
* `get_info` - Get raw Redis `INFO` command output
  {% endstep %}
  {% endstepper %}

The Redis integration is now connected and ready to use for root cause analysis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ilert.com/ai-and-agents/mcp/hosted/redis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
