Skip to main content

Behavry Integration — Zed Editor

Zed supports MCP servers via its context_servers configuration. Because Zed's MCP implementation uses a stdio bridge (not native HTTP), Behavry uses uvx mcp-proxy as a thin adapter.


Prerequisites

  • Behavry stack running (make dev or docker compose up)
  • Zed installed
  • uv installed: pip install uv (or brew install uv)
  • Python 3.11+

Quick Setup

make setup

This detects that Zed is installed, provisions a zed-local agent, and writes the context_servers config into ~/.config/zed/settings.json — all in one step.

To connect only Zed (skip other editors):

cd backend && poetry run python ../demos/setup/create_dev_agent.py --client zed

Config File Locations

OSPath
macOS / Linux~/.config/zed/settings.json
Windows%APPDATA%\Zed\settings.json

The applied config looks like:

{
"context_servers": {
"behavry-filesystem": {
"command": {
"path": "uvx",
"args": [
"mcp-proxy",
"http://localhost:8000/mcp/v1/servers/demo-filesystem/mcp",
"--header",
"Authorization: Bearer <agent-jwt>"
]
}
}
}
}

Verify

  1. Reload Zed settings: cmd-shift-pzed: reload settings (or quit and reopen)
  2. Open a project and open the Assistant panel
  3. Select the Behavry agent profile in the model picker
  4. Run a tool-using query (e.g. "List the files in this project")
  5. Check http://localhost:5173Live Activity

Token Refresh

Tokens expire in ~8 hours. Refresh all enrolled editors at once:

make tokens

How mcp-proxy Works

uvx mcp-proxy is a small OSS tool that translates between Zed's stdio-based MCP client and Behavry's HTTP MCP endpoint. The bridge:

  1. Spawns as a subprocess when Zed activates the context server
  2. Reads MCP JSON-RPC from stdin (from Zed)
  3. Forwards to Behavry via HTTP with the Authorization header
  4. Writes the response back to stdout (to Zed)
  5. Exits when Zed closes the connection

This means each Zed session spawns a new uvx mcp-proxy subprocess. This is expected behavior.


Troubleshooting

Tools not available in Zed's assistant

Check that uvx is on your PATH: which uvx. If not, install uv and ensure ~/.cargo/bin or ~/.local/bin is in PATH.

"Connection refused"

Behavry backend isn't running. Start it: make dev

Settings not taking effect

Zed caches settings. Use Zed > Settings > Open Settings to confirm the context_servers key is present, then quit and reopen Zed.