Redis Client for Zed: Why There's No GUI Yet, and the MCP Path That Works Today

By Olloyor Maxammadnabiyev · Published July 20, 2026

11 cells1 experiment34 views0 forks

Inside this notebook

# Building a Redis Client Extension for Zed IDE — Investigation & Build Plan **The question:** VSCode has mature Redis client extensions (GUI key browsers, REPL consoles, connection managers). Zed has none. Can we build one for Zed, and how? **TL;DR verdict:** A **1:1 port of a VSCode-style Redis GUI is NOT possible in Zed today** — Zed extensions run as *headless* WebAssembly with **no custom UI panels** and **no socket/network access**, which are the two things a Redis GUI needs. But a genuinely useful Redis integration **is** buildable right now via Zed's sanctioned path: a **Redis MCP server** (an external process that owns the TCP connection) plus a **thin Zed extension** (slash command + `.redis` language support). A true point-and-click GUI has to wait for Zed's proposed *Visual Extension API* (RFC #53403, still a draft as of 2026). This notebook documents the evidence, the feasibility verdict, three ranked build paths, and a concrete step-by-step plan with downloadable starter scaffolds.

## 1 · What the VSCode Redis extensions actually give us (the target) These are the extensions we'd be trying to match. Install counts are 2026 marketplace snapshots [^1]: | Extension | Publisher | ~Installs | Notes | |---|---|---|---| | **Database Client** | cweijan | ~353k | Multi-DB GUI (Redis, MySQL, Postgres, Mongo…) | | **Redis for VS Code** | Redis (official) | ~232k | TypeScript + React/Tailwind webview, SSPL | | **redis** | Dunn | ~110k | Lightweight key browser | | **Redis console** | kdcro101 | ~11k | REPL-focused | **Common feature set** (what "a Redis client extension" means in practice): - **Connection management** — host / port / password / DB index, **TLS**, **SSH tunnel**, **Cluster** and **Sentinel** modes; credentials stored in VSCode Secret Storage. - **Key browsing** — a sidebar **tree** grouped by key namespace (`user:*`, `session:*`), with search/scan and type icons. - **All data types** — string, hash, list, set, zset, **stream**, and **JSON** (RedisJSON), with formatter-based value rendering (ASCII / JSON / Hex / Binary / vector). - **Editing** — view & edit values, set/edit **TTL**, add/delete keys. - **Raw command console** — a **REPL** to run arbitrary Redis commands with history. - **Ops** — server info, slow log, pub/sub, monitoring, import/export. **How they're built (architecture):** a Node.js Redis client — overwhelmingly **`ioredis`** (supports Cluster/Sentinel/TLS/NAT/autopipelining) — opens a **TCP/TLS socket** to the server, and the U…

## 2 · What Zed extensions CAN and CANNOT do (the constraint) This is the crux of the whole investigation. Zed's extension model is fundamentally different from VSCode's [^2]. **How Zed extensions are built:** - Written in **Rust**, compiled to **WebAssembly** (current target `wasm32-wasip2`; older `wasm32-wasip1`/`wasi`). - Use the **`zed_extension_api`** crate (v0.7.0, Sep 2025) over a **WIT** (WASM Interface Types) boundary. - Declared in an **`extension.toml`** manifest; distributed as precompiled `.wasm` archives through the GitHub-based **Zed extensions registry**. **What an extension CAN provide** (all "headless" — no custom rendering): - ✅ **Language servers** (LSP) — autocomplete/diagnostics/hover for a language - ✅ **Tree-sitter grammars** — syntax highlighting + structure - ✅ **Slash commands** — `/command` invokable from the assistant panel - ✅ **MCP context servers** — wire an external Model Context Protocol server into Zed's AI - ✅ **Indexed docs** (`KeyValueStore`), **snippets**, **themes**, **icon themes**, **DAP debug adapters** **What an extension CANNOT provide — the two blockers:** | Need for a Redis GUI | VSCode | Zed | |---|---|---| | **Custom UI** (sidebar tree, dock panels, webview value editors) | ✅ `TreeDataProvider` + Webview | ❌ **No equivalent.** API is headless-only — no panels, no tree views, no webviews | | **Raw TCP/TLS socket** to `localhost:6379` | ✅ Node `net`/`ioredis` | ❌ **Not available.** WASM sandbox grants only `process:exec`, ho…

## 3 · Is anyone already doing Redis on Zed? Short answer: **no — the space is empty**, which is exactly why this is worth doing [^3]. - The Zed extensions registry has **no Redis entry** (`zed.dev/extensions?query=redis` returns only false positives like Redux snippets; `extensions.toml` has no `[redis]`). - No dedicated "Zed Redis" GitHub issue. The nearest request is **#21597 "SQL Database view/query console"**, closed as a *potential extension*. - **Closest precedent:** `toonvd/zed-mysql-mcp` — a **MySQL** integration delivered as an **MCP server**. This confirms Zed's *sanctioned* way to talk to an external data store is an **MCP server running as a separate process** over stdio/HTTP (`zed.dev/docs/ai/mcp`). - **Wrappable Redis tooling exists:** `fagnercarvalho/redis-lsp` (a Go LSP with completion + command execution, **unmaintained since 2021**) and an ANTLR `grammars-v4` Redis grammar (PR #4271, 2024). **No `tree-sitter-redis`/RESP grammar exists** — one would need to be authored or ported. - Standalone GPUI database apps (DBFlux, onetcli — listed in *awesome-gpui*) support Redis, but they are **separate applications, not Zed extensions**. **Takeaway:** a Redis **MCP server** and/or a Zed **language extension** (redis-lsp + a RESP tree-sitter grammar) are both feasible and currently an **unoccupied gap** in the Zed ecosystem.

## 4 · Three viable build paths (ranked) Given the constraints, here are the realistic ways to deliver "a Redis client for Zed," ranked by what's achievable now. ### 🥇 Path A — Redis MCP server + thin Zed extension *(recommended, buildable today)* Split the problem along Zed's own seam: an **external MCP server** (Node/Python/Rust process) owns the real TCP connection to Redis and exposes Redis operations as **MCP tools & resources**; Zed talks to it over **stdio**. A thin Zed extension adds a **`/redis` slash command** and **`.redis` language support** (tree-sitter grammar + LSP) so you can write command files with autocomplete. - ✅ **Buildable now** — uses only sanctioned capabilities (MCP + slash command + grammar/LSP). - ✅ The **AI assistant becomes the GUI**: "show all `session:*` keys and their TTLs" → the agent calls your MCP tools. - ⚠️ No point-and-click tree; interaction is via chat + command files. ### 🥈 Path B — Pure language extension *(lighter, buildable today)* A Zed extension that bundles a **`tree-sitter-redis` grammar** (author/port it) + wraps **`redis-lsp`** for highlighting/completion/hover on `.redis` files, plus a **slash command that shells out to `redis-cli`** via the `process:exec` capability to actually execute commands. - ✅ No MCP server to run; `redis-cli` does the networking. - ⚠️ Requires `redis-cli` installed; UX is editor-buffer-based, not a GUI; redis-lsp is unmaintained. ### 🥉 Path C — Wait for / contribute to the Visual Extension API…

## 5 · Recommended architecture (Path A) in detail ``` ┌────────────────────────────── Zed IDE ──────────────────────────────┐ │ │ │ Assistant panel Editor (.redis files) │ │ • chat / agent • tree-sitter-redis highlight │ │ • /redis slash command • redis-lsp completion + hover │ │ │ │ │ │ │ MCP (stdio, JSON-RPC) │ LSP (stdio) │ └────────────┼──────────────────────────────────┼──────────────────────┘ ▼ ▼ ┌─────────────────────┐ ┌────────────────────┐ │ Redis MCP server │ │ redis-lsp (Go) │ │ (external process) │ │ (external process) │ │ • tools: get/set/ │ │ completion/hover │ │ del/keys/type/ │ └────────────────────┘ │ ttl/hgetall/ │ │ lrange/exec … │ │ • resources: server │ │ info, key list │ └──────────┬───────────┘ │ TCP / TLS (RESP2/RESP3) ← the socket Zed itself can't open ▼ ┌───────────┐ │ Redis │ localhost:6379 (or cluster / sentinel / TLS) └───────────┘ ``` **Division of labor — this is the key design insight:** | Concern | Handled by | Why | |---|---|---| | TCP/TLS socket, RESP protocol, auth, clust…

## 6 · Step-by-step build plan **Phase 0 — Prerequisites** - Rust toolchain + the `wasm32-wasip2` target (`rustup target add wasm32-wasip2`) for the Zed extension. - Python 3.10+ (for the MCP server below) — or Node 20+ if you prefer `ioredis`. - A local Redis (`redis-server`) for testing; `redis-cli` for Path B. **Phase 1 — Build the Redis MCP server (the durable core)** 1. Implement a RESP2/RESP3 client (or wrap `redis-py`/`ioredis`) and connect over TCP/TLS. 2. Expose the tool set from §5 as MCP tools via the official `mcp` SDK (`FastMCP`), plus `info`/key-listing as resources. 3. Read connection config (host/port/password/db/tls) from env vars — never hardcode secrets. 4. Test it standalone with an MCP inspector / a couple of tool calls. *(A ready-to-run Python scaffold is included — see §7.)* **Phase 2 — Wire it into Zed (no extension needed yet!)** 5. Add the server to Zed's MCP settings (`.zed/settings.json` → `"context_servers"`), e.g. command `python`, args `["redis_mcp_server.py"]`, with env for the connection. 6. Verify in Zed's assistant panel that the Redis tools are callable from chat. **Phase 3 — Add the thin Zed extension (polish)** 7. Scaffold an extension (`zed dev: new-extension`): `extension.toml` + `Cargo.toml` + `src/lib.rs`. 8. Register a **`/redis` slash command** that primes the assistant to use the MCP tools. 9. Add a **`.redis` language**: author/port a **tree-sitter-redis** grammar (none exists yet) and/or wire **redis-lsp** as the language ser…

## 7 · Included starter scaffolds (downloadable) To make this actionable rather than advisory, the following starter files are saved to the project **outputs** so you can download and build on them: | File | Purpose | |---|---| | `redis_mcp_server.py` | A runnable **Redis MCP server** — pure-Python RESP2 client (no `redis` dependency) + official `mcp` SDK (`FastMCP`). Exposes the §5 tool set. | | `zed_mcp_settings.json` | The Zed `context_servers` snippet to plug the server into Zed's assistant. | | `zed-extension/extension.toml` | Zed extension manifest (slash command + language). | | `zed-extension/Cargo.toml` | Rust crate config targeting the Zed extension API. | | `zed-extension/src/lib.rs` | `/redis` slash command + language-server wiring (template to adapt to the current API). | | `zed-extension/languages/redis/config.toml` | `.redis` language definition. | | `BUILD_GUIDE.md` | End-to-end build & publish instructions. | > ⚠️ The Rust/WASM extension files are **templates**: verify exact `zed_extension_api` signatures against the current `zed-extension-examples` repo before compiling, since the API is still evolving (v0.7.x). The Python MCP server is the immediately-runnable core and is syntax-verified. ## Sources [^1]: VSCode Marketplace + GitHub (cweijan/vscode-database-client, Redis official extension, Dunn.redis) — 2026 snapshots. [^2]: Zed official docs (zed.dev/docs/extensions, /docs/ai/mcp), `zed_extension_api` crate, zed-industries/zed GitHub (RFC #53403, issu…

## 1b · Your specific target: cweijan "Redis / Database Client" You're using **cweijan's Redis / Database Client** (database-client.com, ~366,848 installs, 23 ratings) — the full-featured GUI client. Here's how its feature map translates to Zed, feature by feature: | cweijan feature (VSCode) | Needs | Feasible in Zed today? | How | |---|---|---|---| | Connection manager (host/port/pwd/TLS/cluster) | socket + UI | ⚠️ partial | Connection lives in the **MCP server** (env config); no GUI form | | Key tree browser (`namespace:*`) | socket + **tree UI** | ⚠️ via agent | `scan_keys` MCP tool; the **assistant renders** the list, not a sidebar tree | | View/edit values (string/hash/list/set/zset/stream/JSON) | socket + **editor UI** | ⚠️ via agent | Type-specific MCP tools (`get`/`hgetall`/`lrange`/…); edits via chat | | TTL view/edit | socket | ✅ | `ttl` / `expire` MCP tools | | Raw command console (REPL) | socket + UI | ✅ via chat | `exec` MCP tool, or `.redis` files + `/redis` slash command | | Value formatters (JSON/Hex/Binary/vector) | UI | ⚠️ | Agent formats on request; no click-to-switch widget | | Server info / monitoring / slow log | socket | ✅ | `info` / `exec SLOWLOG GET` MCP tools | | Click-to-browse sidebar + webview panels | **custom UI** | ❌ **blocked** | Needs the **Visual Extension API** (RFC #53403, not shipped) | **Bottom line for cweijan users:** everything *functional* (connect, browse, read, write, TTL, raw commands, info) is reproducible now through the **MC…

"""
Verify the Redis MCP server scaffolds:
  1. Syntax-check both Python files (py_compile — no `mcp` install needed).
  2. Unit-test the RESP2 codec (encode + parse) against canned byte streams.
  3. End-to-end test RedisClient.execute() over a FAKE socket (no live Redis),
     proving PING/SET/GET/TYPE/TTL/HGETALL/SCAN all round-trip correctly.
"""
import py_compile
import importlib.util
import sys

# ---- 1. syntax check both delivered files ---------------------------------
for f in ["redis_zed/resp.py", "redis_zed/redis_mcp_server.py"]:
    py_compile.compile(f, doraise=True)
    print(f"[syntax OK] {f}")

# ---- import resp.py (stdlib-only) -----------------------------------------
spec = importlib.util.spec_from_file_location("resp", "redis_zed/resp.py")
…
[syntax OK] redis_zed/resp.py
[syntax OK] redis_zed/redis_mcp_server.py
[encode] command encoding exact-byte tests passed
[parse] all RESP2 reply types (string/int/bulk/nil/array/nested/error) passed
[e2e] RedisClient round-trip over fake socket: PING/SET/GET/TYPE/TTL/HGETALL/SCAN all correct

✅ ALL 18 CHECKS PASSED — the RESP core that the Zed MCP server relies on is correct.

## 8 · Verification result The runnable core was tested in-notebook (no live Redis required): ``` [syntax OK] redis_zed/resp.py [syntax OK] redis_zed/redis_mcp_server.py [encode] command encoding exact-byte tests passed [parse] all RESP2 reply types (string/int/bulk/nil/array/nested/error) passed [e2e] RedisClient round-trip over fake socket: PING/SET/GET/TYPE/TTL/HGETALL/SCAN all correct ✅ ALL 18 CHECKS PASSED ``` The RESP2 codec (command encoding + reply parsing) and the full `RedisClient.execute()` path are proven correct against canned server responses. The MCP tool layer is a thin, syntax-verified wrapper over this core. ## 9 · What you walk away with **The honest answer:** you *cannot* clone cweijan's click-around GUI as a native Zed extension today — Zed's WASM extensions have **no sockets and no UI panels**. But you *can* ship a genuinely useful Redis client for Zed **now** by putting the connection + logic in an **external MCP server** and letting Zed's assistant (plus a `/redis` slash command and `.redis` editor support) drive it — and that same server becomes the backend for a real GUI the moment Zed ships the Visual Extension API (RFC #53403). **Downloadable starter kit (in `redis_zed/`):** - `resp.py` — pure-stdlib RESP2 client (TCP/TLS) — **unit-tested ✅** - `redis_mcp_server.py` — FastMCP server, 22 tools + 2 resources — **syntax-verified ✅** - `zed_mcp_settings.json` — drop-in Zed `context_servers` config - `zed-extension/` — `extension.toml`, `Cargo…