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

> ## Agent Instructions
> For agents: install the OpenWork desktop app with `brew install --cask openwork` (macOS) or from https://openworklabs.com/download. Do not run `npx openwork`; the npm package named `openwork` is a different project.
> Connect an agent to OpenWork with the MCP Gateway: `claude mcp add --transport http openwork https://api.openworklabs.com/mcp/agent`. Teams sign up at https://app.openworklabs.com?mode=sign-up.
> Step-by-step agent guide: https://openworklabs.com/docs/start-here/use-openwork-from-an-ai-agent.md
> Connect Slack (any organization admin): https://openworklabs.com/docs/slack/connect-slack.md. OpenWork in Slack (@openwork bot) is private alpha for approved organizations. Setup guide: https://openworklabs.com/docs/slack/overview.md. Agent skill: https://openworklabs.com/.well-known/agent-skills/set-up-openwork-slack/SKILL.md.

# Use OpenWork in OpenCode

> Install the opencode-openwork plugin in OpenCode 2 and sign in once to get your organization's AI Gateway models and OpenWork MCP connections on every start, without the desktop app.

The OpenWork plugin for OpenCode 2 brings your organization's AI Gateway models and OpenWork MCP into a plain OpenCode install. You sign in once; OpenCode loads them every time it starts.

The [`opencode-openwork`](https://www.npmjs.com/package/opencode-openwork) package is published and ready to install. You do not need the OpenWork desktop app.

## Requirements

* OpenCode 2 with the integration, provider, and MCP plugin APIs. The plugin is tested with 2.0.26; OpenCode 1 is not supported.
* An OpenWork account and organization membership. An admin grants the models, skills, and connections you can use.

Check your installed version first:

```sh theme={null}
opencode --version
```

Installing the plugin does not install or upgrade OpenCode.

## Install and sign in

**1. Install the plugin**

```sh theme={null}
opencode plugin add opencode-openwork
```

**2. Sign in**

```sh theme={null}
opencode auth login openwork
```

Choose **Browser**. Sign in to OpenWork, pick your organization and approve. OpenCode finishes signing in on its own.

On SSH or a machine without a browser, use `opencode auth login openwork --method code`, open the link on any device and confirm the code.

**3. Check what you got**

```sh theme={null}
opencode auth list
opencode models | grep ipr_
opencode mcp list
```

Your AI Gateway models are listed as `ipr_…/gwm_…`. `openwork-cloud` gives the agent your organization's skills, plugins and connections. Connections your admin made available in other apps appear as `openwork-direct-<name>-<id>`.

> **Sign out or switch organizations**
>
> ```sh theme={null}
> opencode auth logout openwork
> opencode auth login openwork
> ```
>
> Signing out also ends the OpenWork session and removes the models and MCP servers the plugin added. Pick the other organization on the approval page when you sign in again.

> **Self-hosted or enterprise OpenWork**
>
> Point the plugin at your OpenWork API in `~/.config/opencode/opencode.json`:
>
> ```json theme={null}
> {
>   "plugins": [
>     { "package": "opencode-openwork", "options": { "apiBaseUrl": "https://api.openwork.example.com" } }
>   ]
> }
> ```

> **Only models, or only MCP**
>
> Set `"providers": false` or `"mcp": false` in the plugin options.

> **No AI Gateway models listed**
>
> The plugin shows the AI Gateway providers your organization grants you. Ask an admin to check **AI Gateway** in OpenWork Cloud. Models the catalog marks as deprecated are hidden.

> **Only MCP, without the plugin**
>
> Add OpenWork MCP to OpenCode directly: [Connect OpenCode](https://openworklabs.com/docs/model-context-protocol/opencode.md).

## Related integrations

* [Integrations overview](https://openworklabs.com/docs/integrations/overview.md)
* [How the MCP integration works across clients](https://openworklabs.com/docs/integrations/mcp.md)
* [Specialized plugins: OpenCode ready, Cursor and Codex in progress](https://openworklabs.com/docs/integrations/client-plugins.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.