# redis-mcp [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/upstash/redis-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 349  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/redis-mcp

## Description
Run Redis commands and look up Upstash Redis Search docs against Upstash Redis over HTTP or TCP.

## Tools
Capabilities this server exposes over MCP:

- **redis_run_commands** — Run one or more Redis commands against an Upstash Redis database (this server is ONLY for Upstash Redis).
Commands are sent over HTTP/REST or native TCP depending on how the target database is configured — you don't choose the transport.
By default multiple commands run as a pipeline: each returns its own result/error, and one failure does not abort the others.
Set transaction:true to run them atomically (MULTI/EXEC).
For discovery prefer SCAN over KEYS, and use TYPE to inspect a key.
A valid command that fails (e.g. WRONGTYPE) returns a per-command error while the rest of the pipeline still runs; a malformed/unknown command can cause the whole request to be rejected.
Upstash Redis Search runs through THIS tool via SEARCH.* commands (SEARCH.LISTINDEXES/CREATE/QUERY/AGGREGATE/COUNT/DESCRIBE) — NOT RediSearch's FT.*; filters/aggregations are JSON strings. If you don't know the index name, run SEARCH.LISTINDEXES first; then SEARCH.DESCRIBE <index> for field names/types, and call redis_search_docs for syntax. Three gotchas: (1) a filter applies to ALL indexed documents unless you scope it, e.g. {"type":"story"} — an empty {} counts every type; (2) a plain text value like {"title":"x"} does fuzzy/smart matching, so for an exact word or adjacent phrase use {"title":{"$phrase":"x"}}; (3) add SELECT <n> field... to a query to return only the fields you need instead of whole documents.
- **redis_search_docs** — Look up **Upstash Redis** documentation — any command, feature, option, or syntax.
Covers the whole Upstash Redis surface: core Redis commands, the REST API, pipelines/transactions, and Upstash-specific features. This INCLUDES Upstash Redis Search — the SEARCH.* full-text family (SEARCH.CREATE / SEARCH.QUERY / SEARCH.AGGREGATE / SEARCH.COUNT / ...), whose JSON-based index schema and query syntax are Upstash-specific and DIFFER from Redis Labs' RediSearch FT.*, so they are unlikely to be in your training data — verify them here.
Reach for this whenever you're unsure about a command, option, or syntax, and ALWAYS before writing a SEARCH.* command. Pass a natural-language query.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "redis-mcp": {
    "command": "npx",
    "args": ["-y","@upstash/redis-mcp"],
    "env": {
      "UPSTASH_REDIS_REST_URL": "",
      "UPSTASH_REDIS_REST_TOKEN": "",
      "UPSTASH_REDIS_TCP_URL": "",
      "REDIS_URL": ""
    }
  }
}
```

**Requires environment variables:** `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN`, `UPSTASH_REDIS_TCP_URL`, `REDIS_URL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What redis-mcp MCP server does

The redis-mcp MCP server exposes Upstash Redis to MCP-compatible clients through two tools. `redis_run_commands` accepts one or more Redis commands, with each command represented as an array of arguments. It can execute commands such as `GET`, `SET`, `SCAN`, `ZADD`, `EVAL`, and the `SEARCH.*` family, as well as other Redis commands supported by the target database.

`redis_search_docs` queries Redis documentation through Context7's public API and returns relevant pages. It is intended for checking command syntax and feature behavior, particularly when an agent needs information about Upstash-specific Redis capabilities.

## How it works

The server can connect through Upstash REST/HTTP or through a TCP connection. The selected transport comes from the configured database, rather than from an option supplied to each command request. Multiple commands run as a pipeline by default: results and errors remain aligned with the input commands, and one failed command does not stop the others. Setting `transaction` to `true` changes execution to an atomic `MULTI`/`EXEC` transaction.

One process can register several named databases. A command call can select a configured database by name. The command tool also accepts optional inline REST credentials or a TCP connection string, which override the configured registry and can be used without a registered database. Because inline credentials pass through model context, environment variables or CLI options are preferable for sensitive values.

## Setup and configuration

The redis-mcp MCP server uses environment variables and command-line flags rather than a configuration file. For REST access, set `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`. For TCP access, set `UPSTASH_REDIS_TCP_URL` or `REDIS_URL` with a `rediss://` connection string. The package can be started with `npx -y @upstash/redis-mcp`; MCP clients should configure it as a stdio server and pass the relevant environment variables.

The server also supports an HTTP transport with `--transport http`; its default port is 3000. The HTTP endpoint is `/mcp`, and `/ping` provides a health endpoint. Use repeated `--database` groups or database-specific environment-variable prefixes such as `UPSTASH_REDIS_PROD_REST_URL` to register multiple targets.

`--readonly` enables best-effort rejection of write commands on both transports. A read-only REST token remains the stronger server-side control. HTTP telemetry headers can be disabled with `--disable-telemetry` or `UPSTASH_DISABLE_TELEMETRY=true`. `--debug` enables verbose stderr logging and writes `redis-mcp-debug.log`.

## Tools and capabilities

- `redis_run_commands`: Executes arbitrary Redis commands over the configured REST or TCP connection.
- Pipeline execution: Runs multiple commands independently and returns an aligned result or error for each one.
- Atomic transactions: Uses `MULTI`/`EXEC` when `transaction: true` is supplied.
- Named database selection: Targets one of several configured databases through a `database` value.
- `redis_search_docs`: Searches Redis documentation through Context7 without requiring a separate API key.

The package can be built locally with Bun, producing `dist/index.js`. Running that file without transport flags starts stdio mode; passing `--transport http --port 3000` starts the HTTP mode instead.

## Limitations and notes

The read-only option is best effort, so it should not replace permissions enforced by the Redis or Upstash credentials. The documentation search depends on Context7's public service and is separate from command execution. Raw credentials supplied in a tool call are exposed through the model's context, making preconfigured environment variables or CLI settings safer for normal use. The material does not describe a separate command allowlist; use the target database's permissions and the server's read-only option to constrain access.

_Full upstream README: https://allmcps.com/mcp/redis-mcp/readme_

