websight
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@websightextract the theme from the current page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ποΈ WebSight
Give Your AI Agent Eyes
WebSight is an MCP server that enables AI agents to see, analyze, and verify visual changes on web pages with pixel-perfect accuracy.
Getting Started β’ Features β’ How It Works β’ API Reference β’ Contributing
π― The Problem
AI coding assistants are incredibly powerful at writing and modifying codeβbut they're blind. When you ask an AI to "make the button bigger" or "change the theme to dark mode", it edits the code and hopes for the best. There's no way for the AI to actually see what changed.
Related MCP server: pagelens
π‘ The Solution
WebSight gives AI agents vision. It's a set of visual analysis tools exposed via the Model Context Protocol (MCP), allowing AI agents to:
π Analyze β Understand page structure, CSS variables, themes, and interactive elements
πΈ Snapshot β Capture visual baselines before making changes
π― Compare β Verify changes with pixel-level diffing and percentage metrics
β¨ Features
Feature | Description |
π¨ Theme Extraction | Automatically detects light/dark mode, color schemes, CSS custom properties |
ποΈ Layout Analysis | Identifies landmarks (header, nav, main, footer) and content sections |
π±οΈ Action Detection | Finds all interactive elements with their selectors and test IDs |
π Visual Diffing | Pixel-by-pixel comparison with configurable threshold |
π±οΈ Page Interactions | Click, type, select, hover, scroll β all from AI commands |
β‘ 10x Faster | Persistent browser session eliminates cold-start overhead |
π€ MCP Integration | Works seamlessly with Claude Desktop, Cursor, and VS Code Copilot |
π Auto-Detection | Automatically finds running dev servers (Vite, Next.js, etc.) |
π Quick Start
Installation
# Clone the repository
git clone https://github.com/h34tsink/websight.git
cd websight
# Install dependencies
npm install
# Build the project
npm run build
# Auto-install to your AI tools
npm run install:mcpπ‘ Tip: The installer automatically detects and configures Claude Desktop, Cursor, and VS Code!
Target Specific Tools
npm run install:claude # Claude Desktop only
npm run install:cursor # Cursor only
npm run install:vscode # VS Code Copilot only
npm run install:all # All detected toolsπ How It Works
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI AGENT WORKFLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. LOOK 2. BASELINE 3. DIFF β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Analyze the β β Save visual β β Compare and β β
β β current pageββββ snapshot ββββββΊβ verify β β
β β structure β β before edit β β the changes β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β
β "I see CSS vars, "Baseline "2.3% pixel β
β theme is dark, saved!" difference, β
β 3 buttons..." change OK!" β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββExample Conversation
You: "Use WebSight to change the primary color to red"
AI: Looking at page... I see
--primary: #3b82f6in the CSS variables. Let me save a baseline first.[Makes code changes]
Comparing with baseline... Visual difference: 12.4%. The primary color has been updated across 3 buttons and the header accent.
π Usage
With AI Agents (Recommended)
Just tell your AI assistant:
"use websight to analyze this page"
"use websight to change the theme to dark mode"
"use websight to verify my CSS changes worked"The AI will automatically use the appropriate tools in sequence.
CLI Commands
npm run dev # Start test page at localhost:5173
npm run look # Analyze the current page
npm run baseline # Save snapshot before changes
npm run diff # Compare current state with baselineπ API Reference
MCP Tool Actions
Action | Parameters | Description |
|
| Analyze page structure, CSS variables, theme, and interactive elements |
|
| Capture and save visual snapshot for later comparison |
|
| Compare current state against saved baseline, returns % difference |
|
| Click an element by text, test ID, or selector |
|
| Type text into an input field |
|
| Choose an option from a dropdown |
|
| Hover over an element |
|
| Scroll the page (up/down/top/bottom) |
|
| Press a keyboard key (Enter, Escape, Tab, etc.) |
Example Usage
websight(action="look")
websight(action="click", target="Submit")
websight(action="type", target="email", text="test@example.com")
websight(action="select", target="country", value="USA")Programmatic API
import { analyze, saveBaseline, closeSession, click, type } from 'websight/session';
// Analyze any page
const { snapshot, report } = await analyze('http://localhost:3000');
// Interact
await click('Open Modal');
await type('email', 'test@example.com');
await click('Submit');
console.log(analysis.snapshot.theme); // { mode: 'dark', scheme: 'monochrome' }
console.log(analysis.snapshot.cssVars); // { '--primary': '#3b82f6', ... }
console.log(analysis.snapshot.actions); // [{ type: 'button', text: 'Submit', ... }]
// Save baseline before changes
await saveBaseline('http://localhost:3000', './out');
// Clean up
await closeBrowser();ποΈ Project Structure
websight/
βββ π src/
β βββ mcp-server.ts # MCP server entry point
β βββ π tools/
β βββ api.ts # Programmatic API
β βββ types.ts # TypeScript definitions
β βββ detect.ts # Dev server auto-detection
β βββ compare.ts # Pixel diffing logic
β βββ report.ts # Report generation
β βββ π extractors/ # Page analysis modules
β βββ theme.ts # Theme & CSS variable extraction
β βββ landmarks.ts # Layout landmark detection
β βββ sections.ts # Content section analysis
β βββ actions.ts # Interactive element finder
β βββ overlays.ts # Modal/overlay detection
βββ π scripts/
β βββ install.js # Automated MCP installer
βββ π test-page/
β βββ index.html # Development test page
βββ π dist/ # Compiled output
βββ π out/ # Generated analysis & snapshotsβοΈ Configuration
Automatic Setup (Recommended)
npm run install:mcpThis automatically detects and configures your AI tools.
Manual Configuration
Edit %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"websight": {
"command": "node",
"args": ["C:/path/to/websight/dist/src/mcp-server.js"]
}
}
}Edit .vscode/mcp.json in your workspace:
{
"mcpServers": {
"websight": {
"command": "node",
"args": ["C:/path/to/websight/dist/src/mcp-server.js"]
}
}
}Edit %APPDATA%/Cursor/User/globalStorage/cursor.mcp/mcp.json:
{
"mcpServers": {
"websight": {
"command": "node",
"args": ["C:/path/to/websight/dist/src/mcp-server.js"]
}
}
}Option 1: Create .mcp.json in your project root:
{
"mcpServers": {
"websight": {
"command": "node",
"args": ["C:/path/to/websight/dist/src/mcp-server.js"]
}
}
}Option 2: Use the CLI command:
claude mcp add websight node C:/path/to/websight/dist/src/mcp-server.jsπ οΈ Development
npm run dev # Start test page with hot reload
npm run mcp # Run MCP server in dev mode
npm run build # Build for production
npm run clean # Remove generated filesπ€ Contributing
Contributions are welcome! Feel free to:
π Report bugs
π‘ Suggest features
π§ Submit pull requests
π€ Author
π License
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ for the AI-assisted development community
Because AI agents shouldn't have to code blind.
This server cannot be deployed
Maintenance
Related MCP Connectors
Give agents eyes on any web page: structured context, and changes explained in plain language.
61Capture screenshots, detect visual regressions between page versions, and analyze with AI.
- mcpOAuthcom.screenshotink
Screenshot, diff, audit and sitemap-capture any web page β 5 MCP tools for AI agents.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to capture website screenshots, automate browser interactions, and manage recurring screenshot configurations across 150+ global locations. It also supports AI-powered domain research and visual change monitoring for any web page.6 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to visually interact with frontend apps by taking screenshots, clicking elements, reading console logs, and performing visual diffs.4 npm3MIT
- AlicenseAqualityBmaintenanceScreenshot, visual-diff, and AI page-analysis API for AI agents. Capture any URL as PNG, JPEG, WebP, PDF, or HTML, diff two versions of a page to catch visual regressions, and get an AI summary of what a page contains.344 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to see and interact with real Chrome pages through structured DOM inspection, targeted screenshots, recordings, and human-in-the-loop approvals across major coding-agent hosts.MIT