Loomal

MCP Toolbox for Databases in Zed.

Wire Google's database MCP server into Zed's Agent Panel with a context_servers entry, so the editor can introspect schemas and run queries against your actual database.

Zed's agent can use MCP servers it calls context servers, configured straight from settings.json. Adding MCP Toolbox for Databases — Google's 15.5k-star genai-toolbox project — turns Zed's AI from a code suggester into something that can answer "why is this query slow?" by actually looking at your database.

The Toolbox ships as an OCI container image rather than an npm package, so the config below launches it through Docker in stdio mode. Total setup is one settings block and an Agent Panel restart.

What the Toolbox gives Zed

The Toolbox sits between the editor and your database engine, handling connections, pooling, and auth, and exposing safe query and schema tools over MCP. With the postgres prebuilt configuration used below, Zed's agent can list tables, describe columns, and execute SQL you ask for in plain language — without you ever pasting a schema into the chat.

Prerequisites: Docker installed and running, a reachable database, and a recent Zed build with the Agent Panel.

Add a context_servers entry

Run the "zed: open settings" action from the command palette to open ~/.config/zed/settings.json, then add the Toolbox under the context_servers key. Note that Zed's key is context_servers — not the mcpServers key most other clients use; pasting another client's config block verbatim is the most common mistake here.

~/.config/zed/settings.json
{
  "context_servers": {
    "database-toolbox": {
      "source": "custom",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "POSTGRES_HOST=host.docker.internal",
        "-e", "POSTGRES_PORT=5432",
        "-e", "POSTGRES_DATABASE=app",
        "-e", "POSTGRES_USER=readonly",
        "-e", "POSTGRES_PASSWORD=YOUR_PASSWORD",
        "us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:latest",
        "--prebuilt", "postgres", "--stdio"
      ],
      "env": {}
    }
  }
}

Restart the Agent Panel and test

Zed applies most settings live, but context servers are spawned processes — close and reopen the Agent Panel (or restart Zed) so it launches the Toolbox. The server should show as running in the panel's settings view with its tools listed.

First prompt worth trying: ask the agent to describe a specific table. That confirms the whole chain — Zed spawned Docker, the container reached your database, and tool results are flowing back — in one round trip.

Troubleshooting in Zed

Nothing shows up: validate the JSON first. Zed tolerates comments in settings.json but not structural errors, and a malformed block means the whole context_servers section is ignored. Also confirm you used context_servers, not mcpServers.

Server shows an error state: open "zed: open log" to see stderr from the spawned process. A Docker daemon that is not running, or a docker binary outside the PATH Zed inherits when launched from the Dock on macOS, both fail at spawn time — give the absolute path to docker if needed.

Tools work but queries error: remember localhost inside the container is not your machine. Keep host.docker.internal for a local Postgres, or set the real host for a remote one, and verify the role's permissions with a manual psql connection.

Where this server lives on the index

You can see MCP Toolbox for Databases' live listing — package type, category, and tool inventory — at https://loomal.ai/marketplace/mcp-toolbox-for-databases. The Databases category on Loomal collects similar servers, and maintainers of any of them can claim a listing and price a hosted endpoint per call over x402.

FAQ

How do I install MCP Toolbox for Databases in Zed?

Add a context_servers entry to ~/.config/zed/settings.json with source set to custom, command docker, and args that run the toolbox image with --prebuilt postgres --stdio. Then restart the Agent Panel so Zed spawns the server and picks up its tools.

Why doesn't my mcpServers block from another editor work in Zed?

Zed uses its own settings key, context_servers, inside the main settings.json rather than a dedicated MCP config file. The command and args fields carry over from other clients' configs, but they must live under context_servers with a source field or Zed ignores them.

Where do I see errors if the Toolbox fails to start?

Run "zed: open log" from the command palette. Zed writes spawn failures and the server's stderr there, which is where Docker daemon errors and database connection failures from the Toolbox will appear.

Can I run the Toolbox without Docker in Zed?

Yes — genai-toolbox publishes standalone binaries on GitHub releases. Point the command field at the downloaded binary and keep the --prebuilt postgres --stdio args. The container route just avoids managing a binary per platform.

Browse more MCP servers for Zed.

Find database, search, and automation servers on the Loomal index.

Explore the marketplace