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.
Databases · MCP integration
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.
Connection in GateRook
stage-cache
Redis
stage / QAThe route
Your AI requests a tool. GateRook checks the endpoint policy, resolves credentials locally, and calls the configured service.
Understand the request flowAsk your AI
Check the cached state and expiry of order 48213. Do not change any keys.
{
"connection": "stage-cache",
"key": "cache:order:48213",
"limit": 10
}{
"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
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.
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.
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
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.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.
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.
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.
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.
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.
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
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.
| Setting | Example | How to use it |
|---|---|---|
Name / environment | stage-cache / stage | Choose Redis in Connections, then name the resource. |
Host / port | redis.stage.internal / 6379 | Connect to a standalone Redis server or a replica, reachable from this computer. |
Database | 0 | Select the logical database index. The default is 0. |
ACL user / password | gateway_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 verification | On / Verify the CA and host name | Use the TLS setting appropriate to the server; add its private CA if necessary. Production defaults to TLS. |
Keys the agent may read | cache:order:* | Redis glob allowlist. An empty allowlist permits every key that is not denied. |
Keys the agent never reads | session:*, *token* | The denylist excludes sensitive key namespaces. Policies may add more exclusions. |
Know what you expose
The connector determines what is possible. Endpoint modes and connection policies determine what a particular AI client may use.
| Tool | Purpose | Access behavior |
|---|---|---|
redis_scan | Scan keys by Redis glob, with optional type and TTL. Continue using nextCursor. | Read only |
redis_get | Read a string, hash, list, set, sorted set or stream with type, TTL and bounded values. | Read only |
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
Use Test connection to isolate service access problems. Use Playground and Activity to inspect endpoint permissions and tool calls.
No. The built-in connector only publishes redis_get and redis_scan. It has no mutation tool or arbitrary command input.
Not with cluster routing or Sentinel discovery. Use a supported standalone server or a replica that GateRook can reach directly.
Yes. Add session:* and any other sensitive patterns to the key denylist. An allowlist such as cache:order:* narrows the scope further.
Keep exploring
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.
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.
Connect MongoDB to AI through MCP. Find documents, run read-only aggregations and scope collections with GateRook, without putting credentials in prompts.
Your infrastructure, on your terms
Start with one connection. Choose what your AI can do.