How Valkey MCP Server works
The Valkey MCP server gives your agent a set of structured tools for working with the configured Valkey datastore. When you make a request, the agent selects the appropriate tool, provides the required parameters, and receives the result directly from Valkey. The server handles command construction and validation, so the agent does not need to generate client code or manually format Valkey commands.
The Valkey MCP server provides the following capability areas:
| Capability area | Purpose |
|---|---|
| Valkey operations | Read and modify strings, hashes, lists, sets, sorted sets, streams, and other Valkey data structures. |
| JSON operations | Store, retrieve, and update JSON documents and arrays using structured paths. |
| Search and AI workloads | Create search indexes, add documents, run text, semantic, vector, and hybrid searches, and aggregate results. |
| Operational safeguards | Separates read, write, and administrative operations. Destructive administrative commands are disabled by default, and the server can be run in read-only mode. |
The server uses structured JSON inputs and translates them into the appropriate Valkey operations. This reduces command-formatting errors and gives the agent a consistent interface across common data, search, and operational tasks.
Full Valkey access through a compact tool surface
The Valkey MCP server gives agents access to the full Valkey command set through three structured tools:
valkey_readhandles read-only operations such asGET,HGETALL,SCAN, andINFO.valkey_writesupports mutations such asSET,HSET,DEL, andLPUSH.valkey_admincovers configuration and high-impact operations.
This keeps the tool surface simple for agents while supporting Valkey capabilities like strings, hashes, lists, sorted sets, streams, pub/sub, bitmaps, HyperLogLog, and others.
Simplified AI, search, and analytics workflows
The Valkey MCP server provides four purpose-built tools for vector, semantic, text, and hybrid search, along with aggregations. Agents can query your data without constructing low-level commands, giving developers a direct path from a natural-language request to a working Valkey search or AI workflow.
manage_indexlets agents create, drop, inspect, or list search indexes.add_documentsingests documents into a search index and automatically creates the index if it does not exist. It also supports optional embedding generation for semantic search, using open-source embedding packages by default and configurable providers such as Amazon Bedrock, OpenAI, or Ollama.searchprovides a unified interface for semantic, text, hybrid, and find-similar searches. It automatically detects the search mode from the parameters provided.aggregateprovides a structured pipeline builder forFT.AGGREGATE, with support forGROUPBY,SORTBY,APPLY,FILTER, andLIMITstages.
When debugging, the search and aggregate tools let agents inspect the actual contents of your datastore. Agents can review indexed data, sample matching documents, and validate search and aggregation results directly in the conversation.