Skip to content

Databases · MCP integration

Let your AI inspect Redis, one scoped read at a time.

Investigate cache entries, key types and expiry through your MCP-compatible AI app. GateRook exposes two read tools for Redis: key scanning and value inspection. Set allowed key patterns, exclude sensitive namespaces and keep the Redis password in the connection.

Redis, in your AI workflow

Illustrative example

Connection in GateRook

stage-cache

Redis

stage / QA
Name / environment
stage-cache / stage
Host / port
redis.stage.internal / 6379
Database
0
ACL user / password
gateway_reader / Enter in GateRook (write-only)

The route

Your AI requests a tool. GateRook checks the endpoint policy, resolves credentials locally, and calls the configured service.

Understand the request flow

Ask your AI

Check the cached state and expiry of order 48213. Do not change any keys.

redis_get · arguments
{
  "connection": "stage-cache",
  "key": "cache:order:48213",
  "limit": 10
}
Example result
{
  "key": "cache:order:48213",
  "type": "hash",
  "exists": true,
  "ttlMs": 120000,
  "persistent": false,
  "value": {
    "status": "pending",
    "total": "149.00"
  },
  "returned": 2,
  "truncated": false
}

Sample configuration and output, not a live connection. Replace example values with your environment. Tool names here are connector names; the endpoint may expose a connection-specific name.

Put context to work

What you can do with Redis and AI

Find a stale cache entry

Read the cached status and TTL of a known order, then compare it with a SQL query. The agent can explain a mismatch without deleting or replacing the key.

Explore a permitted namespace

Scan cache:order:* with a bounded count, inspect key types and follow the returned cursor. A scan is incremental and may repeat keys across pages.

Understand queues and counters

Inspect a bounded page of a list, sorted set or stream and explain its values. The connector exposes read operations, not a general Redis command terminal.

From service to MCP

How to connect Redis

GateRook must be running on a computer that can reach your service. Open Connections, choose Add connection, and select Redis. Give the connection a name and environment.

New to GateRook? Start with the full setup guide.
  1. Choose a Redis server and ACL

    Use Redis 6 or later in standalone mode, or a directly reachable replica. Prepare a narrowly scoped read ACL. Cluster routing and Sentinel discovery are not supported by this connector.

  2. Add and authenticate the connection

    Open Connections, select Add connection and Redis. Set the host, port, database, environment and TLS settings. Enter the ACL user and password in GateRook when authentication is required.

  3. Restrict keys and result size

    In Advanced, add key allowlist and denylist patterns. Set command timeout and maximum value size for the data you expect. Keep session and token namespaces outside the exposed scope.

  4. Test and save

    Run Test connection and review the reported server and access checks. Finish Add to endpoint, then expose only redis_scan and redis_get to the AI app.

  5. Choose the endpoint and tool modes

    Add the tested connection to an endpoint. In Tools & policies, enable only the tools needed for the task. Start with Read only where supported; use Approval for any selected mutation and leave other tools Off. A connection alone does not grant an AI client access.

  6. Connect your AI and verify the first call

    In Clients, choose your AI app and endpoint, review the connection details, and connect. Try this guide’s example in Playground before asking your AI. Open Activity to inspect the tool, target, decision and returned result. The getting started guide covers this shared flow.

Connection settings

Configure Redis in GateRook

These are example values for the connection form. Enter credentials into GateRook’s secret fields, not into an AI prompt. Requirements and alternatives are noted per field.

Redis connection configuration
SettingExampleHow to use it
Name / environmentstage-cache / stageChoose Redis in Connections, then name the resource.
Host / portredis.stage.internal / 6379Connect to a standalone Redis server or a replica, reachable from this computer.
Database0Select the logical database index. The default is 0.
ACL user / passwordgateway_reader / Enter in GateRook (write-only)Credentials are optional for a server without authentication. An empty ACL user uses password authentication for the default user.
Use TLS / TLS verificationOn / Verify the CA and host nameUse the TLS setting appropriate to the server; add its private CA if necessary. Production defaults to TLS.
Keys the agent may readcache:order:*Redis glob allowlist. An empty allowlist permits every key that is not denied.
Keys the agent never readssession:*, *token*The denylist excludes sensitive key namespaces. Policies may add more exclusions.

Know what you expose

Redis tools and access boundaries

The connector determines what is possible. Endpoint modes and connection policies determine what a particular AI client may use.

Available tools and access behavior
ToolPurposeAccess behavior
redis_scanScan keys by Redis glob, with optional type and TTL. Continue using nextCursor.Read only
redis_getRead a string, hash, list, set, sorted set or stream with type, TTL and bounded values.Read only

Before you enable access

  • Redis Cluster and Sentinel are not supported. Connect to a standalone server or directly to a replica.
  • There are no SET, DEL, FLUSHALL or arbitrary-command tools. This connector only reads.
  • SCAN can repeat keys across pages and does not produce a transactional snapshot.
  • The optional no-touch behavior needs Redis 7.2 or later. Result size, element count and command timeouts bound each read.

GateRook stores local connection secrets encrypted and resolves them for connectors. Allowed tool results are returned to your AI client and may be processed by its provider. Scope the data you expose as well as the actions you allow.

Practical answers

Redis connection questions

Use Test connection to isolate service access problems. Use Playground and Activity to inspect endpoint permissions and tool calls.

Can the AI delete a Redis key?

No. The built-in connector only publishes redis_get and redis_scan. It has no mutation tool or arbitrary command input.

Does this work with Redis Cluster or Sentinel?

Not with cluster routing or Sentinel discovery. Use a supported standalone server or a replica that GateRook can reach directly.

Can I exclude session keys?

Yes. Add session:* and any other sensitive patterns to the key denylist. An allowlist such as cache:order:* narrows the scope further.

Keep exploring

MySQL

Connect MySQL to an MCP-compatible AI app with GateRook. Explore schemas, run read-only SQL, review changes and keep database credentials out of prompts.

PostgreSQL

Connect PostgreSQL to an MCP-compatible AI app with GateRook. Explore schemas, run read-only SQL, review changes and keep database credentials out of prompts.

MongoDB

Connect MongoDB to AI through MCP. Find documents, run read-only aggregations and scope collections with GateRook, without putting credentials in prompts.

Browse all integration guides

Your infrastructure, on your terms

Bring Redis into the conversation.

Start with one connection. Choose what your AI can do.

Get GateRook

GateRook is in active development. Installers will appear here after a verified release.

macOS

Coming soon. The macOS build is not available yet.

Windows

Coming soon. The Windows build is not available yet.