Redis Mcp

io.github.upstash由 GitHub 帳號 upstash 發布v0.1.1更新於 Oct 24, 2026

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

已驗證STDIO僅桌面資料庫知識與記憶

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理透過 HTTP 或 TCP 在 Upstash Redis 上執行 Redis 指令,並查詢 Upstash Redis 文件。

可以做什麼
執行任意 Redis 指令(GET、SET、SCAN、ZADD、EVAL、SEARCH.* 等),可作為管線或原子 MULTI/EXEC 交易,透過 HTTP/REST 或 TCP 作用於一個或多個具名資料庫。即時檢索 Upstash Redis 文件並回傳最相關的頁面,包括 Upstash 特有的 SEARCH.* 功能。
適用情境
當助理需要讀取或修改 Upstash Redis 資料庫中的資料時使用;也適合在對話中直接取得 Redis 指令與 Upstash 特有搜尋功能的協助。
執行需求
透過 npx(Node.js)以 stdio 程序在本機執行。需要一個 Upstash Redis 資料庫:HTTP 方式需 UPSTASH_REDIS_REST_URL 與 UPSTASH_REDIS_REST_TOKEN,TCP 方式需 UPSTASH_REDIS_TCP_URL(rediss://);可透過環境變數或命令列參數設定多個具名資料庫。文件搜尋使用 Context7 免費額度,無需金鑰。需要網路存取。
安裝前請注意
REST token 與 TCP 連線字串屬於憑證;優先使用環境變數或命令列參數,而非在每次呼叫中內嵌傳入,因為內嵌值會經過模型上下文。指令可能寫入、修改或刪除資料;唯讀旗標僅為盡力而為,真正的保護應使用伺服器端唯讀 REST token。HTTP 請求預設會送出 Upstash 遙測標頭,除非停用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Redis Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Upstash Redis MCP

[Add to Cursor]

Lightweight MCP server for Redis with only two tools:

  • 🧪 redis_run_commands: run one or more Redis commands over HTTP/REST or TCP, as a pipeline or an atomic transaction.
  • 📚 redis_search_docs: search the Redis docs using Context7 public api.

One server can hold multiple named databases. Configuration is pure environment variables and CLI flags.

🔌 Quickstart

Claude Code

Run this in your terminal. See the Claude Code MCP docs for more.

bash
claude mcp add upstash-redis \  -e UPSTASH_REDIS_REST_URL=https://<your-db>.upstash.io \  -e UPSTASH_REDIS_REST_TOKEN=<your-rest-token> \  -- npx -y @upstash/redis-mcp
Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project), or go to Settings → MCP → Add new MCP server. See the Cursor MCP docs.

json
{  "mcpServers": {    "upstash-redis": {      "command": "npx",      "args": ["-y", "@upstash/redis-mcp"],      "env": {        "UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",        "UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"      }    }  }}
VS Code

Add to .vscode/mcp.json (per-project) or your user mcp settings. See the VS Code MCP docs.

json
{  "servers": {    "upstash-redis": {      "command": "npx",      "args": ["-y", "@upstash/redis-mcp"],      "env": {        "UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",        "UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"      }    }  }}
Codex

Add to ~/.codex/config.toml (or a project-level .codex/config.toml). See the Codex MCP docs.

toml
[mcp_servers.upstash-redis]command = "npx"args = ["-y", "@upstash/redis-mcp"]env = { UPSTASH_REDIS_REST_URL = "https://<your-db>.upstash.io", UPSTASH_REDIS_REST_TOKEN = "<your-rest-token>" }
OpenCode

Add to opencode.json (project) or ~/.config/opencode/opencode.json (global). See the OpenCode MCP docs.

json
{  "mcp": {    "upstash-redis": {      "type": "local",      "command": ["npx", "-y", "@upstash/redis-mcp"],      "environment": {        "UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",        "UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"      }    }  }}

[!TIP] Any MCP-compatible client works. If yours isn't listed, add a stdio server that runs npx -y @upstash/redis-mcp with the two env vars above.

🧰 Tools

🧪 redis_run_commands

Run any Redis command: GET, SET, SCAN, ZADD, EVAL, the SEARCH.* family, and everything else. Each command is an array of args (numbers are accepted and coerced to strings). By default multiple commands run as a pipeline: each returns its own result/error, aligned to the input, and one failure doesn't abort the rest. Set transaction: true for an atomic MULTI/EXEC.

jsonc
{  "commands": [    ["SET", "visits", 0],    ["INCR", "visits"],    ["GET", "visits"],  ],  "transaction": false, // optional: true => atomic MULTI/EXEC  // "database": "prod"       // only when more than one database is configured  // raw credential overrides (optional):  // "rest_url", "rest_token" // HTTP  // "connection_string"      // TCP, rediss://}

The transport (HTTP vs TCP) is determined by how the target database is configured; the agent never picks it.

📚 redis_search_docs

Searches the Upstash Redis documentation live and returns the most relevant pages. Reach for it whenever you're unsure about a command or feature, especially Upstash-specific ones like the SEARCH.* full-text search family. It's powered by Context7's free tier, so no API key or extra setup is required.

jsonc
{ "query": "SEARCH.AGGREGATE date histogram" }

⚙️ Configuration

Everything is set through environment variables and CLI flags; there are no config files.

Single database

TransportEnvironmentCLI
HTTPUPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN--rest-url <url> --rest-token <token>
TCPUPSTASH_REDIS_TCP_URL (or REDIS_URL)--url <rediss://…>

Multiple databases

Give each database a name. The name becomes a selectable database value in redis_run_commands.

Environment: insert a <NAME> segment:

bash
UPSTASH_REDIS_PROD_REST_URL="https://prod-db.upstash.io"UPSTASH_REDIS_PROD_REST_TOKEN="<prod-rest-token>"UPSTASH_REDIS_CACHE_TCP_URL="rediss://default:<password>@cache-db.upstash.io:6379"

CLI: repeat --database to start each group:

bash
npx -y @upstash/redis-mcp \  --database prod  --rest-url https://prod-db.upstash.io --rest-token <prod-rest-token> \  --database cache --url rediss://default:<password>@cache-db.upstash.io:6379

[!NOTE] Raw credentials per call. A redis_run_commands call may also pass rest_url + rest_token (HTTP) or connection_string (TCP) inline; these override the registry and work even with no configured database. They flow through the model's context, so prefer env/CLI for anything sensitive.

Flags & options

FlagEnvDefaultPurpose
--transport <stdio|http>stdioServer transport
--port <n>3000Port for the http transport
--readonlyUPSTASH_REDIS_READONLYoffBest-effort: reject write commands on both transports. Server-side read-only REST tokens remain the robust option.
--disable-telemetryUPSTASH_DISABLE_TELEMETRYoffStop sending Upstash-Telemetry-* headers on HTTP requests
--debugoffVerbose logging to stderr + redis-mcp-debug.log

📡 Telemetry

HTTP/REST requests carry Upstash-Telemetry-{Sdk,Platform,Runtime} headers. Disable with --disable-telemetry or UPSTASH_DISABLE_TELEMETRY=true.

🏃 Run it locally

bash
bun installbun run build                 # emits dist/index.jscp .env.example .env          # add UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN
node dist/index.js                          # stdio (what clients spawn)node dist/index.js --transport http --port 3000   # HTTP: endpoint /mcp, health /ping

The server auto-loads .env. To point a client at your local build, swap npx -y @upstash/redis-mcp in any Quickstart config for node /absolute/path/to/redis-mcp/dist/index.js.

🛠️ Development

bash
bun installbun run buildbun testbun run lint

📄 License

MIT © Upstash

來源:README.md,提交 9bbfcfa

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分