Redis for NoSQL databases
Redis is a key-value store first, and its official server is our second pick for NoSQL work because it covers two jobs at once: classic caching with strings, hashes, and lists, plus vector storage you can read and write from the same connection. It sits behind MongoDB here for one reason, MongoDB is the document database most teams mean when they say NoSQL, while Redis shines when your data is keyed and your access pattern is lookups rather than rich queries.
Where Redis pulls ahead is the moment you need an agent to inspect a cache, set a TTL, or store and retrieve an embedding without a separate vector database. The set, get, hset, and hgetall tools read and write live keys directly, and set_vector_in_hash with get_vector_from_hash let the agent stash a vector and pull it back from the same hash.
How Redis fits
For key-value work the tools are direct: set and get for strings with an optional expiration, hset, hget, hgetall, hexists, and hdel for hash fields, and lpush, rpush, lpop for list operations. The vector pair, set_vector_in_hash and get_vector_from_hash, stores an embedding as a binary blob in a hash and converts it back on read, which is what makes Redis useful for retrieval setups that already lean on it for caching.
The honest limit is that this tool set does not expose Redis's full query surface. There is no general-purpose query or search command here, so an agent inspects and edits keys it can name rather than scanning a collection by predicate. MongoDB fits better when you want to query documents by field, Couchbase when you want SQL-style access over JSON, and SurrealDB when one query language across tables, graphs, and documents is the point. Reach for Redis when the store is keyed, you care about expirations, or you want vectors and cache living in the same place.
Tools you would use
| Tool | What it does |
|---|---|
| set | Set a string value with an optional expiration time. |
| get | Get a string value. |
| hset | Set a field in a hash with an optional expiration time. |
| hget | Get the value of a field in a hash. |
| hdel | Delete a field from a hash. |
| hgetall | Get all fields and values from a hash. |
| hexists | Check whether a field exists in a hash. |
| set_vector_in_hash | Store a vector as a field in a hash. |
| get_vector_from_hash | Retrieve a vector from a hash and convert it back from a binary blob. |
| lpush | Push a value onto the left of a list, optionally with an expiration. |
FAQ
- Can the Redis MCP server run arbitrary Redis commands or queries?
- No. It exposes a fixed set of typed operations: strings (set, get), hashes (hset, hget, hgetall, hexists, hdel), lists (lpush, rpush, lpop), and two vector helpers. The agent works with keys it can name rather than running ad-hoc queries, so for predicate-based search over documents MongoDB is the stronger pick.
- Does Redis handle vector search for this use case?
- It stores and retrieves vectors with set_vector_in_hash and get_vector_from_hash, keeping an embedding as a field in a hash and converting it back on read. That covers stashing and pulling vectors alongside your cache, which is why Redis ranks second here for NoSQL work.