# Publish what OpenCode builds

> OpenCode runs GLM, Kimi, Qwen or anything behind an OpenAI-compatible endpoint, and leaves the result as files on disk. ooda turns them into a private page.

OpenCode's [`/share`](https://opencode.ai/docs/share) makes a public link to the conversation, not to the page the agent built.

## Option 1: let the agent run the CLI

OpenCode's [`bash` tool](https://opencode.ai/docs/tools) can run commands, so the agent can install ooda and publish:

```bash
curl -fsSL https://ooda.run/install | sh
ooda login        # once, or set OODA_TOKEN in headless setups
ooda publish      # from the folder with the built site
```

Next time, `ooda publish` updates the same site, because the folder's `ooda.json` remembers it.

## Option 2: add the MCP server

Add ooda to `opencode.json`, globally in `~/.config/opencode/` or in the project:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ooda": { "type": "remote", "url": "https://api.ooda.run/mcp", "enabled": true }
  }
}
```

OpenCode [finds ooda's OAuth](https://opencode.ai/docs/mcp-servers) when the server first asks for it. To sign in ahead of time, run `opencode mcp auth ooda`. To use an [access token](https://app.ooda.run/account) instead, set `"oauth": false` and add `"headers": { "Authorization": "Bearer {env:OODA_TOKEN}" }`.

## Where this doesn't fit

ooda hosts static files, plus a proxy for APIs with keys you store through `ooda secrets`. If what OpenCode built needs its own server or database, use a host built for apps.

Get started: https://ooda.run/docs
