awslabs.valkey-mcp-server
v1.1.4An AWS Labs Model Context Protocol (MCP) server for valkey
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
json_get
Get a JSON value at a path from a Valkey key. Args: key: Valkey key name path: JSONPath expression (default: "$" for root) Returns: Dict with "status" and "value". For non-wildcard paths, single values are unwrapped from the JSONPath array.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
path | string |
json_set
Set a JSON value at a path on a Valkey key. Args: key: Valkey key name value: Value to set (string, number, boolean, array, object, or null) path: JSONPath expression (default: "$" for root) ttl: Optional TTL in seconds. Note: JSON.SET + EXPIRE is not atomic — if the server crashes between the two calls, the key persists without TTL. Returns: Dict with "status".
| Parameter | Type | Description |
|---|---|---|
key * | string | |
value * | ||
path | string | |
ttl |
json_arrappend
Append values to a JSON array at a path. Args: key: Valkey key name values: Values to append to the array path: JSONPath expression pointing to an array (default: "$") Returns: Dict with "status" and "new_length".
| Parameter | Type | Description |
|---|---|---|
key * | string | |
values * | array | |
path | string |
json_arrpop
Pop an element from a JSON array at a path. Args: key: Valkey key name path: JSONPath expression pointing to an array (default: "$") index: Array index to pop (default: -1 for last element) Returns: Dict with "status" and "popped" value.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
index | integer | |
path | string |
json_arrtrim
Trim a JSON array to a specified range. Args: key: Valkey key name start: Start index (inclusive) stop: Stop index (inclusive) path: JSONPath expression pointing to an array (default: "$") Returns: Dict with "status" and "new_length".
| Parameter | Type | Description |
|---|---|---|
key * | string | |
start * | integer | |
stop * | integer | |
path | string |
add_documents
Add documents to a Valkey Search index with optional embedding generation. Stores documents as Valkey hashes. When embedding_field and text_fields are provided, generates vector embeddings via the configured provider (Bedrock, OpenAI, or Ollama), binary-packs them, and stores alongside document data. Auto-creates the index if it doesn't exist and embeddings are generated. Args: index_name: Name of the Valkey Search index documents: List of dicts, each must contain a field matching id_field id_field: Field to use as document ID (default: "id")…
| Parameter | Type | Description |
|---|---|---|
documents * | array | |
index_name * | string | |
embedding_dimensions | ||
embedding_field | ||
id_field | string | |
prefix | ||
text_fields |
aggregate
Run an FT.AGGREGATE pipeline on a Valkey Search index. Translates structured JSON pipeline stages into FT.AGGREGATE syntax, eliminating the need to know the complex ordered DSL. Args: index_name: Valkey Search index name query: Filter query (e.g., "@price:[0 inf]", "@category:{Books}") pipeline: Ordered list of pipeline stages. Each stage is a dict with a "type" key. Supported types: GROUPBY — group and aggregate: {"type": "GROUPBY", "fields": ["@category"], "reducers": [{"function": "COUNT", "alias":…
| Parameter | Type | Description |
|---|---|---|
index_name * | string | |
pipeline | ||
query | string |
manage_index
Manage Valkey Search indices: create, drop, inspect, or list. Handles FT.CREATE, FT.DROPINDEX, FT.INFO, and FT._LIST through structured input, eliminating the need to construct raw Valkey search syntax. Args: action: "create", "drop", "info", or "list" index_name: Index name (required for create, drop, info) schema: Field definitions for create. Each field dict needs "name" and "type" (TEXT, NUMERIC, TAG, VECTOR). VECTOR fields also need "dimensions". Example: [{"name": "title", "type": "TEXT"}, {"name": "em…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
distance_metric | string | |
index_name | ||
index_type | string | |
prefix | ||
schema | ||
structure_type | string |
search
Search a Valkey Search index with auto-detected mode. Defaults to hybrid when embeddings are configured, which combines text matching with semantic similarity for best results. Use mode="text" only when you specifically want keyword-only matching. Modes (auto-detected unless mode is set explicitly): - Hybrid (default when embeddings configured): combines text matching with semantic similarity for best results - Semantic: vector similarity only, best for conceptual/meaning-based queries - Text: keyword matching only, use when you specifically want exact term…
| Parameter | Type | Description |
|---|---|---|
index_name * | string | |
document_id | ||
filter_expression | ||
hybrid_weight | number | |
limit | integer | |
mode | ||
offset | integer | |
query_text | ||
return_fields | ||
vector_field | string |
valkey_admin
Execute a destructive Valkey command. Admin tier — disabled by default. Requires both: 1. Server config: VALKEY_ADMIN_ENABLED=true 2. confirm=True parameter on each call Never enable on staging or production clusters. Args: command: Valkey command (e.g., "FLUSHALL", "CONFIG SET", "EVAL") args: Command arguments as strings confirm: Must be True to execute. Double safety gate. Returns: Dict with "status" and "result". Examples: valkey_admin(command="FLUSHALL", confirm=True) valkey_admin(command="CONFIG SET", args=…
| Parameter | Type | Description |
|---|---|---|
command * | string | |
args | ||
confirm | boolean |
valkey_read
Execute a read-only Valkey command. Safe tier — always available, even in readonly mode. Only allowlisted read-only commands are accepted. Args: command: Valkey command name (e.g., "GET", "HGETALL", "SCAN", "INFO") args: Command arguments as strings Returns: Dict with "status" and "result". Examples: valkey_read(command="GET", args=["mykey"]) valkey_read(command="HGETALL", args=["user:123"]) valkey_read(command="SCAN", args=["0", "MATCH", "user:*", "COUNT", "100"]) valkey_read(command="INFO", args=["memory"])…
| Parameter | Type | Description |
|---|---|---|
command * | string | |
args |
valkey_write
Execute a mutating Valkey command. Write tier — allowlisted mutations only. Destructive commands (FLUSHALL, SHUTDOWN, etc.) are blocked. Disabled in readonly mode. Args: command: Valkey command name (e.g., "SET", "HSET", "DEL", "LPUSH") args: Command arguments as strings Returns: Dict with "status" and "result". Examples: valkey_write(command="SET", args=["mykey", "myvalue"]) valkey_write(command="HSET", args=["user:123", "name", "Alice", "age", "30"]) valkey_write(command="DEL", args=["tempkey"]) valkey_write(co…
| Parameter | Type | Description |
|---|---|---|
command * | string | |
args |