Skip to the page

Guides

Get a preview link from your coding agent

Your agent's localhost link only works on your computer. Let Claude Code, Cursor or Codex share the dev server or upload the build, and hand you a real link.

Updated

Ask a coding agent to build a page and it ends with something like “open http://localhost:5173 to see it”. That works on your computer. It doesn't work for your client, your phone or a teammate, because there localhost means their own device.

ouicu's MCP server lets the agent hand you a link anyone can open instead. It works with Claude Code, Cursor, Codex, Claude Desktop, VS Code and Windsurf.

Set it up

Add the server to your tool. For Claude Code:

npx -y @ouicu/mcp setup claude-code

For another tool, swap claude-code for cursor, codex, claude-desktop, vscode or windsurf. Setup logs you in if this computer isn't yet: it shows a code and opens ouicu.com in your browser to approve it. The key is kept where the command line tool keeps its own, never in your tool's settings.

Sharing a running dev server also needs the command line tool, which uses the same login:

On macOS and Linux, install the command line tool with:

curl -fsSL https://ouicu.com/install.sh | sh

On Windows, run this in PowerShell:

irm https://ouicu.com/install.ps1 | iex

You need a ouicu account to log in. ouicu is in a closed beta, so accounts are for people we have invited: write to [email protected] to join.

Then ask in your own words. For example:

Start the dev server and send me a ouicu link.Build the site and put ./dist up at studiolund with a password.Who opened the preview, and did anything fail?

The agent runs the dev server as it would anyway, shares its port and replies with a link like https://calm-otter-4821.ouicu.app. Open it on your phone, or paste it to the client.

Make it a habit

To get a link without asking each time, say so in the instructions your agent reads at the start of every session, like CLAUDE.md for Claude Code or AGENTS.md for Codex:

When you finish a change I can look at, share the dev serverwith ouicu and give me the link. When I say it's for the client,build the site and deploy the build with ouicu instead.

A live share, or an upload

The agent has two ways to make a link, and they last differently:

  • ouicu_share_port shares a running dev server. The share runs inside the MCP server, so it stops when the agent's session ends, or when you ask the agent to stop it.
  • ouicu_deploy uploads a built folder. Its link lasts after the session, with your computer off.

For a link to send a client, ask for a build and an upload. ouicu_deploy refuses a folder that is no build: one without an index.html, your home folder, or a project with a package.json or .git. So an agent can't put your source code online by mistake.

On the Free plan

Free runs 1 share at a time, for up to 2 hours, and keeps 1 uploaded site for 7 days after its last upload. So a second share the agent starts is refused while one runs: ask it to stop the first, or to list your shares and reuse the link. Visitors see a short notice from ouicu before your page.

Keep client work private

Ask for a password, as in the second example above. Passwords come with Hobby and Pro. A password you type in the chat is part of the conversation, so use one made for this preview.

To let in only the client's own addresses, on Pro, put a list of invited people on the reserved name, on the Shares page. It holds for every share and upload under the name, the agent's included. See Password-protect a staging site.

After you send it

The agent can check on the link too. Ask who opened it, and ouicu_recent_requests gives it the latest requests to a share or site: what was asked for, and what failed. A missing image or a failing API route is something it can fix before the client notices.

It can also list and stop your shares, list and delete your sites, and tell you how much of the month's data you have used. The list of tools has each one.

Without MCP

An agent that runs commands in your terminal can upload without the MCP server. --json makes the result easy for it to read: one JSON object a line, the last with the link in url.

ouicu deploy ./dist --json
The last line
{"event":"deployed","url":"https://studiolund.ouicu.app","name":"studiolund","files":24,"bytes":1258291,"expiresAt":null,"skipped":[]}

ouicu share runs until it's stopped, which suits a terminal of your own better than an agent's. For shares the agent starts, use the MCP server. In scripts, CI and test runs, the Node SDK does both.