Skip to content
Ozone
Browse the docs
On this page

Outside agents

Agents that Ozone did not start can work with an environment through its MCP server. They can read projects and threads, start and message threads, and check which providers and models are available. This covers Claude Code or Codex in your own terminal and other agents that support MCP. Each agent signs in once, and you choose what it may do.

Get the MCP URL

In Settings → Environments, open a saved environment's menu and choose Copy MCP URL. The URL is the environment's address followed by /mcp, for example:

text

Could not copy. Select the text instead.

https://<environment-address>/mcp

The copied URL uses the route this device is connected over, so an agent on the same device can reach it.

  • An agent on your own computers can use localhost on the host or any https address, such as Tailscale HTTPS. Signing in sends the agent's credentials to the environment, and agents only do that over https or to localhost. A plain-http LAN or Tailscale address, like http://100.x.y.z:3737, lets an agent find the environment but not finish signing in.
  • A hosted agent, such as a bot running in the cloud, must reach the environment from the internet, so it needs a public https address that you set up yourself. A Tailscale address only works from your own tailnet.

Approve a sign-in

The first time an agent connects, it opens a sign-in page on the environment. The page names the agent and where its access goes:

  • For an agent on your computer, approval returns to a localhost address on the computer that opened the page.
  • For a hosted agent, approval goes to that service. Anyone who runs that service gets the access.

Only approve a sign-in you just started. Enter a code from Settings → Sharing & access or ozone auth pairing create on the host. A browser already signed in to the environment with permission to manage access can approve without a code.

With a code, choose what the agent may do: Auto is selected by default, or the closest lower mode allowed by your organization’s policy. Approving without a code starts at Read only:

  • Read only lets the agent read projects and threads and see the available providers and models. It cannot change anything.
  • Supervised through Full access also let it start, message and stop threads in every project. A thread it starts or steers cannot run with more permissions than the mode you chose.

What outside agents can call

Some tools only work for an agent running inside an Ozone thread, because they act as that thread: subagents, secret requests, rendered HTML, the browser preview, devices, and worktree handoff. They still appear in an outside agent's tool list, but calling one returns an error saying it needs an agent running inside Ozone.

  • To hand off work, start a thread with t3_thread_launch, then follow it with t3_thread_wait or t3_thread_read, instead of create_threads or delegate_task.
  • Tools that default to the caller's own project or thread need an explicit projectId or threadId.
  • To list threads across projects, call t3_thread_list with allProjects: true, or use t3_thread_search.

Claude Code

sh

Could not copy. Select the text instead.

claude mcp add --transport http ozone https://<environment-address>/mcp
claude mcp login ozone

claude mcp login opens the sign-in page in your browser. On a machine without a browser, add --no-browser, open the printed URL elsewhere, and paste the final URL back when asked. claude mcp list shows ozone as connected once you approve.

Codex

sh

Could not copy. Select the text instead.

codex mcp add ozone --url https://<environment-address>/mcp
codex mcp login ozone

codex mcp login --no-browser prints the sign-in URL instead of opening it. codex mcp list shows ozone with OAuth once you approve.

Other agents and bots

Any agent that supports remote MCP servers over HTTP with OAuth can connect. Give it the MCP URL and choose OAuth, and the agent finds the sign-in settings itself. Agents without OAuth support cannot connect.

Scripts on the host

On the machine that runs the environment, ozone thread uses the same tools without a sign-in:

sh

Could not copy. Select the text instead.

id=$(ozone thread start . "Find why the tests are slow")
ozone thread send "$id" "Now fix it" --wait
ozone thread show "$id"
ozone thread list

. means the project that contains the current folder, or a git worktree of its repository; a project id also works. A new thread uses the project's default model and permission mode, and runs in the project folder unless you pass --worktree <base-branch>. send never interrupts: a busy thread gets the message as its next turn. Pass - as the message to read it from stdin.

--wait prints the agent's reply. It exits 1 when the run fails or stops, and 2 when the agent waits for an answer you give in the app. Add --json for a result that always includes the thread id.

Remove an agent

Approved agents appear under Settings → Sharing & access like other clients. Revoke one there to cut off its access immediately. A sign-in lasts 30 days; after that the agent asks you to approve it again.