# Configure DesignGen for this user

You are the setup agent for OpenCode. Complete every machine-owned step below. The user should only need to complete the browser-owned DesignGen sign-in and authorization screen.

## Completion criteria

- A Streamable HTTP MCP server named `designgen` points to `https://mcp.trydesigngen.com/mcp`.
- The DesignGen OAuth login has been opened for the user.
- After authorization, the connection is verified without starting paid generation.

## Safety boundaries

- Do not ask the user to paste an access token, bearer token, API key, cookie, or custom header.
- Do not make an approval or autonomy-policy choice for the user.
- Do not run image generation, edits, publishing, orders, or any other paid/write smoke test during setup.
- Modify only the `designgen` MCP entry and the DesignGen skill directory. Preserve all unrelated agent configuration.

## Agent-owned setup steps

1. Read the OpenCode config and determine the schema version before writing anything: v1 puts servers directly under `mcp`, v2 puts them under `mcp.servers`.
2. Add a remote server named `designgen` with `"type": "remote"` and `"url": "https://mcp.trydesigngen.com/mcp"`, in whichever shape the config uses. Use HTTP streamable transport, not SSE.
3. Do not set an Authorization header and do not disable OAuth. OpenCode handles the OAuth flow for remote servers automatically.
4. Preserve every other configured server, and record any entry you replace in your progress note.
5. Trigger the connection and pause. Tell the user: **Sign in to DesignGen, review the requested scopes and approval policy, then approve access.**
6. Check the result with `opencode mcp auth list`, and use `opencode mcp debug designgen` if the connection or OAuth flow needs diagnosing.
7. Once tools are visible, call `mcp_connection_status` and report the connected client, granted scopes, approval policy, and the active brand. Do not call a paid or write tool.

## Success message

When complete, tell the user what was installed, whether OAuth succeeded, whether a restart or new session is needed, and the result of the read-only connection check. Never claim setup is complete before authorization succeeds.

Source guide: https://www.trydesigngen.com/agents/designgen/opencode

---

# DesignGen OpenCode reference

Add DesignGen as a remote MCP server in your OpenCode config, authorize in the browser, and use print-prep tools from the terminal.

## Fastest setup: hand this page to your agent
OpenCode can edit its own config. Use Copy setup for your agent at the top of this page; the brief covers both config schemas.

- OpenCode handles OAuth for remote MCP servers automatically.
- Prefer HTTP streamable transport. OpenCode has known issues with SSE-based servers.
- Leave every other server in the config untouched.

## Check your config schema first
The schema changed between major versions, so confirm which one you are running before pasting a block.

- v1 puts servers directly under `mcp` and uses an `enabled` field.
- v2 puts them under `mcp.servers` and replaces `enabled` with `disabled`.
- Do not configure an Authorization header. DesignGen signs in through OAuth.

v1 config

```json
{
  "mcp": {
    "designgen": {
      "type": "remote",
      "url": "https://mcp.trydesigngen.com/mcp"
    }
  }
}
```

v2 config

```json
{
  "mcp": {
    "servers": {
      "designgen": {
        "type": "remote",
        "url": "https://mcp.trydesigngen.com/mcp"
      }
    }
  }
}
```

## Authorize and verify
OpenCode opens the DesignGen sign-in the first time it connects.

- Review the requested scopes and the approval policy before approving.
- Then call mcp_connection_status and report the client, scopes and active brand.

Check and debug the connection

```bash
opencode mcp auth list
opencode mcp debug designgen
```
