# Connect an MCP client to Page Systems

Page Systems runs a remote MCP server (Streamable HTTP) at:

```
https://pagesystems.ai/mcp
```

It authenticates with your API key in an `Authorization: Bearer` header, so any client that can send a custom header can connect. Clients that only sign in with OAuth, such as claude.ai connectors on the web, cannot connect yet. The tools are `list_page_types`, `get_page_type_schema`, `validate_spec`, `create_page`, `get_page_result` and `cancel_page`; `create_page` carries the full schema of every page type.

Create a key in the [dashboard](https://app.pagesystems.ai/dashboard/keys) (it starts with `ap_live_` and is shown once) and set it where your agent runs. Never commit it. The examples below read it from the `PAGE_SYSTEMS_API_KEY` environment variable where the client supports that.

To check the connection with curl, send both `Accept` types (the server answers `406` without them):

```bash
curl -X POST https://pagesystems.ai/mcp \
  -H "Authorization: Bearer $PAGE_SYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Claude Code

```bash
claude mcp add --transport http page-systems https://pagesystems.ai/mcp --header "Authorization: Bearer $PAGE_SYSTEMS_API_KEY"
```

This writes the key itself into your Claude Code config. Add `--scope user` to use it in every project, or `--scope project` to write `.mcp.json` in the project (then keep the key out of version control).

## Codex

In `~/.codex/config.toml`:

```toml
[mcp_servers.page-systems]
url = "https://pagesystems.ai/mcp"
bearer_token_env_var = "PAGE_SYSTEMS_API_KEY"
```

Codex asks before each tool call that changes something. For `codex exec` and other runs without prompts, approve `create_page` up front:

```toml
[mcp_servers.page-systems.tools.create_page]
approval_mode = "approve"
```

## Cursor

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

```json
{
  "mcpServers": {
    "page-systems": {
      "url": "https://pagesystems.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:PAGE_SYSTEMS_API_KEY}" }
    }
  }
}
```

## VS Code

In `.vscode/mcp.json`. VS Code asks for the key the first time the server starts and stores it:

```json
{
  "inputs": [{ "type": "promptString", "id": "page-systems-key", "description": "Page Systems API key", "password": true }],
  "servers": {
    "page-systems": {
      "type": "http",
      "url": "https://pagesystems.ai/mcp",
      "headers": { "Authorization": "Bearer ${input:page-systems-key}" }
    }
  }
}
```

## Other clients

Give the client the URL above, the Streamable HTTP transport, and the header `Authorization: Bearer <your key>`.

## Add the skill

The server also offers the prompt `page_systems_skill`: guidance on when a page beats a chat question and how to use pages well. Add it to the conversation, or put it in your project's agent instructions (`curl -o SKILL.md https://pagesystems.ai/v1/skill`).

## Check it works

Ask your agent something a page answers better than chat, for example "Ask Sam which of 9:00, 11:00 or 14:00 next Tuesday works for a call." It should send a link. Open it, pick a time, submit, then ask the agent what Sam picked: it reads the answer with `get_page_result`.
