> ## 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
> OpenWork in Slack 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.

<Steps>
  <Step title="Install the plugin">
    ```sh theme={null}
    opencode plugin add opencode-openwork
    ```
  </Step>

  <Step title="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.
  </Step>

  <Step title="Check what you got">
    ```sh theme={null}
    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>`.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="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.
  </Accordion>

  <Accordion title="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" } }
      ]
    }
    ```
  </Accordion>

  <Accordion title="Only models, or only MCP">
    Set `"providers": false` or `"mcp": false` in the plugin options.
  </Accordion>

  <Accordion title="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.
  </Accordion>

  <Accordion title="Only MCP, without the plugin">
    Add OpenWork MCP to OpenCode directly: [Connect OpenCode](/docs/model-context-protocol/opencode).
  </Accordion>
</AccordionGroup>


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