Skip to content

bazx-bit/phantom_mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘» Site-Ghost

The AI-Powered Agentic Browser Auditor

28 MCP Tools Β· 15 Expert Skills Β· Playwright Video Recording Β· Precision DOM Mapping

Python Playwright MCP Tests License


Site-Ghost is a headless Chromium daemon that gives AI coding assistants (Cursor, Claude Desktop, Gemini CLI) superhuman browser control. Unlike screenshot-based browser tools that "guess" where elements are, Site-Ghost injects a Precision DOM Mapper directly into every page β€” giving the AI exact pixel coordinates, computed styles, animation states, and live mutation tracking.

Every interaction is automatically video-recorded as .webm snippets. The AI doesn't just "see" a static screenshot β€” it watches transitions happen in real time.

How It's Different

Feature Standard Tools Site-Ghost
Element targeting Accessibility tree (imprecise) Exact (x,y) + bounding box
Style awareness None Font, color, padding, z-index
Animation detection None CSS animation + transition tracking
Live DOM changes None MutationObserver injection
Interaction recording Screenshot Full Playwright video
Network monitoring None All requests + failures
Performance metrics None Core Web Vitals (FCP, LCP)
Console errors None Live error/warning capture
JS injection None Execute arbitrary JS on page
  • Vision Engine. Low-latency video capture and frame-by-frame visual analysis.
  • Ultimate Ghost Container. High-fidelity local cloning with Brain Surgeon Proxy to bypass CORS and React Router loops.
  • 3D Asset Ripper. Automated extraction of WebGL assets, 3D models (GLB/GLTF), and interactive Lottie/GSAP states.
  • Phantom Mirror. High-fidelity UI cloning that captures 'Kinetic Soul' (animations, glow, design tokens).
  • Forensic Reporter. Professional standalone PDF generation with 2026 AI-readiness auditing.
  • Deep Deconstructor. Mathematical design system extraction (Palettes, Typography, Spacing).
  • Visual Precinct. Precise precision tracking for dynamic and animated DOM elements.

⚑ Quick Start

Phantom MCP is distributed as an executable Python package. You can install and run it natively on Windows, macOS, and Linux using either uv or pip.

1. The Zero-Install Way (Recommended)

If you have uv installed (the modern, ultra-fast Python package manager used by Claude/Cursor), you don't even need to download the repository. Just add this to your AI config:

Cursor / Claude Desktop Config:

{
  "mcpServers": {
    "phantom-mcp": {
      "command": "uvx",
      "args": ["phantom-mcp"]
    }
  }
}

2. The Global Pip Install

If you prefer to install it permanently on your system so the command phantom-mcp is globally available everywhere:

# Windows / macOS / Linux
pip install git+https://github.com/bazx-bit/phantom_mcp.git
playwright install chromium

Then add this to your AI:

Gemini CLI:

gemini mcp add phantom-mcp -- phantom-mcp

Cursor / Claude Desktop Config:

{
  "mcpServers": {
    "phantom-mcp": {
      "command": "phantom-mcp",
      "args": []
    }
  }
}

Then just ask your AI:

"Assume the Visual Forensics Analyst persona and audit https://example.com for design quality."


πŸ”§ 15 MCP Tools

Navigation & Observation

Tool Description
ghost_goto Navigate to any URL (waits for network idle)
ghost_map_dom Inject precision mapper β€” coordinates, styles, animations
ghost_extract_links Extract all anchor links from the page
ghost_screenshot Take a named screenshot (full page or viewport)
ghost_video_status Get the path to the current .webm recording

Interaction

Tool Description
ghost_interact Click, type, hover, select, focus, check, uncheck
ghost_scroll Scroll up/down/top/bottom by pixel count
ghost_drag Drag one element onto another
ghost_viewport Resize viewport (mobile, tablet, desktop, ultrawide)
ghost_wait_for Wait for a CSS selector to appear

Intelligence

Tool Description
ghost_execute_js Inject and run arbitrary JavaScript on the live page
ghost_drain_mutations Pull DOM changes from the injected MutationObserver
ghost_network_log Get all HTTP requests since last navigation
ghost_performance Extract Core Web Vitals (FCP, load time, transfer size)
ghost_cookies Read all cookies set by the page

🧠 11 Expert Skills

Skills are opinionated AI personas loaded via MCP Prompts. Each one transforms the AI into a hyper-specialized auditor with a strict workflow, scoring rubric, and output template.

Skill Persona What it does
aesthetic_auditor Senior Design Critic Typography, color, spacing, responsive, animation polish
animation_auditor Motion Design Engineer Scroll triggers, micro-interactions, GPU acceleration
interaction_tester QA Automation Engineer Click every button, fill every form, break every flow
deep_crawler Web Crawler Intelligence Breadth-first sitemap, orphan pages, hidden endpoints
performance_profiler Performance Engineer Core Web Vitals, render-blocking, image optimization
accessibility_auditor WCAG 2.2 Expert ARIA, keyboard nav, contrast ratios, landmarks
security_scanner White-Hat Pen Tester Exposed .env, hardcoded secrets, CSRF, cookie flags
responsive_stress_test Device Compat. Engineer 12 viewports from Apple Watch to ultrawide
conversion_optimizer CRO Growth Strategist 3-second test, CTA audit, trust signals, friction
visual_regression Regression Test Engine Multi-viewport baseline capture and comparison
competitor_analysis Competitive Intel Analyst Side-by-side comparison across perf, design, content

πŸ—οΈ Project Structure

site-ghost/
β”œβ”€β”€ engine/                         # Core Playwright browser daemon
β”‚   └── src/
β”‚       β”œβ”€β”€ server.py               # MCP Server β€” 15 tools + skill loader
β”‚       β”œβ”€β”€ ghost_browser.py        # Async Playwright manager
β”‚       └── dom_mapper.js           # Precision JS payload
β”œβ”€β”€ skills/                         # AI persona prompts (auto-discovered)
β”‚   β”œβ”€β”€ aesthetic_auditor.md
β”‚   β”œβ”€β”€ animation_auditor.md
β”‚   β”œβ”€β”€ interaction_tester.md
β”‚   β”œβ”€β”€ deep_crawler.md
β”‚   β”œβ”€β”€ performance_profiler.md
β”‚   β”œβ”€β”€ accessibility_auditor.md
β”‚   β”œβ”€β”€ security_scanner.md
β”‚   β”œβ”€β”€ responsive_stress_test.md
β”‚   β”œβ”€β”€ conversion_optimizer.md
β”‚   β”œβ”€β”€ visual_regression.md
β”‚   └── competitor_analysis.md
β”œβ”€β”€ test/                           # Test infrastructure
β”‚   β”œβ”€β”€ engine_test.py              # 26-test verification suite
β”‚   β”œβ”€β”€ fixtures/                   # Test HTML pages
β”‚   └── helpers/                    # Test utilities
β”œβ”€β”€ references/                     # Design reference documents
β”‚   β”œβ”€β”€ issue-taxonomy.md           # Categorized UX/UI issue types
β”‚   └── scoring-rubrics.md          # Standard scoring thresholds
β”œβ”€β”€ .github/workflows/test.yml      # CI configuration
β”œβ”€β”€ ARCHITECTURE.md                 # Why decisions were made
β”œβ”€β”€ CONTRIBUTING.md                 # Development workflow
β”œβ”€β”€ CHANGELOG.md                    # Release history
β”œβ”€β”€ TODO.md                         # Roadmap
β”œβ”€β”€ LICENSE                         # MIT
β”œβ”€β”€ VERSION                         # 1.2.0
β”œβ”€β”€ setup.bat                       # Windows setup
β”œβ”€β”€ setup.sh                        # macOS/Linux setup
β”œβ”€β”€ pyproject.toml
└── README.md

πŸ§ͺ Test Results

πŸ‘» SITE-GHOST ENGINE TEST SUITE
============================================================
[1/10]  Initializing Playwright daemon...   βœ…βœ…
[2/10]  Navigation...                       βœ…βœ…
[3/10]  Precision DOM Mapping...            βœ…βœ…βœ…βœ…
[4/10]  Interactions (hover, click)...      βœ…βœ…
[5/10]  Scroll control...                   βœ…βœ…
[6/10]  Viewport control...                 βœ…βœ…
[7/10]  Named screenshot...                 βœ…
[8/10]  Live JavaScript injection...        βœ…βœ…
[9/10]  Performance metrics...              βœ…βœ…βœ…
[10/10] Link extraction & Network log...    βœ…βœ…βœ…βœ…βœ…
============================================================
πŸ‘» RESULTS: 26/26 passed | 0 failed
πŸŽ‰ ALL TESTS PASSED β€” ENGINE IS COMBAT-READY

πŸ“š Documentation

Document Description
ARCHITECTURE.md Why every design decision was made
CONTRIBUTING.md How to add skills and tools
CHANGELOG.md Release history
TODO.md Roadmap and known limitations

πŸ“„ License

MIT β€” Use it, fork it, ship it.


Built by forgexdev.online

About

"The Ghost in the Machine: An elite agentic auditing engine that gives AI agents frame-by-frame forensic vision, precision DOM mapping, and 11 expert audit personas. Powered by MCP."

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors