# Sitepager MCP Server

Run and inspect Sitepager scans from your AI assistant. See what changed, which pages have issues, and what needs attention, without leaving Claude, Cursor, Windsurf, or any MCP-compatible client.

[![npm version](https://img.shields.io/npm/v/@sitepager/mcp-server)](https://www.npmjs.com/package/@sitepager/mcp-server) [![license](https://img.shields.io/npm/l/@sitepager/mcp-server)](https://github.com/sitepager/mcp-server/blob/main/LICENSE)

## Overview

Sitepager is an automated website testing platform that shows you exactly what changed since your last update. This package is the MCP server that connects your scan results to AI assistants that support the Model Context Protocol.

Once installed, your assistant can run scans, read structured results, and answer questions about your website using real scan data from your workspace.

Typical workflow: run a scan, review issues, fix, then re-run to verify.

For walkthroughs and fix workflows, see the [full docs](https://sitepager.io/docs/guides/connect-sitepager-mcp).

## Requirements

- [Node.js](https://nodejs.org) 18 or newer
- A [Sitepager](https://home.sitepager.io) account
- An MCP-compatible AI assistant (Claude Code, Claude Desktop, Cursor, or Windsurf)

## Quick start

### 1. Get your API key

Log in to [Sitepager](https://home.sitepager.io), go to **Settings > API Keys**, and create a new key. Your key starts with `sp_live_`.

### 2. Add Sitepager to your MCP config

```json
{
  "mcpServers": {
    "sitepager": {
      "command": "npx",
      "args": ["-y", "@sitepager/mcp-server"],
      "env": {
        "SITEPAGER_API_KEY": "sp_live_..."
      }
    }
  }
}
```

### 3. Verify the connection

Start a new session in your AI assistant and ask:

> List my Sitepager scans.

Your assistant should return your configured scans. You are ready to go.

## Setup by client

### Claude Code

Add the configuration above to `.mcp.json` in your project root.

### Claude Desktop

Edit the Claude Desktop config file:

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- Linux: `~/.config/Claude/claude_desktop_config.json`

Paste the configuration above, then fully quit and reopen Claude Desktop. Click the tools icon in the chat input to confirm `sitepager` appears in the available tools.

### Cursor

Add the configuration above to `.cursor/mcp.json` in your project root.

### Windsurf

Open **Settings > MCP > Add Server** and enter:

- `command`: `npx`
- `args`: `["-y", "@sitepager/mcp-server"]`
- `env`: `SITEPAGER_API_KEY=sp_live_...`

## What you can do

Once connected, your AI assistant can:

- Summarize issues across your entire website
- Identify broken pages and broken links
- Review visual changes against the baseline
- Investigate SEO issues on specific pages
- Pull Lighthouse reports from a scan and review performance issues

For the full scan, fix, and verify workflow, see [Scan, Fix, Verify with AI](https://sitepager.io/docs/guides/scan-fix-verify-with-ai).

## Available tools

| Tool | Description |
|------|-------------|
| `list_scans` | List configured scans |
| `run_scan` | Start a scan run |
| `get_scan_summary` | Retrieve run status and summary |
| `get_scan_results` | Retrieve detailed page-level results |
| `list_scan_runs` | List recent runs for a scan |
| `create_scan` | Create a new scan |
| `cancel_scan_run` | Cancel a running scan |
| `get_credits` | Check remaining Sitepager credits |

## Scan result sections

`get_scan_results` returns data grouped into the following sections:

| Section | Description |
|---------|-------------|
| `visual_changes` | Visual differences between scans |
| `page_changes` | Pages added or removed between runs |
| `broken_pages` | Internal pages returning errors |
| `broken_links` | Pages containing broken links |
| `broken_external_urls` | External links that fail |
| `seo` | SEO issues such as metadata and heading structure |
| `lighthouse` | Lighthouse scores and Core Web Vitals |

## Typical call sequence

Tools are typically called in this order:

```
list_scans
  → run_scan
  → poll get_scan_summary until completed
  → get_scan_results
```

## Example prompts

Starter prompts to try once the server is connected.

**Run a scan**

> Run a Sitepager scan for https://example.com and summarize the results.

**Investigate broken links**

> Check the latest Sitepager scan for https://example.com and list all broken internal links with the pages they appear on.

**Review visual changes**

> Review visual changes detected in the latest run of [scan name] and explain what changed.

**Review SEO issues on a page**

> Inspect SEO issues for https://example.com/pricing from the latest Sitepager scan and suggest fixes.

**Compare changes after an update**

> Compare the latest run of [scan name] with the previous run and summarize what changed across the site.

## Notes

**Scope of access.** The server can create scans, start runs, and cancel runs. It does not modify scan settings or baselines. Baseline updates are done from the dashboard.

**Scan references.** You can reference a scan by the name of a saved scan, or by a website URL. If no scan exists for that URL, Sitepager creates one using default settings. You can customize it later in the dashboard.

**Scoped to your workspace.** All requests are authenticated with your API key and scoped to your Sitepager workspace. The assistant can only access scans and results that belong to your account.

**Credit usage.** Credits apply to `run_scan`. Querying existing scan data does not consume credits.

**Pagination.** Large scans are paginated automatically in batches of up to 200 results per request.

## Troubleshooting

**Server does not appear in your assistant.** Confirm you restarted the assistant after editing the config file, that the config is in the correct location for your client, and that `SITEPAGER_API_KEY` is set to a valid key.

**`npx` command fails.** Check your Node.js version:

```bash
node -v
```

Node 18 or newer is required.

**Scans not appearing.** Verify your API key is valid and that your Sitepager account has available credits. You can check both in the dashboard under Settings.

## Links

- [Documentation](https://sitepager.io/docs/guides/connect-sitepager-mcp)
- [Dashboard](https://home.sitepager.io)
- Support: support@sitepager.io

## License

MIT
