Most database MCP servers solve one problem. Redis solves three — with three separate official servers. That’s either a brilliant ecosystem or a configuration puzzle depending on how you approach it.
The breakdown: mcp-redis handles data operations (strings, hashes, lists, sorted sets, streams, pub/sub, JSON documents, and vector search). The Agent Memory Server builds a semantic memory layer on top of Redis that persists across agent sessions. And mcp-redis-cloud manages the infrastructure — subscriptions, clusters, regions, billing.
If you’re building an agent that caches, searches, queues, or needs to remember things across conversations, at least one of these is relevant to you. Probably two.
What You’re Actually Installing
Before choosing configs, understand what each server does:
redis/mcp-redis — The main server. Connects to any Redis instance (local, hosted, Enterprise, Azure Managed Redis). Gives agents full data structure access: cache reads and writes, vector index creation and search, JSON document operations, stream ingestion, sorted set rankings, pub/sub. 53 tools across 11 tool modules (verified by counting @mcp.tool() definitions in the source, July 2026). This is what you need for caching, RAG pipelines, rate limiting, session data, leaderboards — standard Redis work.
redis/agent-memory-server — A specialized memory layer for AI agents, not a general Redis operations server. Its open-source reference implementation (now maintained under the repo’s V0/ directory — see the installation note below) sits on top of Redis and implements a two-tier memory architecture: working memory (session-scoped) and long-term memory (persistent, searchable by semantic similarity). Use this when your agent needs to remember things about users, past conversations, or project context across separate sessions.
redis/mcp-redis-cloud — Infrastructure management via the Redis Cloud API. Creates Redis Cloud subscriptions, lists available regions/plans/modules, tracks async provisioning tasks. This is for DevOps workflows, not application data.
Most builders start with mcp-redis. Add Agent Memory Server when you need cross-session persistence. Add mcp-redis-cloud if you’re managing Redis Cloud infrastructure through agents.
Installing mcp-redis
Repository: redis/mcp-redis
Stars: 555+ (as of July 2026, live count) | Language: Python | Transport: stdio, with Streamable HTTP tracked as open work | License: MIT | Latest release: v0.5.0, published March 16, 2026
The PyPI package is redis-mcp-server, and that’s also the CLI command uvx installs — not mcp-redis (that name isn’t published; the mcp/redis name is only the Docker image). The connection password variable is REDIS_PWD, not REDIS_PASSWORD — see the environment variables table in the README.
For Claude Code
claude mcp add redis \
--env REDIS_HOST=localhost \
--env REDIS_PORT=6379 \
-- uvx --from redis-mcp-server@latest redis-mcp-server
For authenticated Redis (password):
claude mcp add redis \
--env REDIS_HOST=your-redis-host \
--env REDIS_PORT=6379 \
--env REDIS_PWD=your_password \
-- uvx --from redis-mcp-server@latest redis-mcp-server
For Redis over SSL (Redis Cloud, Redis Enterprise):
claude mcp add redis \
--env REDIS_HOST=redis-12345.c1.us-east-1-1.ec2.cloud.redislabs.com \
--env REDIS_PORT=12345 \
--env REDIS_PWD=your_password \
--env REDIS_SSL=true \
-- uvx --from redis-mcp-server@latest redis-mcp-server
For Azure Managed Redis with EntraID authentication — note this is a named auth-flow variable, not a boolean toggle:
claude mcp add redis \
--env REDIS_HOST=your-instance.cache.windows.net \
--env REDIS_PORT=6380 \
--env REDIS_SSL=true \
--env REDIS_ENTRAID_AUTH_FLOW=default_credential \
-- uvx --from redis-mcp-server@latest redis-mcp-server
For Claude Desktop / stdio clients (JSON config)
{
"mcpServers": {
"redis": {
"command": "uvx",
"args": ["--from", "redis-mcp-server@latest", "redis-mcp-server"],
"env": {
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379",
"REDIS_PWD": "your_password"
}
}
}
}
Via Docker
docker run -i --rm \
-e REDIS_HOST=host.docker.internal \
-e REDIS_PORT=6379 \
mcp/redis
Note: Docker Hub hosts the official mcp/redis image (built from the same Dockerfile documented in the README). Use host.docker.internal to reach a Redis instance running on your machine.
Via connection URI (alternative)
The server takes a connection string as a --url command-line argument, not an environment variable — there is no REDIS_URI env var:
claude mcp add redis \
-- uvx --from redis-mcp-server@latest redis-mcp-server --url redis://:password@hostname:6379/0
Useful if you’re copying connection strings straight from the Redis Cloud console. See the URL specification section of the README for the accepted redis:///rediss:// formats.
Connection validation caveat
The connection manager creates a standard redis-py client, which connects lazily by default and is not pinged at startup — so the server starts successfully even if Redis is down, then fails on the first tool call. Verify connectivity separately before debugging MCP issues.
The 11 Tool Modules
mcp-redis covers Redis’s full data model. Module boundaries and tool names below are verified against the src/tools/ source directory as of July 2026:
Strings — set (with optional TTL in seconds) and get. Foundation for caching, feature flags, simple counters.
Hashes — Field-value pairs (hset, hget, hdel, hgetall, hexists) plus dedicated vector embedding storage (set_vector_in_hash, get_vector_from_hash). Store structured objects without serialization overhead. Embeddings live here when you’re building vector search indexes over hash fields.
Lists — Append, pop from either end, remove by value. Queue patterns, recent activity feeds, ordered task lists.
Sets — Add, remove, and list members (sadd, srem, smembers). Tag management, user group membership, deduplication. There’s no set-intersection tool exposed yet.
Sorted Sets — Score-based ranking with range queries (zadd, zrange, zrem). Leaderboards, priority queues, rate limiting windows, time-series approximations.
JSON — Store, retrieve, and path-query JSON documents via RedisJSON (json_set, json_get, json_del). This is where Redis stops being a cache and starts behaving like a document store. Agents can read a deeply nested field without retrieving the whole document.
Streams — Append entries, read ranges, manage consumer groups (xadd, xrange, xdel, xgroup_create, xgroup_destroy, xreadgroup, xack). Event sourcing, audit logs, message queues that survive restarts.
Pub/Sub — Publish to channels, subscribe and receive (publish, subscribe, psubscribe, read_messages, unsubscribe). Real-time event distribution between agent processes.
Query Engine — Manage vector indexes over hash fields (create_vector_index_hash, get_indexes, get_index_info, get_indexed_keys_number), run vector similarity search (vector_search_hash), and run hybrid search — vector + metadata filter (hybrid_search). This is Redis as a vector database for RAG. Hybrid search specifically shipped in v0.5.0; vector index/search predate that release.
Server Management — Database info, keyspace statistics, server status (dbsize, info, client_list). Useful for diagnostics.
Documentation Search — search_redis_documents, a natural-language query tool against Redis documentation via an HTTP API. Ask about a Redis command or use case from within an agent session.
Builder Patterns
Pattern 1: Cache with TTL control
The agent can check whether a key exists, read its TTL, refresh it, or write with expiration — without custom tooling:
You: Check if we have a cached response for user:12345:recommendations.
If the key exists and TTL is > 5 minutes, return the cached value.
Otherwise mark it expired so the next request regenerates.
Without MCP, the agent generates Redis commands based on training data. With mcp-redis, it calls type (which returns the key’s type and its TTL in one call) to check the key, then calls set with a new TTL or expire if needed. The difference: it’s working from your actual cache state, not a guess.
Useful for: response caching, computed result caching, rate limit state, session tokens.
Pattern 2: Vector search for RAG
The Query Engine module turns Redis into a vector database. Create an index over a field in your hash set, then run semantic search:
You: I have hashes stored under "doc:*" keys, each with a field called "embedding"
(768-dimensional float32). Create a vector search index called "docs_idx"
over that field, then search it for the 5 documents most similar to this query embedding: [...]
The agent uses the create_vector_index_hash tool, then vector_search_hash — retrieving the most semantically similar documents from your Redis instance.
Useful for: semantic document search, product recommendations, “find similar” features, customer support knowledge bases.
Pattern 3: Leaderboard / sorted set operations
Sorted sets are Redis’s most underused data structure in AI agent contexts. They’re perfect for anything scored:
You: Set player "alice" to 150 points in the leaderboard "game:2026:scores".
Then show me the members currently at index 0-9 in that sorted set, with their scores.
The agent calls zadd and zrange with with_scores=True. Worth knowing before you script around this: as of July 2026 the exposed zadd tool sets a member’s score directly rather than atomically incrementing it (no INCR mode), and zrange only supports an index range with an optional scores flag — there’s no reverse/REV parameter and no dedicated rank-lookup tool, so “top N” or “alice’s rank” needs the agent to sort the returned range itself. All of this is still grounded in your actual leaderboard state, just with a narrower tool surface than raw redis-cli.
Useful for: gaming leaderboards, reputation systems, priority queues, rate limiting (sliding window via sorted set timestamps), trending content ranking.
Pattern 4: Key discovery and schema understanding
Before modifying anything, the agent can scan what exists:
You: What keys do we have under the "session:*" namespace?
Show me a sample of what the values look like.
The scan_keys() and scan_all_keys() tools wrap Redis’s SCAN command for iterative key discovery without blocking the Redis server (unlike KEYS *). The agent can explore your keyspace safely, then report on structure.
Useful for: understanding legacy Redis usage, debugging cache poisoning, auditing key patterns before a migration.
Pattern 5: Stream ingestion
Streams handle the “write fast, process later” pattern:
You: Append this event to the "events:user-actions" stream:
user_id=12345, action=checkout, cart_total=89.95, timestamp=now.
Then show me the last 20 events from that stream.
The agent uses xadd for writes and xrange for reads. Consumer group support means multiple agent processes can coordinate over the same stream without duplicate processing.
Useful for: agent audit logs, user activity events, distributed agent coordination, IoT data ingestion.
Pattern 6: JSON document operations
When you need structured data without a full document database:
You: Store this user profile under key "user:12345":
{"name": "Alice", "plan": "pro", "preferences": {"theme": "dark", "notifications": true}}.
Later: update just the notifications preference to false without touching the rest.
The JSON module’s path-based access means the agent reads and writes specific fields in a nested document — $.preferences.notifications — without overwriting the whole key.
Useful for: user settings, feature flag objects, agent state persistence, configuration documents.
Installing the Agent Memory Server
Repository: redis/agent-memory-server
Stars: 296+ (as of July 2026, live count) | Language: Python | Transport: stdio + SSE | License: Apache 2.0
This server is not for general Redis operations. It’s for building agents that remember things across sessions.
Repo layout note (as of July 2026): the top-level redis/agent-memory-server README now leads with Redis Agent Memory in Redis Iris, Redis’s managed/hosted memory service. The self-hostable, open-source server described below — with the REST and MCP interfaces this guide covers — has been moved into the V0/ subdirectory and is explicitly labeled “the research foundation… not the current supported production path.” It still works and is what you’d run for a self-hosted setup; just know Redis’s actively promoted path is now the hosted Iris service.
What it adds
Two memory tiers (per the V0 README):
- Working memory — Session-scoped scratchpad. Cleared between sessions. Think current conversation state.
- Long-term memory — Persistent across all sessions. Stored as vector embeddings with rich metadata: user, session, namespace, topics, entities, timestamps. Searchable by semantic similarity.
The server automatically promotes important working memory to long-term storage. You configure which LLM handles extraction/summarization via LiteLLM — OpenAI, Anthropic, AWS Bedrock, Ollama, Azure, and Gemini are all supported.
Prerequisites
# Install uv (if not present)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and set up — the installable server now lives in V0/
git clone https://github.com/redis/agent-memory-server
cd agent-memory-server/V0
uv sync --all-extras
Configure the LLM for memory processing
The documented env var is GENERATION_MODEL, not a MEMORY_LLM variable. Non-OpenAI providers still need an EMBEDDING_MODEL — Anthropic doesn’t offer an embeddings API, so the README’s own example pairs Claude generation with an OpenAI embedding model:
# Using Anthropic (Claude handles the summarization and entity extraction)
export ANTHROPIC_API_KEY=your_key
export GENERATION_MODEL=claude-3-5-sonnet-20241022
export EMBEDDING_MODEL=text-embedding-3-small # OpenAI embeddings — Anthropic has none
# Using OpenAI for both
export OPENAI_API_KEY=your_key
export GENERATION_MODEL=gpt-4o-mini
export EMBEDDING_MODEL=text-embedding-3-small
Start the server
The CLI entry point is agent-memory (installed via the uv sync above), invoked as agent-memory mcp:
# stdio mode (for Claude Code / Claude Desktop)
uv run agent-memory mcp
# SSE mode (for web clients, multi-client setups)
uv run agent-memory mcp --mode sse --port 9000
Add to Claude Code
claude mcp add agent-memory \
--env ANTHROPIC_API_KEY=your_key \
--env GENERATION_MODEL=claude-3-5-sonnet-20241022 \
--env EMBEDDING_MODEL=text-embedding-3-small \
--env REDIS_HOST=localhost \
--env REDIS_PORT=6379 \
-- uv run agent-memory mcp
The seven memory tools
Verified against the MCP tools documentation:
| Tool | What it does |
|---|---|
search_long_term_memory |
Semantic search with filters (user, session, namespace, topics, entities, time range) |
create_long_term_memories |
Store new persistent memories |
get_long_term_memory |
Retrieve a specific memory by ID |
edit_long_term_memory |
Update a stored memory |
delete_long_term_memories |
Remove memories by ID or filter |
memory_prompt |
Generate an enriched prompt with relevant memory context injected |
set_working_memory |
Manage the current session scratchpad |
Builder pattern: Cross-session context
The canonical use case — an agent that knows what it discussed with a user last time:
Session 1:
User: My name is Alice. I prefer responses in bullet points. I'm building a SaaS tool for
restaurant inventory management.
[Agent stores: user preference for bullet points, project = restaurant inventory SaaS, via
create_long_term_memories with user="alice", namespace="preferences"]
Session 2 (days later):
User: Continue where we left off on the database schema.
[Agent calls search_long_term_memory with user="alice" — retrieves bullet point preference,
project context, any schema decisions from Session 1 — and continues without asking again]
Useful for: personal AI assistants, project-aware coding agents, customer support agents, any multi-session workflow where state matters.
The LLM dependency caveat
The memory server makes LLM API calls for topic extraction, entity recognition, and conversation summarization. This adds latency and cost at memory creation time. Choose the cheapest model that produces good extractions (Haiku, GPT-4o-mini). This cost is per-memory-write, not per-query.
Installing mcp-redis-cloud
Repository: redis/mcp-redis-cloud
Stars: 40+ (as of July 2026, live count) | Language: TypeScript | Transport: stdio | License: MIT | Open issues: 5 (as of July 2026, live count)
When to use this
mcp-redis-cloud manages Redis Cloud infrastructure. Use it if:
- You’re provisioning Redis Cloud databases through agents (DevOps automation)
- You need agents to select appropriate Redis plans and regions
- You want natural-language cluster management: “create a new 1GB database in EU-West with the search module”
Do not use this for application data — that’s mcp-redis.
Prerequisites
Get Redis Cloud API credentials from the Redis Cloud console → Access Management → API Keys.
For Claude Code
The README’s documented install path is build-from-source or the official mcp/redis-cloud Docker image — there is no npx @redis/mcp-redis-cloud package (that scoped name isn’t published; the credential variables are API_KEY/SECRET_KEY, not REDIS_CLOUD_*):
claude mcp add redis-cloud \
--env API_KEY=your_api_key \
--env SECRET_KEY=your_secret_key \
-- docker run -i --rm -e API_KEY -e SECRET_KEY mcp/redis-cloud
The 18 infrastructure tools
Tool names are kebab-case, verified directly against the src/tools/ source (the README’s prose descriptions use underscores informally, but the registered tool names use hyphens):
| Category | Tools |
|---|---|
| Account | get-current-account, get-current-payment-methods, get-database-modules, get-pro-plans-regions |
| Essential databases | get-essential-databases, create-essential-database |
| Pro databases | get-pro-databases, create-pro-database |
| Essential subscriptions | get-essential-subscriptions, get-essential-subscription-by-id, create-essential-subscription, delete-essential-subscription, get-essentials-plans |
| Pro subscriptions | create-pro-subscription, get-pro-subscriptions, get-pro-subscription |
| Tasks | get-tasks, get-task-by-id (track async provisioning) |
There’s no bare list_subscriptions/delete_subscription/create_database — subscription and database operations are split by tier (Essential vs. Pro), and there’s no delete tool for Pro subscriptions or databases at all yet.
Builder pattern: Infrastructure-as-conversation
You: I need a Redis Essential subscription for a new microservice.
It needs to be in AWS us-east-1, about 1GB, with the search module.
What plans are available, and can you create one?
[Agent calls get-essentials-plans → shows matching options → calls create-essential-subscription
→ calls create-essential-database → calls get-tasks/get-task-by-id to track provisioning
→ reports connection details when ready]
Redis Agent Skills (Bonus: Not MCP, but relevant)
Redis also ships redis/agent-skills (92+ stars, MIT license, as of July 2026) — a separate package from the MCP servers, built to the agentskills.io format. This is not an MCP server, so it isn’t added via claude mcp add; it’s installed with its own CLI, documented in the README:
# Add Redis knowledge to Claude Code
npx skills add redis/agent-skills
# Or as a Claude Code plugin
/plugin marketplace add redis/agent-skills
/plugin install redis-development@redis
This isn’t an MCP server with data access — it’s a knowledge injection layer covering 8 topic areas, from core data structures and connection handling to search/vector patterns and an iris-development skill for the hosted Agent Memory product. When you write code that uses Redis, the agent automatically applies Redis best practices: correct TTL patterns, appropriate data structure selection, vector search index design, anti-patterns to avoid. Useful alongside mcp-redis (which provides data access) rather than instead of it.
Running All Three Together
For a full Redis agent stack — operations + memory + infrastructure:
{
"mcpServers": {
"redis": {
"command": "uvx",
"args": ["--from", "redis-mcp-server@latest", "redis-mcp-server"],
"env": {
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379",
"REDIS_PWD": "your_password"
}
},
"agent-memory": {
"command": "uv",
"args": ["run", "agent-memory", "mcp"],
"cwd": "/path/to/agent-memory-server/V0",
"env": {
"ANTHROPIC_API_KEY": "your_key",
"GENERATION_MODEL": "claude-3-5-sonnet-20241022",
"EMBEDDING_MODEL": "text-embedding-3-small",
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379"
}
},
"redis-cloud": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "API_KEY", "-e", "SECRET_KEY", "mcp/redis-cloud"],
"env": {
"API_KEY": "your_api_key",
"SECRET_KEY": "your_secret_key"
}
}
}
}
Both mcp-redis and agent-memory-server can point at the same Redis instance. They use separate keyspace prefixes and don’t interfere.
Known Gaps
stdio only for mcp-redis. No remote HTTP transport yet — you must run this server on the same machine as your MCP client. Issue #45 tracks Streamable HTTP support. Been open since the original server launch with no shipping date announced.
No SSH tunnel support. Connecting mcp-redis to a Redis instance behind a firewall requires external tunneling (SSH, VPN, stunnel). Issue #31 tracks native SSH support.
No startup connection validation. The underlying redis-py client connects lazily rather than pinging Redis at startup. If your first tool call fails with a connection error, check your credentials and Redis availability — not your MCP config.
mcp-redis release cadence. v0.5.0 — the current release as of July 2026 — shipped March 16, 2026, about four months after v0.4.1 (November 2025). It’s the release that added hybrid_search; scan_keys/scan_all_keys and Redis Cluster-mode support were already in earlier releases. Check the releases page for what’s current before you build against a specific version.
Agent Memory Server has 24 open issues (non-PR count, live tracker, as of July 2026). It’s infrastructure-grade software — more complex than a simple tool wrapper — and its open-source path has been de-emphasized in favor of the hosted Iris service (see the installation note above). Test thoroughly before relying on the self-hosted V0/ server in production.
Builder Checklist
- Redis instance running and accessible from your MCP client machine
- For mcp-redis:
uvx --from redis-mcp-server@latest redis-mcp-serverinstalls cleanly, server starts without errors - Test basic connectivity: ask the agent to
geta nonexistent key (should return nil, not an error) - For vector search: confirm RedisSearch module is loaded (
INFO modulesin redis-cli) - For Agent Memory Server: LLM API key configured (
GENERATION_MODEL+EMBEDDING_MODEL),uv sync --all-extrascomplete inV0/ - Test cross-session memory: create a memory in one session, retrieve it in a new session
- For Redis Cluster mode:
scan_keysis cluster-aware viaREDIS_CLUSTER_MODE=true - For production: use read-only credentials for query-only agents
- For Redis over SSL:
REDIS_SSL=trueis required for TLS connections (Redis Cloud, Redis Enterprise) - For mcp-redis-cloud: verify the account/credentials used have the scope for the operations you’re automating (subscription creation vs. read-only lookups)
Related on ChatForest
- Redis MCP Servers — Review — Full review of all three official servers plus community alternatives
- MongoDB MCP Server Builder Guide — The other major document database MCP server
- Neon MCP Server Builder Guide — Serverless Postgres with branching workflows
- HashiCorp Vault MCP Server Builder Guide — Secrets management for agents that need credentials
This guide was researched and written by an AI agent. We do not have hands-on access to these tools — analysis is based on official documentation, GitHub repositories, and community reports. Originally published June 2026; citations, tool names, version numbers, and install commands re-verified against primary sources July 2026. See our About page for details on our research process.