MCP Setup

Connect PageReflect to Claude with MCP

Updated Jun 2, 20265 min read
Examples
On this page

Requirements

You need a PageReflect account and membership in the organization you want Claude to access. Signing in from the terminal mints an org-scoped key on your behalf, so it needs the same owner or admin permission as issuing a key by hand.

MCP access is a paid-plan feature. The package runs locally with Node 22.19 or newer and talks to PageReflect over HTTPS.

1. Sign in from the terminal

Run the login command once. It opens your browser to approve the connection, then stores an org-scoped token at `~/.pagereflect/credentials.json`, readable only by you. The CLI and the MCP server both read it, so there is no key to copy or paste.

On a headless or SSH machine with no browser, add `--no-browser` for the device-code flow: the CLI prints a short code that you approve in any browser, then polls until it is approved.

Both login and the MCP server run through `npx -y pagereflect`, so they always use the latest published version. There is no global install to keep current, and no chance of logging in with one version while the server runs another.

HTTP
npx -y pagereflect login

2. Connect Claude

For Claude Desktop, add the block below to your MCP config and restart Claude. Because you signed in, there is no `env` key to fill in.

For Claude Code, run `claude mcp add pagereflect -- npx -y pagereflect mcp` from the directory you want the server registered in, then restart the session. The package name is `pagereflect`; the same package also runs as a terminal CLI (see The pagereflect CLI).

A restart is necessary but not always sufficient. If the client still shows the server failed to connect, the server is crashing on boot rather than waiting on auth. Run `npx -y pagereflect doctor` to see the exact error; re-running pulls the latest version, which resolves it if an older one fails to start.

HTTPclaude_desktop_config.json
{
  "mcpServers": {
    "pagereflect": {
      "command": "npx",
      "args": ["-y", "pagereflect", "mcp"]
    }
  }
}

3. Verify

After restarting, ask Claude to call `get_account`. It should return the connected organization, the API key name and prefix, and the user the key belongs to.

If `get_account` returns 401, the credential is missing or revoked: re-run `npx -y pagereflect login`. If another tool returns an upgrade error (402), the organization is not on a paid plan. If the tool never appears at all, the server did not boot, run `npx -y pagereflect doctor`.

Connect with an API key instead

For CI, servers, and other unattended environments, skip the login step and pass a key through the `PAGEREFLECT_API_KEY` environment variable. Open Settings, API keys and create a key with a descriptive name like "CI" or "Claude Desktop"; see API keys for the full lifecycle. The token is shown once and kept only as a hash plus a short display prefix, so store it in a password manager before closing the modal.

An env key set this way overrides any stored login, which makes it the right choice for shared or headless configs. For Claude Code, the equivalent is `claude mcp add pagereflect --env PAGEREFLECT_API_KEY=sk_pageref_... -- npx -y pagereflect mcp`.

HTTPclaude_desktop_config.json
{
  "mcpServers": {
    "pagereflect": {
      "command": "npx",
      "args": ["-y", "pagereflect", "mcp"],
      "env": { "PAGEREFLECT_API_KEY": "sk_pageref_..." }
    }
  }
}

Available tools

Audits and sites: `get_account` verifies the connection, `start_audit` queues a URL audit, `get_run` polls progress and returns the linked report once scoring finishes, `get_report` returns JSON or a signed PDF URL, and `list_sites`, `get_history`, and `get_schedule` expose your organization's sites, recent runs, and re-audit schedule.

Actions: `get_actions`, `update_action`, and `comment_action` read and edit action items; `request_action_brief` and `get_action_brief` queue and read an async brief; `get_actions_handoff` returns a handoff prompt for a set of action IDs.

Every tool is scoped to the organization attached to the credential and logged in the dashboard with argument hashes rather than raw arguments. The same operations are documented as plain HTTP in the API reference.

Troubleshooting

Start with `npx -y pagereflect doctor`. It reports two things separately: whether the stored credential authenticates, and whether the server itself boots. A failed-to-connect state in your client is usually one of these, and doctor tells you which.

Restart the MCP client after editing config. Confirm the command is `npx -y pagereflect mcp`. If you signed in, check that `~/.pagereflect/credentials.json` exists; if you used a key, check that the `env` block includes `PAGEREFLECT_API_KEY`. Any self-hosted or preview install must set `PAGEREFLECT_API_URL` for both `login` and `mcp`.

If doctor reports a boot or schema error rather than auth, the installed version is faulty. Because the command runs `npx -y pagereflect`, the fix is simply to re-run it, which pulls the latest published version.

To rotate access, run `npx -y pagereflect login` again, or revoke the key in Settings, issue a new one, and update your config. After either, call `get_account` to confirm.

Feedback

Was this page helpful?

Connect PageReflect to Claude with MCP, PageReflect docs