Editors & Clients
Zed with Verdictan
Zed can use Verdictan in two independent ways. Add your gateway as an OpenAI-compatible provider, and Zed Agent's model requests go through your policies. Add the Verdictan MCP server, and the agent can also search request history. Set up either or both, and check each one you use.
Before you start
- A gateway on
http://127.0.0.1:41002with at least one provider target. See Gateway Setup for IDEs. - A client API token for each path you set up. See API Tokens for IDEs.
- For MCP: a published gateway hostname. MCP is not served on
localhost:41002.
Configure Zed
Add the gateway as a model provider
-
Open Settings → AI → LLM Providers (or run
agent: open settings) and choose Add Provider → OpenAI-compatible. -
Fill in:
Field Value Provider name verdictanAPI URL http://127.0.0.1:41002/v1Model ID An idfrom the gateway's authenticatedGET /v1/modelsresponseAPI key A Verdictan client API token Context window The value the upstream model documents -
Select the
verdictanprovider and model in Zed Agent.
Zed keeps the key in the system keychain. It also reads a VERDICTAN_API_KEY environment variable for this provider, which wins over the keychain when set. The model ID must match an existing provider target; Zed cannot create one.
Edit prediction and external agents have their own settings and don't use the Zed Agent model. See Zed API access for the provider fields.
Add the Verdictan MCP server
- Open Settings → AI → MCP Servers, click Add Server, and choose Add Remote Server.
- Set the URL to
https://<published-hostname>/mcpand add the headerAuthorization: Bearer <client-api-token>. - Wait for the tools to load, then check that the indicator dot next to the server is active.
Zed writes the header, token included, into your settings file under context_servers. Keep it in your private user settings, not in shared or committed configuration. See Zed MCP for tool permissions.
Verify
-
Check the token and the model list:
export VERDICTAN_CLIENT_TOKEN="<client-api-token>" curl -fsS \ -H "Authorization: Bearer $VERDICTAN_CLIENT_TOKEN" \ http://127.0.0.1:41002/v1/models -
In Zed Agent, pick the
verdictanmodel and sendReply with Hello. Do not edit files or use tools. -
In a second shell, read the recent events, and check that a matching event appears:
verdictan events tail --since 10m --json -
For MCP, check that Zed lists Verdictan tools, then ask it to use
history_searchfor the last ten minutes without changing anything.
An event proves a request went through the gateway. A working tool proves MCP access only.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Connection refused on the API URL | The gateway is not running on port 41002 | Start it, and check /healthz with curl. |
401 Unauthorized from the provider | The key is not an active client token, or VERDICTAN_API_KEY overrides it | Check the token in the Console, and unset the variable or fix its value. Don't use the gateway runtime token. |
| Zed rejects the model ID | It does not match a provider target | Use an id from the authenticated GET /v1/models response. |
| A reply but no event | That Zed feature uses another provider | Check which provider the feature selects. Edit prediction and external agents don't use the Zed Agent model. |
| The MCP indicator stays off | The URL is not a published hostname, or the token is inactive | Use the publication hostname, and check the token in the Console. |
For more checks, see IDE Integration Troubleshooting.
Next steps
- Configure Policies for IDE Traffic: controls for the prompts Zed sends.
- Monitor IDE AI Usage: Zed traffic in events, History, and Usage.
- Gateway MCP Surface: every tool and resource on the MCP endpoint.