Blowback

Blowback

Integrates front-end development servers with AI tools, enabling browser automation, console log capture, screenshot management, and HMR event monitoring.

Category
访问服务器

README

Blowback

Vite MCP Server is now Blowback

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

A Model Context Protocol (MCP) server that integrates FE development servers with AI tools like Claude Desktop and Cursor.

How to Use

Command (Claude Code):

claude mcp add blowback -s project -e PROJECT_ROOT=/path/to/your/project -- npx -y blowback-context

Or use json configuration:

  • Claude Code: {PROJECT_ROOT}/.mcp.json
  • Cursor: {PROJECT_ROOT}/.cursor/mcp.json
{
  "mcpServers": {
    "blowback": {
      "command": "npx",
      "args": ["-y", "blowback-context"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

Environment Variables

  • PROJECT_ROOT: Project root path (optional, defaults to current working directory)
  • ENABLE_BASE64: Include base64 encoded images in tool responses (default: false / affects token usage and context window when enabled)

Key Features

  • Integration of local development server with MCP server
  • Browser console log capture and transmission via MCP
  • Checkpoint-based log management
  • Screenshot capture and SQLite database management
  • HMR (Hot Module Replacement) event monitoring
  • Browser automation and element inspection

init Prompt

The init prompt provides guidance to AI assistants on how to effectively use the following features:

Cursor Chat does not support MCP prompt functionality, so this feature is not available. (Claude Code recommended) If needed, manually input the following prompt:

You can use checkpoint features by inserting <meta name="__mcp_checkpoint" data-id=""> into the head to create a named snapshot of the current state. The data-id attribute is a unique identifier for the checkpoint.

Console logs generated in the browser while a checkpoint is active are tagged with the checkpoint ID and can be queried individually.

Note: In some development environments, hot reload is triggered when files are saved, so carefully consider the sequence between meta tag changes and the changes you want to observe. Make sure to set the checkpoint meta tag before making the changes you want to track.

You can use the capture-screenshot tool to take screenshots. The captured screenshots are stored in the @.mcp_screenshot/ directory.

Tools

HMR Tools

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

Note: HMR connection is optional, not required. HMR event monitoring starts automatically when the browser is launched.

Browser Tools

Tool Name Description
start-browser Starts a browser instance and navigates to the development server. HMR monitoring starts automatically
capture-screenshot Captures a screenshot of the current page or a specific element. Returns screenshot ID and resource URI
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

Help Tools

Tool Name Description
how-to-use Provides instructions on how to use specific features of the server

Resources

screenshots

A resource for querying all captured screenshots. You can query screenshot reference IDs captured by the capture-screenshot tool using various criteria.

Images corresponding to reference IDs are managed in the {PROJECT_ROOT}/.mcp_screenshot/ directory.

  • URI: screenshot://
  • Returns a list of all screenshots

screenshot-by-url

A resource for querying specific screenshots based on URL path.

Note: Starting from version 1.0, Blob responses through resources are disabled by default, and file reference information is returned instead

  • URI template: screenshot://{+path}
  • Example: screenshot://localhost:5173/about
  • Use URL paths without protocol (http://, https://)

Data Storage Structure

Screenshot Storage

  • Screenshot images: Stored in {PROJECT_ROOT}/.mcp_screenshot/ directory
  • Metadata: Managed in SQLite database in temporary directory
  • It's recommended to add .mcp_screenshot/ directory to .gitignore

Log Management System

  • Captures browser console logs and saves them to files for querying
  • Checkpoint logs are only saved when checkpoints are active

Checkpoint System

How Checkpoints Work

  • 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: Central module that exposes tools and resources to AI tools using the Model Context Protocol SDK.

  2. Browser Automation: Uses Playwright to control Chrome for visual inspection, screenshot capture, and DOM manipulation.

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

  4. SQLite Database: Efficiently manages screenshot metadata and enables quick URL-based queries.

Data Sources and State Management

The server maintains several important data stores:

  • HMR Event Records: Tracks recent HMR events (updates, errors) from development server.
  • Console Message Logs: Captures browser console output for debugging.
  • Checkpoint Storage: Stores named snapshots of browser states including DOM snapshots.
  • Screenshot Storage: Saves images in project directory and manages metadata with SQLite.

Communication Flow

  1. MCP Client → Development Server:

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

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

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

State Maintenance

The server maintains reference objects for:

  • Current browser and page instances
  • Recent HMR events

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选