# Build and publish a landing page with OpenCode

> Connect OpenCode v2 to Pageree using the current MCP structure. Build static HTML, review the preview, publish, and retain the page ID for future updates.

- Canonical: https://pageree.com/guides/opencode-landing-page/
- Published: 2026-09-15. Updated: 2026-09-15.
- Collection: Guides (https://pageree.com/guides.md)
- Site index for agents: https://pageree.com/llms.txt

**The short answer.** Use the configuration for your installed OpenCode major version. This guide follows v2's mcp.servers structure and remote OAuth flow, then explains a complete single-page build and verification process. The instructions are documentation-based, not a claimed live account test.

## Check which OpenCode version you are configuring

This guide targets **OpenCode v2's documented configuration**. Older OpenCode examples use a different MCP shape, so confirm your installed major version before copying settings. This is a documentation-based workflow reviewed on September 15, 2026, not a report of a live OpenCode-to-Pageree account test.

OpenCode can help create the page source while a remote publishing service handles hosting and enquiries. Choose the business job first. A simple campaign asking for a project enquiry has different requirements from a web app with accounts, payments, and persistent application data.

## Add the remote server using the v2 structure

In your project's existing `opencode.jsonc`, add Pageree under `mcp.servers`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "pageree": {
        "type": "remote",
        "url": "https://mcp.pageree.com/"
      }
    }
  }
}
```

Keep other project settings intact. Start the authentication flow with:

```bash
opencode mcp auth pageree
```

In v2, `/mcps` opens server management in the interactive client. Remote OAuth is enabled unless explicitly disabled; do not add `oauth: false` for this sign-in route. See [OpenCode v2's official MCP documentation](https://opencode.ai/v2/docs/mcp-servers) for the current schema and commands.

Complete browser authorization, then ask OpenCode to read the Pageree account and list existing pages. An actual response verifies that this session can use the tools. If your installed version does not recognize `mcp.servers` or `/mcps`, use its matching documentation instead of combining v1 and v2 examples. The endpoint itself remains the root address in [Pageree's connection guide](https://pageree.com/docs/).

## Write a brief suited to a single page

For an illustrative example, consider a founder offering a technical setup review to small online businesses. The goal is to understand a prospective client's problem before discussing a project.

```text
Build a landing page for my technical setup review service.
Audience: small online businesses with disconnected tools and manual handoffs.
Offer: review one workflow and provide a written map of practical improvements.
Goal: a qualified enquiry, not an instant integration or guaranteed savings.
Use the supplied brief and authorized assets. Ask for missing factual details.
Do not invent client logos, supported integrations, prices, or testimonials.
Follow Pageree's current page, asset, form, privacy, and publishing skills.
Write one complete HTML document with inline CSS and JavaScript and hosted images.
The form should collect name, email, business website, and the workflow problem.
Ask me for the destination inbox and chosen slug. Save a private preview.
Keep the page ID in this project and wait for my review before publication.
```

Tell OpenCode to inspect the project before adding dependencies. Pageree's single-document route does not need a local application server. If you are reusing an existing framework project, ask for a dependency assessment before assuming its output can be hosted unchanged. The [HTML hosting guide](https://pageree.com/guides/host-html-landing-page/) explains the boundary.

## Review the real preview

Check the generated file for local asset paths, unfinished placeholder text, and form handlers that only display a success message. Then open the private preview in a browser. Inspect mobile wrapping, contrast, keyboard focus, required fields, and the explanation of what happens after an enquiry.

If OpenCode has a browser tool, ask it to report exactly what it inspected. If it does not, review the browser yourself. A terminal agent can reason about markup without having seen the rendered page; that distinction matters when deciding whether a layout is ready.

Approve publication only after reviewing the preview. Open the public URL and send a clearly marked test enquiry using an address you control. Verify the expected destination receives it. The [form-to-email guide](https://pageree.com/guides/landing-page-form-to-email/) provides a useful first delivery check before adding a more complex automation.

## Return to the same page later

Store the page ID, slug, and public URL with the project. When the offer changes, ask OpenCode to retrieve current page information and the appropriate stored source. An open draft may contain newer work than the live version or your local file.

Save the complete revised HTML on the same page ID, review the preview, and publish the approved change. This preserves one campaign address and a usable version history. The [live-update guide](https://pageree.com/guides/update-live-landing-page-with-ai/) shows how to scope that request and avoid accidental duplicate pages.

## Related
- [Create a landing page with GitHub Copilot in VS Code](https://pageree.com/guides/github-copilot-landing-page.md): Use Copilot's VS Code agent with Pageree. Configure workspace MCP tools, build a focused page, review changes, and troubleshoot missing tools or enquiries.
- [Host an HTML landing page with a working enquiry form](https://pageree.com/guides/host-html-landing-page.md): Compare static hosting, separate form services, and Pageree for an HTML landing page. Check dependencies, adapt assets, and verify the full enquiry path.
- [Publish a landing page directly from an AI chat](https://pageree.com/guides/publish-landing-page-from-chat.md): Choose between native AI publishing, a Pageree connection, and exporting HTML. Compare the visitor experience, account access, review step, and form delivery.

## Build it with your agent

Pageree is an MCP server. Add https://mcp.pageree.com/ to an MCP client that supports Streamable HTTP and OAuth, sign in, and the agent can build, publish and measure the page. Setup for every supported client: https://pageree.com/docs.md. Sign up: https://console.pageree.com/signup.
