# Publish a web page from Claude Code

Updated 2026-11-08

Run `claude mcp add --scope user --transport http pubspace https://pubspace.ai/mcp` once, then ask Claude Code to "publish this and give me the link". Claude publishes the HTML or Markdown it made to your own PubSpace space and replies with the URL. Ask for changes later and it updates the page at the same link. No account yet? Claude can still publish to a 7-day pubspace.page link that you keep by opening one emailed link and pressing Keep, or sign you up from the chat for a permanent space.

## Connect once

In your terminal:

```
claude mcp add --scope user --transport http pubspace https://pubspace.ai/mcp
```

`--scope user` makes PubSpace available in every project on this machine. Once you have an API key, add it so every session starts signed in:

```
claude mcp add --scope user --transport http pubspace https://pubspace.ai/mcp --header "X-API-Key: cs_..."
```

## What to ask Claude

- "Publish report.html to PubSpace and give me the link."
- "Turn this analysis into a one-page HTML report and publish it."
- "Update the PubSpace page with this week's numbers." (same link, new content)
- "Stage the update as a draft so I can check it first."

With no account, Claude publishes a 7-day preview at a pubspace.page link right away. Give it your email to keep the page: we send you one link. Open it and press Keep, and the page moves into a free space of your own at the same link. For a permanent space, ask it to sign you up: it asks for your email and a name for your space, then for the 6-digit code we email you, and publishes in the same conversation.

## Without MCP: three HTTP calls

Any agent that can run `curl` can do this directly. Create the account (use your human's real email):

```
curl -X POST https://pubspace.ai/api/signup \
  -H "Content-Type: application/json" \
  -H "X-PubSpace-Client: claude-code" \
  -d '{"email": "you@yourcompany.com", "subdomain": "yourname"}'
```

The response has the API key right away. Your human gets an email whose subject is their 6-digit code; ask them for it and verify:

```
curl -X POST https://pubspace.ai/api/verify-code \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cs_..." \
  -d '{"code": "123456"}'
```

Then publish. The response has the link; send the same request with `"docId"` later to update the page at the same link:

```
curl -X POST https://pubspace.ai/api/publish \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cs_..." \
  -H "X-PubSpace-Client: claude-code" \
  -d '{"html": "<!doctype html><h1>Q3 report</h1>", "title": "Q3 report"}'
```

Every error says what to do next (`next_step`) and, when the human has to act, what to tell them (`tell_user`). Full reference: [llms.txt](https://pubspace.ai/llms.txt).

## Side by side

|  | Claude writes a file | Claude deploys to a host | Claude publishes to PubSpace |
| --- | --- | --- | --- |
| You get a link back | No | After a deploy | Yes, at once |
| Same link after edits | — | Yes | Yes |
| Password on the page | — | Extra setup | Built in |
| Setup | None | Repo, host, credentials | One command |

## Plans and limits

|  | Free | Pro |
| --- | --- | --- |
| Price | $0 | $10/month, or $96/year |
| Live pages | Up to 10 | A much bigger library |
| Password on any page | Yes | Yes |
| Comments pinned to the page | Yes | Yes |
| Checks each publish for leaked keys | Yes | Yes |
| Page size | Up to 15 MB, images inlined | Up to 20 MB, images inlined |
| Total storage | 100 MB of pages and drafts | No total |
| Lock to your company's emails | No | Yes |
| Version history | Restore the previous version for 7 days | Every version |
| Hide the PubSpace bar | No | Yes |
| Your own llms.txt | No | Yes |

## Questions

### Does it work in Claude Desktop or claude.ai?

Yes, anywhere you can add a remote MCP server: use the server URL https://pubspace.ai/mcp. Claude Code is the fastest setup.

### Who can see the pages?

Only people with the link. Pages are unlisted and search engines are asked not to index them. Add a password to any page from your Library.

### What does it cost?

Free for up to 10 live pages. Pro is $10/month.

---

Create a space: https://pubspace.ai/signup · Agent reference: https://pubspace.ai/llms.txt · MCP server: https://pubspace.ai/mcp
