Model Context Protocol (Official)
Redis MCP Server
Official Model Context Protocol Redis server that lets AI coding agents read, write, and query Redis data using natural language.
Last reviewed Feb 28, 2026
What it does
The Redis MCP Server connects AI coding agents to a Redis instance. Agents can store and retrieve key-value pairs, set expiration, delete keys, and list keys by pattern. This is useful when implementing caching, session storage, or feature flags and you want the agent to inspect or manipulate Redis data during development.
Available tools
| Tool | What it does |
|---|---|
set |
Store a key-value pair with optional TTL |
get |
Retrieve a value by key |
delete |
Remove one or more keys |
list |
Find keys matching a pattern (e.g., user:*) |
The server uses the Redis connection string passed as an argument or via environment variable.
Setup by tool
Cursor
Create .cursor/mcp.json:
{
"mcpServers": {
"redis": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-redis", "redis://localhost:6379"]
}
}
}
For authenticated Redis: redis://:password@localhost:6379. For Redis Cloud or remote: redis://default:password@host:port.
Claude Code
Add to your Claude configuration file:
{
"mcpServers": {
"redis": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-redis", "redis://localhost:6379"]
}
}
}
VS Code / GitHub Copilot
Add the same configuration. Ensure Redis is running locally (default port 6379) or use a connection string for a remote instance. On Windows, use WSL or Memurai for a Redis-compatible server.
When to use this
- Cache implementation: Agents inspect and debug cache keys during development
- Session debugging: Check session data stored in Redis
- Feature flags: Read flag state or configuration stored in Redis
- Rate limiting: Inspect rate-limit keys and values
- Queue inspection: List and read values from Redis-backed queues (when using appropriate data structures)
Security considerations
- Connect only to development or staging Redis instances, not production
- Connection strings may contain passwords; use environment variables for production-like config
- The server has full read/write access to the Redis instance; restrict network access
- Consider a dedicated Redis database number for agent use to isolate from app data
- Avoid storing secrets in Redis when the agent has access
- Ensure Redis is not exposed to the public internet
Compatibility
Related MCP servers
AWS MCP Server
Open source MCP servers from AWS Labs that give AI coding agents access to AWS documentation, best practices, and contextual guidance for building on AWS.
Docker MCP Server
Docker MCP Gateway orchestrates MCP servers in isolated containers, providing secure discovery and execution of Model Context Protocol servers across AI coding tools.
Figma MCP Server
Official Figma MCP server that brings design context, variables, components, and Code Connect data into AI coding sessions for design-to-code workflows.