mcp-redis-allowlist

mcp-redis-allowlist

Read-only Redis MCP server with a configurable command allowlist for safe production diagnostics, enabling exact read-only subcommands like CLIENT LIST and SLOWLOG GET.

Category
Visit Server

README

mcp-redis-allowlist

Read-only Redis MCP server with a configurable command allowlist.

This project is a fixed local variant for production diagnostics. It keeps the small tool surface from @infoinlet/mcp-redis and adds an environment-driven allowlist for exact read-only diagnostic subcommands such as CLIENT LIST, SLOWLOG GET, and LATENCY LATEST.

Tools

  • redis_get: get a string key and TTL.
  • redis_scan: scan keys with SCAN.
  • redis_inspect: inspect type, TTL, size, and preview for string/hash/list/set/zset keys.
  • redis_command: run a Redis command if it passes the read-only guard.
  • redis_info: run INFO, optionally with a section.

Security Model

By default, writes are blocked at the MCP layer.

  • REDIS_WRITE_ALLOWED=false keeps the read-only guard enabled.
  • REDIS_EXTRA_READONLY_COMMANDS appends exact read-only command specs.
  • REDIS_WRITE_ALLOWED=true bypasses the guard and should not be used for production diagnostics.

Extra command specs are comma or whitespace separated:

REDIS_EXTRA_READONLY_COMMANDS=client:list,slowlog:get,latency:latest

Redis ACL style syntax is also accepted:

REDIS_EXTRA_READONLY_COMMANDS='client|list slowlog|get latency|latest'

Known dangerous subcommands remain blocked unless REDIS_WRITE_ALLOWED=true, including:

  • CLIENT KILL
  • CLIENT PAUSE
  • CLIENT UNPAUSE
  • CLIENT UNBLOCK
  • CLIENT SETNAME
  • SLOWLOG RESET
  • LATENCY RESET
  • CONFIG SET
  • CONFIG RESETSTAT
  • CONFIG REWRITE

Use a Redis read-only or diagnostic ACL user as an additional safety boundary whenever possible.

Install

npm install
npm run build

Run

REDIS_URL='redis://localhost:6379' \
REDIS_WRITE_ALLOWED=false \
REDIS_EXTRA_READONLY_COMMANDS='client:list,slowlog:get,latency:latest' \
node dist/server.js

Codex MCP Config

[mcp_servers.redis_yesorno_prod]
command = "/Users/jason/.local/nodejs/current/bin/node"
args = ["/Users/jason/workspace/mcp-redis-allowlist/dist/server.js"]
startup_timeout_sec = 30.0

[mcp_servers.redis_yesorno_prod.env]
REDIS_URL = "redis://USER:PASSWORD@HOST:PORT/DB"
REDIS_WRITE_ALLOWED = "false"
REDIS_EXTRA_READONLY_COMMANDS = "client:list,slowlog:get,latency:latest"
PATH = "/Users/jason/.local/nodejs/current/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Do not commit real Redis URLs, passwords, or production hostnames.

Diagnostic Examples

Use redis_command with exact subcommands:

{ "command": "CLIENT", "args": ["LIST"] }
{ "command": "SLOWLOG", "args": ["GET", "128"] }
{ "command": "LATENCY", "args": ["LATEST"] }

Development

npm install
npm run build
npm test

The tests verify that the diagnostic commands above can be allowlisted while dangerous related subcommands remain blocked.

Attribution

This server is inspired by the read-only guard and tool shape from @infoinlet/mcp-redis, which is MIT licensed.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured