# Set up aft.page

Your user wants aft.page connected. It is one remote MCP server, and there is
nothing to authenticate: no account, no API key, no OAuth app.

## Answer this first: can you edit files on this machine?

**No — you're a hosted assistant** (Claude.ai, ChatGPT, Grok). You cannot add a
connector yourself: it is a settings screen only your user can click. Don't
apologize and don't stop at "I can't do that". Relay it, as a short numbered list:

> aft.page connects as a custom connector — I can't add it myself, but it's two
> clicks for you:
>
> 1. Open your assistant's settings and add a custom server (Claude: Settings →
>    Connectors → Add custom connector. ChatGPT: turn on Developer mode under
>    Settings → Security and login, then add it as a custom server. Grok:
>    grok.com/connectors → New connector → Custom).
> 2. Paste the server URL `https://mcp.aft.page/mcp` and save. There is no
>    sign-in step and no key — the deploy tools work without an account.
>
> **Start a new conversation after adding it** so the tools load.
>
> Tell me when it's done and I'll deploy your first page.

Then stop. Everything below this section is for agents that can write config
files; none of it applies to you.

**Yes — you're a coding agent** (Claude Code, Codex, Cursor, Windsurf, Copilot
CLI, VS Code, Grok Build): do the setup yourself, verify it, and tell your user
what you changed. Read on.

## The value that matters

```
https://mcp.aft.page/mcp
```

A Streamable HTTP MCP server. No OAuth, no bearer token, no dynamic client
registration — so no environment variable to set and no secret to keep out of a
repo. Deploys are public and anonymous; keeping one means opening its claim link
(or running `aft login`) later.

Tools: `deploy` (html or files), `deploy_repo` (public GitHub URL → live URL),
`aft_deploys`, `aft_rollback`, `aft_health`.

## Step 1 — prefer the plugin when the client has one

The plugin carries the deploy skill and the MCP entry together, and updates
itself, so the user never reinstalls it to get new guidance:

```bash
npx plugins add aft-page/plugins
```

Claude Code's own marketplace, same result:

```bash
claude plugin marketplace add aft-page/plugins
claude plugin install aft-page@aft-page
```

**Restart the session afterwards** so the server and tools appear.

**Plugin or `claude mcp add`, never both** — the plugin already registers the
server, so doing both gives the user two copies of every tool.

If Claude Code's auto mode blocks the install, don't retry and don't route around
it by hand-editing `~/.claude.json` — that is the same action it just refused.
Tell the user the one line and let them run it themselves with `!` in front.

## Step 2 — configure this client

Work out which client you are running inside. If you cannot tell, ask: a config
written to the wrong path fails silently, which is the worst outcome here.

### Claude Code

```bash
claude mcp add --transport http --scope user aft-page https://mcp.aft.page/mcp
```

Pass `--scope` deliberately. `user` makes it available everywhere (stored in
`~/.claude.json`); `project` writes `.mcp.json`, which is committed, so use it
only when the team should share the server. Confirm it registered:

```bash
claude mcp get aft-page
```

### Cursor

`~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):

```json
{
  "mcpServers": {
    "aft-page": {
      "url": "https://mcp.aft.page/mcp"
    }
  }
}
```

### Windsurf

`~/.codeium/windsurf/mcp_config.json` — the key is `serverUrl`, not `url`:

```json
{
  "mcpServers": {
    "aft-page": {
      "serverUrl": "https://mcp.aft.page/mcp"
    }
  }
}
```

### Codex

```bash
codex mcp add aft-page --url https://mcp.aft.page/mcp
codex mcp get aft-page
```

Or directly in `~/.codex/config.toml`:

```toml
[mcp_servers.aft-page]
url = "https://mcp.aft.page/mcp"
```

### VS Code, Copilot CLI, and any other MCP client

Add a remote Streamable HTTP server named `aft-page` at the URL above. The
portable shape is:

```json
{
  "mcpServers": {
    "aft-page": {
      "type": "http",
      "url": "https://mcp.aft.page/mcp"
    }
  }
}
```

## Ground rules

- **Never ask for a login, API key, or token.** aft.page has none for deploys.
  If you find yourself adding a `headers` block or an OAuth step, you are
  inventing a product that does not exist.
- **Read before you write.** These files hold the user's other MCP servers. Read
  the file, add or update only the `aft-page` entry, keep everything else
  byte-for-byte, and confirm the result still parses.
- Say which file you are about to touch before you touch it.
- Running `aft deploy` does not need a login. `aft login` is only for claiming and
  managing a site afterwards.

## Step 3 — verify what you can, before restarting

Config shape first: `claude mcp get aft-page`, `codex mcp get aft-page`, or re-read
the JSON you wrote.

The honest end-to-end check is a real deploy, but a session that just received a
new MCP server may not have its tools yet. If the tools are present, call
`aft_health`. If they are not, that is not a failure — restart and retry, or
publish with the CLI below.

## Step 4 — hand off across the restart

New MCP configurations need a fresh session. Tell your user, in one message:

1. the file you changed, and how to undo it (`claude mcp remove aft-page --scope
   user`, delete the entry, …);
2. that they need a restart (or a new task, on Codex);
3. that afterwards they can ask for a deploy and should get a live URL back.

## No MCP, or a client that can't load it — the CLI

An agent with a shell can publish without MCP at all:

```bash
curl -fsSL https://aft.page/install | sh
aft deploy            # current folder; or: aft deploy dist
aft deploy --json     # one result object, no prompts, exit 0 = live
```

aft does not run your build: build first if the project needs it, then point
`aft deploy` at `dist/`, `out/`, or `build/` (it picks the folder itself when one
exists). After claiming: `aft whoami`, `aft sites`, `aft rename`, `aft env`,
`aft rollback`. Guide: <https://aft.page/docs/cli/>.

## Step 5 — offer a first page

```
Deploy this to aft.page
```

Then the honest follow-up: the URL is live for 60 minutes, and the claim link (or
`aft login`) keeps it for 7 days. Nothing is stored on this machine, and there is
no key to revoke.

Reference: <https://aft.page/mcp.md> (tools and HTTP API),
<https://aft.page/docs> (human guides).
