> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenable.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

## Quick Install

```bash theme={null}
zenable install opencode
```

<Note>See the [CLI command reference](/integrations/zenable/commands#install) for more options.</Note>

**That's it! You're all set.** Start using Zenable's conformance checking in OpenCode.

This installs both the MCP server (in `opencode.json`) and a managed plugin (in your OpenCode `plugin/` directory) that runs Zenable's conformance checks throughout your coding session.

***

<Accordion title="Advanced: Manual MCP Configuration" icon="wrench">
  <Note>The below is a minimal example. Consider using the quick install command to handle this automatically.</Note>

  OpenCode stores MCP servers under the top-level `mcp` key with `"type": "remote"` for streamable-HTTP servers. See [OpenCode's MCP docs](https://opencode.ai/docs/mcp-servers/?utm_source=zenable_docs\&utm_medium=web) for the full schema.

  ### Global

  Place the following in `~/.config/opencode/opencode.json`:

  ```json theme={null}
  {
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
      "zenable": {
        "type": "remote",
        "url": "https://mcp.zenable.app/"
      }
    }
  }
  ```

  ### Project

  Place the same configuration in `opencode.json` at your repository root.

  <Warning>We only recommend this manual approach if you can't use `zenable install`. Otherwise, `zenable install` is much safer and can handle configuration upgrades over time, handles merges with existing configs, performs backups and logging in case of issues, and more.</Warning>
</Accordion>

<Accordion title="How the hooks-equivalent works" icon="bolt">
  OpenCode's documented extensibility surface is the [plugin system](https://opencode.ai/docs/plugins/?utm_source=zenable_docs\&utm_medium=web). `zenable install opencode` writes a managed plugin file (at `~/.config/opencode/plugin/zenable.ts` for global installs or `.opencode/plugin/zenable.ts` for project installs) that integrates Zenable's governance, guardrails, and observability across your coding sessions.

  The plugin file is fully managed — every `zenable install` / `zenable sync` rewrites it. If you want to add your own OpenCode plugins, drop a separate file alongside it; OpenCode loads every `*.ts` / `*.js` under the plugin directory.
</Accordion>
