Connect
zed logo

Zed

Zed calls MCP servers "context servers" in its Assistant panel. Drop Dock into settings.json and it becomes a callable context for every Assistant conversation.

Client
Zed
Editor with agentic panel. Context servers in settings.json.
HTTP JSON-RPC (streamable-http)
Dock MCP
trydock.ai/api/mcp
37 tools · OAuth 2.1 + DCR · Bearer
Auth path
1
Mint a dk_ key in Dock Settings → API keys.
2
Paste it as Authorization: Bearer dk_… in the client config.
3
Client calls Dock MCP directly on every request.

Prerequisites

  • Zed installed (macOS or Linux).
  • A Dock dk_ key.
Config file
~/.config/zed/settings.json (Linux/macOS) or open via Zed Preferences · Settings.
Reload
Zed applies settings on save. No restart needed.
~/.config/zed/settings.json (merge)json
{
  "context_servers": {
    "dock": {
      "command": {
        "path": "npx",
        "args": ["-y", "@trydock/mcp"],
        "env": {
          "DOCK_API_KEY": "dk_c914f1c6..."
        }
      }
    }
  }
}

Zed's context-server schema only accepts stdio today. Dock ships an official npm bridge that forwards stdio JSON-RPC to trydock.ai/api/mcp: @trydock/mcp. When Zed adds first-class remote MCP support, swap this entry for a direct URL config.

Verify

In the Assistant paneltext
@dock list my workspaces

Troubleshooting

Symptom
Fix
Context server shows "failed to start"
The npx bridge couldn't run. Check that Node 20+ is on PATH (node --version). If you're using nvm, Zed may not see the shim; use the absolute path to npx.
Dock tools not offered by the Assistant
Zed loads context servers lazily. Type @dock in the Assistant panel to attach the context explicitly.

Frequently asked questions

How do I connect Dock to Zed?
Add Dock as a remote MCP server in Zed. Either let Zed's OAuth 2.1 + DCR flow handle auth (recommended; no credential ceremony), or paste a scoped Dock `dk_` API key in Zed's MCP config under the `Authorization: Bearer dk_…` header.
Does Zed work with Dock's MCP server?
Yes. Dock exposes 43 MCP tools at `https://trydock.ai/api/mcp` over HTTP transport with OAuth 2.1 + DCR and Bearer-token auth. Any MCP-spec-compliant client, including Zed, discovers them via the standard `tools/list` handshake. Learn more →
How do I limit which Dock workspaces Zed can write to?
When you mint the `dk_` key for Zed in Settings → API keys, pick the workspace from the dropdown. The key returns 403 on every other workspace regardless of what the prompt asks. To scope across multiple, mint multiple keys or add the agent as an explicit member of each. Learn more →
How do I see what Zed did in my Dock workspace?
Open the workspace in your browser. Every row Zed created or updated is stamped with the agent's identity (orb + name) in the createdBy / updatedBy field. The workspace activity feed shows every action chronologically. Learn more →
How do I undo a row Zed wrote to Dock?
Open the row, click the kebab menu, choose Delete (soft-delete preserves history). For bulk reverts use the activity feed to find the agent's session and delete its rows in batch. To prevent future writes, revoke Zed's `dk_` key in Settings → API keys.
Can multiple Zed sessions share state through Dock?
Yes. Every Zed session reads and writes the same workspace, so handoffs across machines or across long-running multi-session workflows just work. The Dock workspace IS the shared state; no separate message bus required.
Does Zed need OAuth or a dk_ API key for Dock?
Either works. OAuth 2.1 + DCR is the recommended path: Zed hits Dock's discovery endpoint at `/.well-known/oauth-authorization-server` and auto-registers as a client. The `dk_` Bearer token path is fine for owned-code agents and CI scripts; pick whichever fits your stack. Learn more →
How do I add Dock as an MCP server in Zed?
Zed reads MCP servers from your settings.json under `assistant.context_servers.dock`. Set `command` type to HTTP, URL to `https://trydock.ai/api/mcp`, headers to `{ Authorization: "Bearer dk_..." }`. Reload Zed.
Does Zed's parallel-agent mode work with Dock?
Yes. Each Zed agent in the parallel pane authenticates as a separate signed agent (give each its own `dk_` key for clean attribution). They see each other's Dock writes via real-time SSE.
Can Zed's inline assistant call Dock tools?
Yes, when the Dock context server is enabled. The inline assistant routes tool calls through the same MCP transport as the chat panel, so it can list workspaces, append rows, or update doc sections inline as you type.

Related

Updated