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 devordocker compose up) - Zed installed
uvinstalled:pip install uv(orbrew 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
| OS | Path |
|---|---|
| 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
- Reload Zed settings:
cmd-shift-p→zed: reload settings(or quit and reopen) - Open a project and open the Assistant panel
- Select the Behavry agent profile in the model picker
- Run a tool-using query (e.g. "List the files in this project")
- Check http://localhost:5173 → Live 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:
- Spawns as a subprocess when Zed activates the context server
- Reads MCP JSON-RPC from stdin (from Zed)
- Forwards to Behavry via HTTP with the Authorization header
- Writes the response back to stdout (to Zed)
- 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.