OpenCode uses its own local MCP config shape. Use `type: local`, a single `command` array, and `environment` instead of `env`.
OVERVIEW
OpenCode is an open-source terminal AI coding agent built by the SST team. For Zephex, the reliable setup is the local MCP entry above: `type: local`, `command` as an array, and `environment` holding `ZEPHEX_API_KEY`.
CONFIG FILE LOCATION
Use `<project>/opencode.json` for a project-local setup, or `~/.config/opencode/opencode.json` for a global one.
Paste the JSON exactly as shown. Keep the server name as `zephex`.
Replace `mcp_sk_your_key_here` with your real Zephex API key before saving.
{ "$schema": "https://opencode.ai/config.json", "mcp": { "zephex": { "type": "local", "command": ["npx", "-y", "zephex"], "enabled": true, "environment": { "ZEPHEX_API_KEY": "mcp_sk_your_key_here" } } }}Verify the server from inside an OpenCode session before relying on it in normal prompts.
Make sure the file is named `opencode.json` in the project root or saved to `~/.config/opencode/opencode.json` for the global setup.
Use `environment`, not `env`, and keep `command` as a single array instead of separate `command` and `args` fields.
Install Node.js so OpenCode can launch `npx`, or switch to absolute paths if your environment does not inherit PATH correctly.
If the editor still does not connect, return to Quickstart or check Connection Issues.