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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vite-mcp-server

v0.2.1

Published

MCP server that integrates with Vite development server for Cursor

Readme

Vite MCP Server

Vite MCP Server is now Blowback

Blowback aims to support various FE development servers, not only Vite

Blowback

Key Features

  • Integration of Vite development server with MCP server
  • Browser console log capture and transmission via MCP
  • Checkpoint-based log management

Installation

Add the server to your Cursor MCP configuration:

{
  "vite-hmr": {
    "command": "npx",
    "args": ["-y", "blowback-context"]
  }
}

Resources

~~console-logs~~

A resource for retrieving browser console logs.

Note: The MCP Resource feature is not supported by Cursor at the moment. Please use the get-console-logs tool instead.

Tools

HMR Tools

| Tool Name | Description | |-----------|-------------| | get-hmr-events | Retrieves recent HMR events | | check-hmr-status | Checks the HMR status |

Browser Tools

| Tool Name | Description | |-----------|-------------| | start-browser | Starts a browser instance and navigates to the Vite development server | | capture-screenshot | Captures a screenshot of the current page or a specific element | | get-element-properties | Retrieves properties and state information of a specific element | | get-element-styles | Retrieves style information of a specific element | | get-element-dimensions | Retrieves dimension and position information of a specific element | | monitor-network | Monitors network requests in the browser for a specified duration | | get-element-html | Retrieves the HTML content of a specific element and its children | | get-console-logs | Retrieves console logs from the browser session with optional filtering | | execute-browser-commands | Safely executes predefined browser commands |

How to use Tools

| Tool Name | Description | |-----------|-------------| | how-to-use | Provides instructions on how to use the tool |

Log Management System

Log Management Method

  • All browser console logs are stored in log files
  • You can query logs for specific checkpoints using the get-console-logs tool

Checkpoint System

Checkpoint Operation Method

  • Checkpoints are used to manage snapshots, logs, screenshots, etc. of specific versions
  • When <meta name="__mcp_checkpoint" data-id=""> is inserted into the head, data is recorded separately using the data-id attribute as an identifier

Architecture and Data Flow

Core Components

  1. MCP Server: A central module based on the Model Context Protocol SDK that provides tools to MCP Client.

  2. Browser Automation: Controls Chrome using Puppeteer to visually inspect changes.

  3. Checkpoint System: Maintains snapshots of browser states for comparison and testing.

Data Sources and State Management

The server maintains several important data stores:

  • HMR Event Records: Tracks recent HMR events (updates, errors) from Vite.
  • Console Message Logs: Captures browser console output for debugging.
  • Checkpoint Storage: Stores named snapshots of browser states including DOM snapshots.

Communication Flow

  1. MCP Client → Development Server:

    • MCP Client changes the source code and Development Server detects the change
    • Development Server updates the browser or emits HMR events automatically
  2. Web Browser → MCP Server:

    • HMR events and console logs are captured through Puppeteer.
    • MCP Server queries the current state of the browser or captures a screenshot
  3. MCP Server → MCP Client:

    • The server converts HMR events into structured responses.
    • Provides tools for MCP Client to query HMR status and capture screenshots.

State Maintenance

The server maintains reference objects for:

  • Current browser and page instances
  • Active Vite client connection
  • Project root path
  • Recent HMR events