awslabs.valkey-mcp-server

v1.1.4
awslabs.valkey-mcp-server Checked 1 day ago Published 15 days ago

An 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.

ParameterTypeDescription
key *string
pathstring

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".

ParameterTypeDescription
key *string
value *
pathstring
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".

ParameterTypeDescription
key *string
values *array
pathstring

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.

ParameterTypeDescription
key *string
indexinteger
pathstring

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".

ParameterTypeDescription
key *string
start *integer
stop *integer
pathstring

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")…

ParameterTypeDescription
documents *array
index_name *string
embedding_dimensions
embedding_field
id_fieldstring
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":…

ParameterTypeDescription
index_name *string
pipeline
querystring

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…

ParameterTypeDescription
action *string
distance_metricstring
index_name
index_typestring
prefix
schema
structure_typestring

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=…

ParameterTypeDescription
command *string
args
confirmboolean

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"])…

ParameterTypeDescription
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…

ParameterTypeDescription
command *string
args