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

ui-agent-view

v1.0.0

Published

MCP server that screenshots web apps and sends UI info to AI agents for instant feedback

Downloads

102

Readme

ui-agent-view

npm package that screenshots a web app and sends UI info to an AI agent via the Model Context Protocol (MCP).

Overview

ui-agent-view is an MCP server that gives AI agents instant visual and structural feedback about any web page. It launches a headless Chromium browser (via Playwright) and exposes the following MCP tools:

| Tool | Description | |------|-------------| | navigate | Navigate the browser to a URL and wait until the page is loaded | | screenshot | Take a screenshot of the current page (returns a base64 PNG) | | get_ui_snapshot | Return the ARIA accessibility snapshot of the current page | | get_page_info | Return metadata: URL, title, meta description, viewport | | click | Click an element identified by a CSS selector | | type_text | Type text into an input element identified by a CSS selector | | evaluate | Evaluate arbitrary JavaScript in the page context |

Requirements

  • Node.js ≥ 18
  • Chromium (installed automatically by Playwright – see Installation)

Installation

From npm (published package)

npm install -g ui-agent-view
npx playwright install chromium   # install the Chromium browser

As a local project dependency

npm install ui-agent-view

From source (development)

git clone <repository-url>
cd ui-agent-view
npm install
npm run build
npm install -g .   # or: sudo npm install -g .
npx playwright install chromium

Usage

As an MCP server (recommended)

Add the server to your MCP client configuration. For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "ui-agent-view": {
      "command": "ui-agent-view"
    }
  }
}

Then restart Claude Desktop. The seven tools listed above will appear automatically.

CLI options

ui-agent-view [options]

Options:
  -H, --headless       Run browser in headless mode (default: true)
  --no-headless        Run browser with a visible window
  -t, --timeout <ms>   Navigation / action timeout in milliseconds (default: 30000)
  -h, --help           Show help

As a library

import { BrowserSession, createServer } from "ui-agent-view";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const session = new BrowserSession({ headless: true, timeout: 30_000 });
const server = createServer(session);
const transport = new StdioServerTransport();
await server.connect(transport);

BrowserSession API

const session = new BrowserSession({ headless: true, timeout: 30_000 });

// Navigate
const info = await session.navigate("https://example.com");
// → { url, title, description, viewport }

// Screenshot
const shot = await session.screenshot();
// → { data: "<base64 PNG>", mimeType: "image/png", width, height }

// Accessibility snapshot (ARIA YAML-like string)
const aria = await session.getAccessibilitySnapshot();

// Page metadata
const meta = await session.getPageInfo();

// Interact
await session.click("button#submit");
await session.typeText("input#email", "[email protected]");

// Evaluate JS
const result = await session.evaluate("document.title");

// Clean up
await session.close();

Development

npm install
npx playwright install chromium
npm run build   # compile TypeScript
npm test        # run unit tests
npm run lint    # type-check

License

MIT