Skip to main content
Glama
README.md
# sitelens-mcp

Local companion MCP for the SiteLens Chrome extension.

**Flow (no manual export):**

1. Cursor starts this MCP over **stdio** (see config below).
2. MCP also listens on **`127.0.0.1:19527`** (bridge).
3. In Chrome, run SiteLens analysis → click **Send to MCP** on the floating panel.
4. The extension `POST`s the current `AnalysisReport` to the bridge.
5. Agent tools (`sitelens_get_latest_report`, …) read the in-memory cache.

Everything stays on your machine. No cloud upload.

## Install

```bash
git clone https://github.com/SiteLens-team/sitelens-mcp.git
cd sitelens-mcp
pnpm install
pnpm build
```

Requires Node.js ≥ 18.

## Cursor `mcp.json`

Point at the built entry (use your absolute path):

```json
{
  "mcpServers": {
    "sitelens": {
      "command": "node",
      "args": [
        "/absolute/path/to/sitelens-mcp/dist/index.js"
      ]
    }
  }
}
```

Optional port override:

```json
{
  "mcpServers": {
    "sitelens": {
      "command": "node",
      "args": [
        "/absolute/path/to/sitelens-mcp/dist/index.js"
      ],
      "env": {
        "SITELENS_MCP_PORT": "19527"
      }
    }
  }
}
```

## Pairing

| Step | Who | What |
|------|-----|------|
| 1 | Cursor | Starts `sitelens-mcp` → stdio + `http://127.0.0.1:19527` |
| 2 | You | Analyze a page with the SiteLens extension |
| 3 | You | Click **Send to MCP** on the panel toolbar |
| 4 | Extension | `POST /report` with `{ report, source: "sitelens-extension" }` |
| 5 | Agent | Calls `sitelens_get_latest_report` / `sitelens_export_checklist` |

Health probe:

```bash
curl -s http://127.0.0.1:19527/health
```

## Tools

| Tool | Purpose |
|------|---------|
| `sitelens_ping` | Bridge up?, port, cached report count |
| `sitelens_get_latest_report` | Full latest `AnalysisReport` (optional `url` filter) |
| `sitelens_list_reports` | Summaries only (last ~20) |
| `sitelens_export_checklist` | Severity-ordered fix checklist (no AI) |

## Environment

| Variable | Default | Meaning |
|----------|---------|---------|
| `SITELENS_MCP_PORT` | `19527` | Localhost bridge port |

The Chrome extension defaults to the same port. Optional override in extension storage key `mcpPort`.

## Privacy

- Bridge binds **only** `127.0.0.1`.
- Logs never include full report bodies (url + timestamp only).
- Reports live in MCP process memory (ring buffer of 20); they vanish when the MCP process exits.

## License

MIT

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct action: health check (ping), retrieve the newest full report, enumerate cached report summaries, and derive a checklist. The only near-overlap (get_latest_report vs list_reports) is clearly separated by 'full AnalysisReport JSON' versus 'summaries only, newest first.' An agent can select correctly from names alone.

Naming Consistency4/5

All four tools share the sitelens_ prefix and a verb_noun pattern (get_latest_report, list_reports, export_checklist), which is predictable. The lone deviation is sitelens_ping, a bare verb with no noun, but that is idiomatic for a health check.

Tool Count4/5

Four tools is on the lean side but each covers a genuinely separate need (health, fetch, enumerate, transform). Nothing appears redundant, though the surface is thin enough that a couple of convenience tools could reasonably have been added.

Completeness4/5

The domain is a read-only bridge over cached reports, and the surface covers discovery (list), retrieval (get latest, with url filtering), health, and one derived output (checklist). Minor gap: there is no way to fetch an older or specific report by id/url beyond 'latest matching,' and no cache-clearing operation.

Maintenance

ActivityMaintained
ResponsivenessNo issues