Skip to content
Guides

How to publish from Claude Code or Codex to a client link with MCP

By Francisco Jesús Jiménez Escámez, CEO of ArtifactBox · Updated · 7 min read

To turn what Claude Code or Codex builds in your terminal into a link your client can open, connect an MCP server that publishes pages. With ArtifactBox it takes two steps: add the server (claude mcp add --transport http artifactbox https://artifact-box.com/mcp in Claude Code, or codex mcp add artifactbox --url https://artifact-box.com/mcp in Codex) and ask “publish dist to the client’s project and create a link that expires on Friday”. The AI uploads the HTML, or a ZIP with its CSS, JS and images, gives you the address, and every later change updates the same page without changing the link. Nothing to deploy and no separate hosting to pay for.

What you need

  • An ArtifactBox account (from €9/month) with a project for the client.
  • Claude Code, Codex (in the terminal or the editor) or Cursor.
  • A static website: a single HTML file or a folder with its index.html, CSS, JS and images, such as the dist of Vite, Astro or a static Next.js export.

ArtifactBox shows pages that run in the browser. If your project needs its own server (a database, your own API), publish the static build with sample data: to show a proposal to a client, that’s usually enough.

Connect your terminal in two minutes

Claude Code

Terminal
claude mcp add --transport http artifactbox https://artifact-box.com/mcp

Inside Claude Code type /mcp, choose artifactbox and press Authenticate: ArtifactBox opens in the browser and you grant access with your account.

Codex

Terminal
codex mcp add artifactbox --url https://artifact-box.com/mcp
codex mcp login artifactbox

The login opens ArtifactBox to grant access. The Codex extension in your editor uses the same configuration (~/.codex/config.toml).

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "artifactbox": {
      "url": "https://artifact-box.com/mcp"
    }
  }
}

Then press Login next to artifactbox. The steps for Claude and ChatGPT in the browser are in Your AI.

Publish and create the link

With the server connected, just ask in your own words. For example:

Prompt
Build the project and publish dist to the Bodega Alta project as “Home v1”.
Then create a public link called bodega-home that expires on 19 December, with a password.
  1. The AI publishes the site with publish_artifact: a single HTML file or the folder as a ZIP, with its entry HTML (index.html unless it says otherwise). Every publish is a new item; it never overwrites another.
  2. If the ZIP is more than a few MB, it first asks for an upload address with request_upload (single use, 15 minutes) and uploads it with a PUT.
  3. It creates the link with create_public_link: a readable name (3 to 60 characters), the last day it works and a password (yours, 8 to 64 characters, or a generated one).
  4. It gives you the address, like https://share.artifact-box.com/p/bodega-home/, to send to the client.

Change the site without changing the link

When the client asks for changes, don’t publish again: ask for an update. update_artifact sends only the files that change (up to 200 at a time) or the whole site, bumps the version (v2, v3…) and the link your client has stays the same.

  • Without overwriting someone else’s work: with expected_version, if someone changed it first, nothing is touched and the AI tells you.
  • Expiry and password: update_public_link changes or removes them without changing the address, and also reopens an expired link.
  • Switch it off: revoke_public_link cancels it for good within seconds.
  • Have they seen it? get_views tells you who opened it, when and for how long.

What the AI can do with your account

  • It signs in with your account over OAuth 2.1 and does what you could do in the dashboard: your projects, your role and your plan’s limits.
  • Nothing is deleted for good from the AI: what it removes goes to the project’s trash and can be restored for 30 days.
  • Every action is logged as “via AI” in the history, and in Connect your AI you see the open connections and can cut them whenever you want.
  • The access token lasts one hour and the refresh token 30 days; we only store their fingerprint.

Frequently asked questions

What is an MCP server?

It’s the standard way to give an AI tools from another service. ArtifactBox offers a remote MCP server at https://artifact-box.com/mcp: your AI uses it to publish, organise, share and check views with your account.

Can I publish a React or Vite app?

Yes, its static build: the dist folder in a ZIP with index.html as the entry. Anything that needs its own server stays out; for a proposal, use sample data.

Is there a size limit?

Inside the call, up to 25 MB; for more, the AI uses a direct upload address. The maximum file size depends on the plan: 200 MB on Individual, 500 MB on Team and 1 GB on Enterprise.

Can the AI delete something by mistake?

Not for good. What it removes goes to the project’s trash for 30 days, and emptying it can only be done from the dashboard.

Does it work with other MCP clients?

Yes, with any client that speaks MCP over HTTP (Streamable HTTP) with OAuth: besides Claude Code, Codex and Cursor, also Claude and ChatGPT in the browser.

Sources

Checked on .