Redis powers session caches, rate limiters, leaderboards, task queues, and pub/sub messaging in millions of production stacks. If you use Claude, Cursor, or another MCP-compatible AI client, you can now query and write to Redis in plain English instead of raw commands. The official Redis MCP server, maintained by Redis, Inc., gives your agent a natural-language interface to your full data store. MCPFind indexes 414 database MCP servers in its databases category, and Redis is one of the few entries with an officially supported implementation. If you are new to how these integrations work, the MCP overview explains the protocol. This guide covers what the server connects, how to set it up, which data structures it supports, and how to keep production access safe.
What Does the Redis MCP Server Connect to Your AI Agent?
The Redis MCP server connects a running Redis instance to any MCP-compatible AI client and exposes your key-value store through natural-language queries. Once configured, you can ask Claude to check a session key, scan keys that match a prefix, inspect a sorted set, or peek at a message queue without writing a single Redis command.
Unlike SQL-focused database MCP servers, Redis does not have tables or schemas. The server maps natural-language requests to Redis commands and returns raw data. This makes it well-suited for reading application state, debugging cache behavior, checking rate-limit counters, and tracing message queue contents. The databases category on MCPFind lists 414 servers across SQL, NoSQL, vector stores, and in-memory options. Supabase tops the category at 2,556 GitHub stars as a PostgreSQL-based option, while Redis fills a distinct niche for cache-layer and real-time data access. Knowing which category of server fits your workflow first saves time before you commit to a setup.
How Do You Install and Configure the Redis MCP Server in Claude Desktop?
Installing the Redis MCP server requires uvx and a running Redis instance with its connection URL available. Redis, Inc. maintains the server at github.com/redis/mcp-redis and recommends uvx to avoid a global package install.
Add this block to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"redis": {
"command": "uvx",
"args": ["mcp-redis"],
"env": {
"REDIS_URL": "redis://localhost:6379"
}
}
}
}For TLS connections, replace redis:// with rediss:// and include credentials in the URL. For Redis Cloud, swap in your cloud endpoint. For Cursor, place the same block in .cursor/mcp.json. After saving and restarting your client, the Redis tools appear in your AI agent's tool list. Verify the connection by asking Claude to list keys or run an INFO command. Both are non-destructive and confirm the server is reachable before you run any data queries.
What Redis Data Structures Can You Query Through MCP?
The Redis MCP server exposes tools for all major Redis data structures, not just simple string gets and sets. You can read and write strings, hashes, lists, sets, sorted sets, and streams. Pub/sub channel access is included, so your agent can publish to or subscribe from active Redis Streams workflows.
For caching use cases, the most practical operations are key scanning with pattern matching, TTL inspection, and hash field reads. If you are debugging a slow cache, ask Claude to scan for keys matching a prefix, check expiration times, and compare values against expected outputs. For task queue monitoring, list operations let your agent check queue depth and peek at the front without dequeuing. Sorted sets are useful for leaderboard queries and priority queues, and streams give read access to append-only event logs. Time-series data through compatible Redis modules is also queryable if your instance has those modules installed. This range of access makes Redis MCP a practical complement to SQL-oriented servers like the MySQL MCP server or the PostgreSQL options covered in the databases roundup.
How Do You Restrict Redis MCP to Read-Only Access in Production?
The Redis MCP server allows both reads and writes by default, which is acceptable for development but risky in shared or production environments. You have two practical options for restricting access.
The first option is Redis ACL users. Create a dedicated user with read-only command permissions and point the server's REDIS_URL at that user's credentials. A properly scoped ACL user can only run GET, HGET, LRANGE, SMEMBERS, SCAN, and similar read commands, blocking your agent from accidentally deleting keys, flushing databases, or publishing to production channels. Set this up with ACL SETUSER mcp-reader on >password ~* &* +@read in the Redis CLI. The second option is network-level isolation: run the Redis MCP server against a read-only replica rather than your primary instance. This prevents writes at the infrastructure level rather than relying on command filtering alone. For lower-risk workflows like debugging or monitoring a staging environment, neither restriction is strictly required. For any agent operating against shared production data, the ACL approach is the safer default.
What Is the Difference Between redis/mcp-redis and redis/agent-memory-server?
Redis maintains two separate MCP-related projects that serve different purposes. The standard mcp-redis server provides direct access to your existing Redis data, useful for reading application state, debugging cache behavior, and managing message queues. The separate redis/agent-memory-server is purpose-built for AI agent memory, providing long-term storage, session management, and namespace isolation designed specifically for agents that need persistent state across conversations.
If your goal is to give Claude read or write access to your application's Redis instance, use mcp-redis. If you are building an agent that needs its own memory separate from your application data, agent-memory-server is the right fit. The two can run at the same time, with agent-memory-server pointing to a dedicated Redis namespace while mcp-redis connects to your application database. For a broader view of database access options in the MCP ecosystem, the Supabase MCP deep dive and the MongoDB MCP server guide show how other data stores handle similar access patterns through MCP.