Concepts

The seven objects Oz Factory works with, and the plan limits on them.

Projects

A project is the unit of ownership: a name, a hosting target, a subdomain, and a history. Every deploy lands in one.

  • Existing name: redeploys that project in place. New name: creates a separate project.
  • URL: https://your-name.opzero.sh.
  • Custom domain: project (action: "set_domain"). Pro and Team plans.
  • Soft delete (default): the live runtime goes offline immediately and its slot frees up. The record survives a seven-day grace period; redeploying the same name brings it back.
  • Hard delete: skips the grace period. Cannot be undone.

Deployments

A deployment is an immutable snapshot of the files, with a status and a build log. Every publish creates one. Projects accumulate them, and you can move between them freely.

CallEffect
deploy against an existing projectMerges a partial files map into the latest deployment. Changes one file without resubmitting the site.
deploy with fromRebuilds from stored source.
deployment (action: "rollback")Republishes an older snapshot as a new deployment. Nothing is rewound, so no state is destroyed.
deployment_inspect (action: "get")Returns the full deployed file contents. Recovers source a conversation has lost.

The app runtime: AI and storage bindings

A deployed React app is static by default. Bindings add a backend.

BindingClient APIBehavior
AIwindow.claude.complete(), oz.aiReal server-side inference through the Vercel AI Gateway. The model allowlist, the max output tokens, and a per-IP rate limit are set server-side. The system prompt is pinned where the browser cannot override it. No key reaches the client.
Storageoz.storage, oz.filesTwo halves of one switch. oz.storage: key-value records. oz.files: bytes with a media type under a path. Both scoped per end user, with a project-wide shared scope alongside.
  • Enable at deploy time: ai: true / storage: true on deploy (format: "react").
  • Change on a running app: project (action: "configure"). No code redeploy.
  • Bindings require the default Cloudflare target.
  • The storage_* tools read and write the same file store from the conversation: seed an app with data, or inspect what it has written.
  • A file written with public: true is served credential-free at https://your-app.opzero.sh/__oz/files/<path>, the usual way to give a page an image to link to.

Assistants

An assistant is your own agent: a model, a pinned system prompt, and a list of MCP servers whose tools it may call. It runs the agent loop server-side and answers over a chat endpoint.

  • mcp_servers only points at servers that already exist. It connects; it does not create.
  • No host of its own: served from one of your deployed apps’ subdomains at /__oz/assistant/<slug>/chat, reached from a page via oz.assistant(slug).
  • Deploying an assistant before any app exists succeeds, but the chat URL stays a placeholder until an app exists.
  • Test without an app: assistant_chat invokes the assistant server-side and returns the full reply plus a trace of each tool-use round.

Hosted MCP servers

A hosted MCP server is your own MCP server, deployed to Oz. workload_deploy (kind: "mcp_server") takes TypeScript written against @opzero/mcp-runtime or Python written against opzero_mcp. Oz builds it, deploys it to a Cloudflare Worker, assigns a stable endpoint, and verifies it speaks MCP before calling the deploy good.

Scaffolds: docs with kind: "mcp_server" and a template name. Common starting points; the template parameter of docs lists every current one:

Template kinds (a selection)
minimal      a working server with one tool
fetch-api    calling an external HTTP API
oauth1-api   an API behind OAuth 1.0a
storage      per-user ctx.storage keyed on ctx.user
files        per-user ctx.files, plus publishing to a public URL
widget       an MCP Apps view authored as its own .html file
sync         a scheduled() handler on a cron, with ranged rollups
python       the minimal server, in Python
Auth modeWho may call it
oauthValidates per-user tokens through MCPAuthKit and scopes access to you, with audience-bound tokens other users cannot reuse.
tokenOne shared bearer token, returned exactly once at first mint and replaceable with workload_rotate_token.
publicUnauthenticated. Shared-scope storage writes are off by default, since any anonymous caller could otherwise mutate shared state.
  • Secrets: workload_configure (action: "secret_set"). They arrive as ctx.env.KEY.
  • A deployed server cannot wake itself. Unattended work runs off the schedule cron, which invokes the server’s exported scheduled() handler at a minimum interval of five minutes.

Gateways

A gateway is one MCP endpoint fronting several backends (your hosted servers, external MCP servers, and assistants) behind an exposure policy.

  • Default gateway: auto-created on every account, tracks all your deployed servers.
  • Your own gateways: per-app profiles that expose only what one app should see.
  • Endpoint: gw.opzero.sh/g/<slug>/mcp.

Exposure mode. A wrong mode fails quietly.

ModeBehavior
searchA small, fixed set of meta-tools (a search_tools plus invoke pair) whose shape never changes, with live discovery at call time. Recommended, and required for clients like Claude.ai that snapshot tools/list.
inlineEvery backend tool merged into tools/list, namespaced <ns>_<tool>. Only safe for clients that re-list each session with a small, fixed toolset. The surface changes whenever backends do, which strands a snapshot cache.
pinnedChosen tools inline, meta-tools for the rest.
autoResolves to search whenever track_all_deployed is on, otherwise inline until the tool count passes inline_tool_limit.
If a gateway’s tools vanish in Claude.ai
Almost always an inline gateway whose backends changed after Claude cached the tool list. Switch it to search with gateway (action: "update").

External connections

A connection is an OAuth grant to a third-party MCP server (Notion, Linear, Sentry, Neon, Vercel, or any server publishing RFC 9728 metadata), stored encrypted on your account and refreshed automatically.

  • Create: connection (action: "create") returns a one-time authorize URL to open in a browser.
  • Connections are never ambient. Nothing can use one until you grant it explicitly to a named workload with connection (action: "grant"): a gateway backend, an assistant, or a deployed MCP server.
  • The grant is the consent boundary: a server you deployed can reach the connections you gave it and no others.
  • Granting requires your MCP identity to be linked to your account via identity_link. Without the link, the platform can only match your token to your account by email, and an unverified email is not a strong enough claim to release a third-party credential.
  • Prefer a connection over pasting a bearer token into gateway (action: "add_backend"). Third-party OAuth tokens are short-lived: a pasted one typically stops working within the hour; a connection refreshes itself.

Plans and limits

  • Plan-dependent: how many hosted MCP servers, assistants, and gateways you can keep at once; custom domains; monthly deploy volume.
  • Only creating something new counts against a cap. Updating or redeploying something you already have never does.
  • Where you stand: system_status, or pricing.
Next
Tool reference

Every tool the MCP server exposes, with its parameters.