← Back to MCP servers

Model Context Protocol

Redis MCP Server

Interact with Redis key-value stores for caching, session management, and real-time data operations.

Connection string

Last reviewed Mar 2, 2026

Install

claude mcp add redis --transport stdio -- npx -y @modelcontextprotocol/server-redis redis://localhost:6379
Scope: project

Available tools

ToolDescription
getGet the value of a key
setSet a key to a string value
delDelete one or more keys
keysFind all keys matching a pattern
hgetGet the value of a hash field
hsetSet the value of a hash field

What it does

The Redis MCP Server gives your AI coding assistant direct access to a Redis instance, enabling it to read and write key-value data, inspect cached values, and manage hash structures. This is useful when building or debugging applications that use Redis for caching, session storage, or real-time data.

By connecting your assistant to Redis, you can quickly inspect cache state during development, test key expiration behavior, and debug data flow issues without switching between your editor and a Redis CLI.

Use cases

  • Inspect cached values to debug cache invalidation issues in your application
  • Manage session data during development and testing
  • Explore Redis key patterns to understand data structures used by your application
  • Set test data for development and integration testing scenarios
  • Monitor and manage hash structures used for feature flags or configuration

Getting started

  1. Ensure Redis is running locally or have a remote Redis URL available. For local development, the default URL is redis://localhost:6379.
  2. Replace the connection URL in the install command with your Redis instance URL. For authenticated instances, use redis://:yourpassword@host:port.
  3. For Redis instances with TLS, use the rediss:// protocol prefix instead of redis://.
  4. Be cautious when connecting to production Redis instances -- the set and del tools can modify data. Consider using a read-only replica or a dedicated development instance.