# Publish a web page from Cursor

Updated 2026-11-08

Add PubSpace to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in one project) with the server URL `https://pubspace.ai/mcp`, then ask the Cursor agent to publish the page and give you the link. Without an account, the agent can publish to a 7-day pubspace.page link, which you keep by opening one emailed link and pressing Keep, or sign you up in the chat; after that, add your API key as a header.

## Add the server

In `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` for one:

```
{
  "mcpServers": {
    "pubspace": {
      "url": "https://pubspace.ai/mcp",
      "headers": { "X-API-Key": "${env:PUBSPACE_API_KEY}" }
    }
  }
}
```

Leave out `headers` until you have a key: the agent can publish a preview or create your account without one. Cursor fills `${env:PUBSPACE_API_KEY}` from your shell environment.

## What to ask the agent

- "Publish dashboard.html to PubSpace and give me the link."
- "Update that PubSpace page with the new chart." (same link)
- "List my PubSpace pages."

## 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: cursor" \
  -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: cursor" \
  -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

|  | Open the file locally | Deploy a preview | Publish to PubSpace |
| --- | --- | --- | --- |
| Others can open it | No | Yes | Yes |
| Same link after edits | — | New preview URL per deploy | Yes |
| Password on the page | — | Extra setup | Built in |
| Setup | None | Host project + credentials | One config entry |

## 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 with Cursor's background agents?

If the agent can reach the internet, it can use the HTTP API with curl, which needs no MCP setup.

### Who can see the pages?

Only people with the link. 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
