Skip to content

Updated

Zed

Zed reads MCP context servers from your user settings.json. Open it via Zed → Settings → Open Settings (Cmd/Ctrl + ,).

Install with the pinned CLI

CLI 0.2.14 has a matching installer for this client. Sign in first with npx -y lyrashield@0.2.14 login --oauth for local stdio. Review the planned changes before writing:

npx -y lyrashield@0.2.14 install zed --dry-run

When the preview is correct, run the installer:

npx -y lyrashield@0.2.14 install zed

The installer updates LyraShield's entry and preserves unrelated configuration. You can also use the manual snippet below. Restart or reload the client and complete a read-only authenticated call; an installed config entry alone does not prove client discovery.

Prefer to see exactly what gets written or set it up without Node.js? Configure it by hand below.

Critical gotcha: Zed uses the key context_servers — not mcpServers. Using mcpServers will have no effect.

Configuration

Add the following to your Zed settings.json. The context_servers key goes at the top level of the settings object.

Manual fallback: merge the following into ~/.config/zed/settings.json. Recommended: run npx -y lyrashield@0.2.14 login --oauth once; the local MCP server reads the selected workspace credential from ~/.lyrashield/credentials.json. If you use an API key instead, set it in your private process environment before starting the client.

{
  "context_servers": {
    "lyrashield": {
      "command": "npx",
      "args": [
        "-y",
        "@lyrashield/mcp@0.2.12"
      ],
      "env": {
        "LYRASHIELD_API_URL": "https://app.lyrashieldai.com"
      }
    }
  }
}
CLI installer for this client: Run this pinned command to add LyraShield's entry. The client-specific writer preserves unrelated configuration where supported.
npx -y lyrashield@0.2.14 install zed

Important gotchas

  • Current Zed settings use flat command, args and env fields under context_servers. Legacy nested command.path entries should be updated through Zed settings.
  • A remote URL without an Authorization header starts Zed's OAuth flow. Keep existing stdio connections unless you deliberately migrate.
  • Zed's global settings path is `~/.config/zed/settings.json`; verify it for your platform.

Older Zed examples used nested command.path; the current Zed MCP settings use flat fields. Update a legacy entry through Zed settings rather than creating a second LyraShield server.

Remote HTTP alternative

Zed can connect to a remote URL without an Authorization header and start its OAuth flow. Keep an existing stdio connection unless you choose to migrate.

Manual fallback: merge the following into ~/.config/zed/settings.json. Complete OAuth in the client after adding the server. No API key belongs in this config.

{
  "context_servers": {
    "lyrashield": {
      "url": "https://app.lyrashieldai.com/api/mcp"
    }
  }
}

Verify the connection

Save settings.json. Open the Zed AI assistant panel and check that the lyrashield context server appears as active. Restart Zed, inspect the tool list and rules, then make a read-only LyraShield call; a config file or doctor result alone does not prove connection.

Local stdio requirements: Node.js 24+ and a local OAuth login or workspace API key. Remote OAuth does not require a local API key. The @lyrashield/mcp package is published on npm, so npx -y @lyrashield/mcp@0.2.12 resolves directly.