redis-mcp

redis-mcp

A safe, connection-efficient Redis MCP server that provides tools for reading and managing Redis data, with safeguards like confirmation requirements for destructive operations.

Category
Visit Server

README

redis-mcp

A safe, connection-efficient Redis MCP server.

Design goals

  • No accidental data loss. Destructive tools (redis_delete, redis_expire, redis_flushdb) refuse to run unless called with confirm=true — the tool description instructs the AI to ask the user first. redis_flushdb additionally requires the literal phrase confirm_phrase="FLUSH ALL DATA". redis_set refuses to overwrite an existing key unless overwrite=true.
  • Gentle on the Redis server.
    • One lazy, reused connection per MCP process (lazyConnect) — no connection churn, no pool needed since stdio MCP calls are sequential.
    • SCAN with cursor + result limits instead of KEYS (never blocks the server).
    • UNLINK instead of DEL and FLUSHDB ASYNC — deletes happen in a background thread on the Redis side.
    • Collection reads are truncated to 200 elements.

Tools

Tool Description Destructive?
redis_get Get a string key no
redis_scan List keys by pattern (SCAN, limited) no
redis_inspect Type + TTL + value for any key type no
redis_info Server INFO (memory, stats, keyspace, …) no
redis_set Set a string key (won't overwrite without overwrite=true) no
redis_delete Delete keys via UNLINK requires confirm=true
redis_expire Set a key's TTL requires confirm=true
redis_flushdb Wipe the current DB requires confirm=true + phrase

Requirements

  • Node.js ≥ 18
  • A reachable Redis server

Install

git clone <this-repo> redis-mcp
cd redis-mcp
npm install

Configuration is a single env var:

  • REDIS_URL — default redis://127.0.0.1:6379. Examples: redis://user:pass@host:6379/2, rediss://host:6380 (TLS).

Run manually to verify: REDIS_URL=redis://127.0.0.1:6379 node src/index.js (it prints [redis-mcp] ready on stderr).

In all snippets below, replace /absolute/path/to/redis-mcp with where you cloned it.

Claude Code

claude mcp add redis --env REDIS_URL=redis://127.0.0.1:6379 -- node /absolute/path/to/redis-mcp/src/index.js

Or add to .mcp.json in your project (or ~/.claude.json for global):

{
  "mcpServers": {
    "redis": {
      "command": "node",
      "args": ["/absolute/path/to/redis-mcp/src/index.js"],
      "env": { "REDIS_URL": "redis://127.0.0.1:6379" }
    }
  }
}

Claude Desktop

Add the same mcpServers block to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json).

Codex (OpenAI Codex CLI)

Add to ~/.codex/config.toml:

[mcp_servers.redis]
command = "node"
args = ["/absolute/path/to/redis-mcp/src/index.js"]
env = { REDIS_URL = "redis://127.0.0.1:6379" }

OpenCode

Add to opencode.json (project) or ~/.config/opencode/opencode.json (global):

{
  "mcp": {
    "redis": {
      "type": "local",
      "command": ["node", "/absolute/path/to/redis-mcp/src/index.js"],
      "environment": { "REDIS_URL": "redis://127.0.0.1:6379" },
      "enabled": true
    }
  }
}

Kilo Code

Settings → MCP Servers → Edit MCP Settings (mcp_settings.json), or .kilocode/mcp.json in your project:

{
  "mcpServers": {
    "redis": {
      "command": "node",
      "args": ["/absolute/path/to/redis-mcp/src/index.js"],
      "env": { "REDIS_URL": "redis://127.0.0.1:6379" }
    }
  }
}

Antigravity (Google)

Agent panel → MCP servers (⚙) → Manage MCP Servers → View raw config (mcp_config.json):

{
  "mcpServers": {
    "redis": {
      "command": "node",
      "args": ["/absolute/path/to/redis-mcp/src/index.js"],
      "env": { "REDIS_URL": "redis://127.0.0.1:6379" }
    }
  }
}

Safety model

  1. The AI calls a destructive tool without confirm → the server refuses and returns a message telling the AI to ask the user first, listing exactly what would be deleted.
  2. The user explicitly approves.
  3. The AI retries with confirm=true (and the confirm phrase for flush).

The gate lives in the server, so it holds even if the client/AI forgets to ask.

License

MIT

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