# Connect a coding tool

Add Page Lemon to Claude Code, Codex, Cursor, VS Code, Gemini CLI, Windsurf, Cline or Trae, and your AI can publish and update every site in your account from your editor or terminal. Most tools take one config block and a sign-in.

## Before you start

> **Plans:** works on every Page Lemon plan, Free included. Sign-in makes you a free account if you don't have one. Each tool's own plan needs are listed below.

The link for coding tools is:

```text
https://mcp.pagelemon.com
```

Until you sign in, this link can still publish new sites (they expire after 72 hours unless you keep them). Once you sign in, your AI works with every site in your account.

What happens at sign-in is the same in every tool: a Page Lemon page opens in your browser, you sign in with Google or your email, check what the tool may do, and click **Allow**. Then go back to your tool.

## Claude Code

Works with any Claude plan that includes Claude Code. In a terminal:

```bash
claude mcp add --transport http pagelemon https://mcp.pagelemon.com
```

Then run `/mcp` inside Claude Code, pick **pagelemon** and sign in.

## Codex

```bash
codex mcp add pagelemon --url https://mcp.pagelemon.com
codex mcp login pagelemon
```

The second command opens Page Lemon so you can sign in. To use an [API token](/docs/api-tokens) instead, keep it in an environment variable, not in the config file.

## Cursor

Works on every Cursor plan. Add this to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "pagelemon": {
      "url": "https://mcp.pagelemon.com"
    }
  }
}
```

Open Cursor's settings and find the MCP section (Tools and MCP in recent versions). Next to **pagelemon**, click to sign in if it asks.

## VS Code

Works with GitHub Copilot in VS Code, Copilot Free included. Add this to `.vscode/mcp.json` in your project, or run **MCP: Add Server** from the Command Palette and choose HTTP:

```json
{
  "servers": {
    "pagelemon": {
      "type": "http",
      "url": "https://mcp.pagelemon.com"
    }
  }
}
```

Click **Start** above the server in `mcp.json`. VS Code asks if Page Lemon may sign you in; allow it, then sign in. Use Copilot Chat in agent mode.

On Copilot Business or Enterprise, your organisation can turn MCP servers off. If you can't add one, ask your admin.

## Gemini CLI

Free with a Google account. Add this to `~/.gemini/settings.json` (all projects) or `.gemini/settings.json` (one project):

```json
{
  "mcpServers": {
    "pagelemon": {
      "httpUrl": "https://mcp.pagelemon.com"
    }
  }
}
```

Start Gemini CLI and run `/mcp auth pagelemon` to sign in.

## Windsurf

Works on every Windsurf plan. On Teams plans, an admin may need to allow remote MCP servers first. Add this to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "pagelemon": {
      "serverUrl": "https://mcp.pagelemon.com",
      "headers": {
        "Authorization": "Bearer pl_..."
      }
    }
  }
}
```

Windsurf connects with an [API token](/docs/api-tokens): replace `pl_...` with your token. You can also open the file from Cascade's MCP menu, then refresh the server list.

## Cline and Trae

Cline and Trae connect with an [API token](/docs/api-tokens) in a header. Create one first, then add Page Lemon to the tool's MCP settings.

In Cline, open the MCP Servers panel and edit the settings file (`cline_mcp_settings.json`):

```json
{
  "mcpServers": {
    "pagelemon": {
      "type": "streamableHttp",
      "url": "https://mcp.pagelemon.com",
      "headers": {
        "Authorization": "Bearer pl_..."
      }
    }
  }
}
```

In Trae, open MCP in the settings, choose to add a server manually, and paste:

```json
{
  "mcpServers": {
    "pagelemon": {
      "url": "https://mcp.pagelemon.com",
      "headers": {
        "Authorization": "Bearer pl_..."
      }
    }
  }
}
```

Replace `pl_...` with your token. These settings files are on your computer, not in your project, so the token stays out of git. Tokens expire after 90 days: make a new one and paste it in.

## Use a token instead of signing in

Any tool here can use an [API token](/docs/api-tokens) instead of signing in, for example on a server with no browser. Send it as a header: `Authorization: Bearer pl_...`. For Claude Code:

```bash
claude mcp add --transport http pagelemon https://mcp.pagelemon.com --header "Authorization: Bearer pl_..."
```

Never put a token in a file you commit, such as `.cursor/mcp.json` or `.vscode/mcp.json` in a shared project.

## Check it works

```prompt
What sites do I have on Page Lemon?
```

If your AI lists your sites, it's connected and signed in.

## If something goes wrong

| What you see | What to do |
|---|---|
| The tool doesn't show Page Lemon's tools | Check the JSON is valid (no trailing commas), save the file, then restart the tool or refresh its MCP list |
| The sign-in page doesn't open | Start the sign-in again from the tool (`/mcp` in Claude Code, `/mcp auth pagelemon` in Gemini CLI, the server entry in Cursor or VS Code) |
| Sign-in stalls or says "We couldn't connect this app" | The sign-in link is only valid for a few minutes. Start again from the tool. If it still fails, use an API token instead |
| `401` errors with a token | The token is wrong, expired or revoked. Make a new one on the Get started page |
| Your AI says it needs permission to manage | You unticked the manage box. Connect again and leave it ticked, or make that change yourself in your account |

Still stuck? See [Fix a problem](/docs/fix-a-problem) or email [support@pagelemon.com](mailto:support@pagelemon.com) and say which tool you use.

## Disconnect

Open [app.pagelemon.com/account/tokens](https://app.pagelemon.com/account/tokens) (**Account settings** → **API tokens**) and click **Disconnect** next to the tool. It's signed out at once and your sites stay online. Then remove the `pagelemon` entry from the tool's settings.
