MCP guides

SiteLens MCP on WSL / Linux

Portable local QA via @sitelensapi/mcp on npm — any project, no Mac-specific paths.

npm install (any WSL/Linux project)

npm install @sitelensapi/mcp
npx -y @sitelensapi/mcp sitelens-mcp setup
npx -y @sitelensapi/mcp -- --self-test
npx -y @sitelensapi/mcp sitelens doctor --cursor

Point Cursor MCP at npx -y @sitelensapi/mcp (stdio only). See global Cursor setup.

Playwright browsers

Local QA uses bundled Chromium. Install OS deps once:

npx -y @sitelensapi/mcp sitelens-mcp setup

Or, if setup fails, from a project with the package installed:

cd node_modules/@sitelensapi/mcp
npx playwright install --with-deps chromium

Doctor

npx -y @sitelensapi/mcp sitelens doctor

Reports Node, Playwright, ~/.sitelens auth paths, and ./.sitelens/flows under the current working directory.

Cursor MCP config (WSL)

Recommended: global npx config from global Cursor setup.

Advanced: absolute path to node_modules/@sitelensapi/mcp/dist/mcp-server.js with cwd set to your app repo (where .sitelens/flows lives):

{
  "mcpServers": {
    "sitelens": {
      "command": "node",
      "args": ["/home/YOU/my-app/node_modules/@sitelensapi/mcp/dist/mcp-server.js"],
      "cwd": "/home/YOU/my-app",
      "env": {
        "SITELENS_MODE": "local",
        "SITELENS_WORKSPACE_DIR": "/home/YOU/my-app"
      }
    }
  }
}

On Windows Cursor with WSL, use WSL paths and the WSL node binary (which node inside WSL).

Auth & flows

Troubleshooting

IssueFix
Browser launch failssitelens-mcp setup or playwright install --with-deps chromium
Flow not foundSet MCP cwd / SITELENS_WORKSPACE_DIR to the repo with .sitelens/flows
Cloud tools disabledExpected with SITELENS_MODE=local; add API key + all only if needed