npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

visual-observer

v0.2.0

Published

MCP server that translates browser visual state into structured text for Claude

Readme

Visual Observer

MCP server that connects to a running web app via Playwright and translates browser state into structured text — enabling Claude to "see" and reason about what's happening on screen.

What It Does

  • Launches a browser or connects to an existing one via Chrome DevTools Protocol
  • Extracts Redux state directly from the running app
  • Parses screenshots with OmniParser v2 (YOLOv8 + Florence-2) into structured text descriptions
  • Detects anomalies by comparing visual state against data state
  • Captures raw screenshots as PNG images
  • Exposes everything as MCP tools that any Claude Code session can call

Setup

Install from npm

npm install -g visual-observer

Or run directly with npx

npx -y visual-observer

Add to Claude Code

Add to your project's .mcp.json or use the CLI:

claude mcp add --transport stdio --scope user visual-observer -- npx -y visual-observer

Or manually in .mcp.json:

{
  "mcpServers": {
    "visual-observer": {
      "command": "npx",
      "args": ["-y", "visual-observer"]
    }
  }
}

Expose your Redux store

In your app's store initialization, add:

if (typeof window !== "undefined") {
  (window as any).__REDUX_STORE__ = store;
}

OmniParser Setup (Optional — for visual parsing)

The get_visual_state and get_full_report tools require OmniParser v2 running as a Docker service:

cd /path/to/visual-observer
docker compose up -d

Requirements:

  • Docker with nvidia-container-toolkit
  • NVIDIA GPU with 12GB+ VRAM
  • First build downloads ~300MB of model weights

The MCP server works without OmniParser — get_page_state, get_screenshot, connect_browser, disconnect_browser, and list_pages all function independently. The get_full_report tool degrades gracefully to data-only mode when OmniParser is unavailable.

MCP Tools

| Tool | Parameters | Description | |------|-----------|-------------| | connect_browser | mode (launch/cdp), url?, cdpEndpoint?, headless? | Launch a browser or connect to existing via CDP | | disconnect_browser | — | Close the browser session | | get_page_state | path?, slice?, maxDepth? | Extract Redux state (full or specific slice) | | get_screenshot | fullPage? | Capture a PNG screenshot | | get_visual_state | — | Screenshot + OmniParser = structured text description of all UI elements | | get_full_report | slice?, path?, maxDepth? | Visual state + Redux data + anomaly detection in one report | | list_pages | — | List all open pages with URLs and titles |

Usage Example

1. connect_browser   → mode: "launch", url: "http://localhost:5173", headless: false
2. get_page_state    → slice: "resources"
3. get_visual_state                          (requires OmniParser)
4. get_full_report   → slice: "progression"  (requires OmniParser for full output)
5. disconnect_browser

Architecture

Game (browser)
       |
       v
Playwright (browser session)
       |
       ├── Screenshot capture
       |       |
       |       v
       |   OmniParser v2 (Docker, GPU)
       |       - YOLOv8: UI element detection
       |       - Florence-2: semantic descriptions
       |       - Output: structured element list
       |
       ├── Redux state extraction
       |       page.evaluate(() => store.getState())
       |
       ├── Anomaly detection
       |       Visual state vs data state comparison
       |
       v
MCP Server (stdio transport)
       - 7 tools Claude can call

Development

git clone https://github.com/attilakiss9000/visual-observer.git
cd visual-observer
npm install
npm run dev        # Run in dev mode
npm run build      # Compile TypeScript
npm run test       # Run tests

Tech Stack

  • Node.js + TypeScript (MCP server)
  • Playwright (browser automation)
  • @modelcontextprotocol/sdk (MCP protocol)
  • Zod (schema validation)
  • Python + FastAPI (OmniParser service)
  • YOLOv8 + Florence-2 (visual parsing)
  • Docker (OmniParser containerization)

License

MIT