Skip to content

Monitor browser logs and much more directly from MCP compatible IDEs.

License

Notifications You must be signed in to change notification settings

cpjet64/WebAI-MCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

WebAI-MCP

Make your AI tools 10x more aware and capable of interacting with your browser

Latest Release NPM MCP Server NPM WebAI Server

English | ็ฎ€ไฝ“ไธญๆ–‡

WebAI-MCP is a comprehensive browser automation and monitoring solution that enables AI applications to capture and analyze browser data through a Chrome extension. It provides 20+ tools for screenshots, console logs, network monitoring, storage access, audits, and cross-platform auto-paste functionality.

โœจ Key Features

  • ๐Ÿ“ธ Screenshot Capture - High-quality screenshots with auto-paste to any IDE
  • ๐Ÿ” Element Inspection - CSS selector-based inspection with computed styles
  • ๐Ÿ“Š Console & Network Monitoring - Real-time browser logs and network requests
  • ๐Ÿช Storage Access - Cookies, localStorage, and sessionStorage data
  • ๐Ÿงช Comprehensive Audits - Accessibility, performance, SEO, and best practices
  • ๐ŸŽฏ Cross-Platform Auto-Paste - Windows, macOS, Linux support for all IDEs
  • ๐ŸŒ Network & Proxy Management - Complete network configuration tools
  • ๐Ÿ”ง Automated Diagnostics - System validation and setup workflows
  • ๐Ÿ›ก๏ธ Enhanced Error Handling - Robust error recovery and reporting

๐Ÿš€ Quick Installation

Method 1: NPM (Recommended)

# 1. Install MCP Server (for your IDE)
npx @cpjet64/webai-mcp@latest

# 2. Install WebAI Server (run in separate terminal)
npx @cpjet64/webai-server@latest

Method 2: Download from Releases

  1. Chrome Extension: Download from Latest Release
  2. MCP Server: npx @cpjet64/webai-mcp@latest
  3. WebAI Server: npx @cpjet64/webai-server@latest

๐Ÿ“‹ Setup Steps

  1. Install Chrome Extension:

    • Download the .zip file from releases
    • Extract and load in Chrome โ†’ Extensions โ†’ Developer mode โ†’ Load unpacked
  2. Configure Your MCP Client:

    For Augment:

    1. Open Augment settings
    2. Go to MCP Servers configuration
    3. Add new server:
      • Name: webai
      • Command: npx -y @cpjet64/webai-mcp@latest
    4. Save configuration

    For Cursor IDE:

    {
      "mcp": {
        "servers": {
          "webai": {
            "command": "npx",
            "args": ["@cpjet64/webai-mcp@latest"]
          }
        }
      }
    }
    

    For Claude Desktop:

    {
      "mcpServers": {
        "webai": {
          "command": "npx",
          "args": ["@cpjet64/webai-mcp@latest"]
        }
      }
    }
    

    For Cline/Zed/Other MCP Clients:

    • Command: npx @cpjet64/webai-mcp@latest
    • Check your client's documentation for specific configuration format
  3. Start WebAI Server:

    • Open a new terminal and run: npx @cpjet64/webai-server@latest
  4. Open DevTools:

    • Open Chrome DevTools โ†’ BrowserToolsMCP panel
    • Ensure connection is established
  5. Test the Setup:

    • Basic test: "Take a screenshot"
    • Advanced test: "Run an accessibility audit"
    • System test: "Run system diagnostics"
    • Network test: "Configure proxy settings"

๐Ÿงช Development Version

Want to try the latest features before they're released?

# Install development version (may be unstable)
npx @cpjet64/webai-mcp@dev
npx @cpjet64/webai-server@dev

Note: Development versions include the latest features but may be unstable. Use @latest for production.

๐Ÿ’ก Important Notes

Two Servers Required:

  • @cpjet64/webai-mcp โ†’ MCP server for your IDE
  • @cpjet64/webai-server โ†’ Local middleware server

Troubleshooting:

  • Close ALL Chrome windows and restart if having issues
  • Restart the webai-server
  • Ensure only ONE DevTools panel is open

After those three steps, open up your chrome dev tools and then the WebAI-MCP panel.

If you're still having issues try these steps:

  • Quit / close down your browser. Not just the window but all of Chrome itself.
  • Restart the local node server (webai-server)
  • Make sure you only have ONE instance of chrome dev tools panel open

After that, it should work but if it doesn't let me know and I can share some more steps to gather logs/info about the issue!

๐Ÿ› ๏ธ Complete Feature Set

WebAI-MCP provides 20+ MCP tools for comprehensive browser automation:

๐Ÿ“Š Browser Monitoring

  • Console Logs - Capture and analyze browser console output
  • Network Requests - Monitor XHR/fetch requests and responses
  • Screenshots - Take high-quality screenshots with auto-paste
  • Selected Elements - Inspect currently selected DOM elements

๐Ÿช Storage Access

  • Cookies - Read and analyze browser cookies
  • localStorage - Access localStorage data
  • sessionStorage - Access sessionStorage data

๐Ÿ” Advanced Element Inspection

  • CSS Selector Inspection - Inspect elements using CSS selectors
  • Computed Styles - Get computed CSS styles for elements
  • Chrome Debugging API - Deep element analysis

๐Ÿงช Audit & Analysis Tools

  • Accessibility Audit - WCAG compliance checking
  • Performance Audit - Page speed and optimization analysis
  • SEO Audit - Search engine optimization analysis
  • Best Practices Audit - Web development best practices
  • NextJS Audit - NextJS-specific optimization checks
  • Audit Mode - Run all audits in sequence
  • Debugger Mode - Run all debugging tools in sequence

๐Ÿ”ง Automated Diagnostics

  • System Diagnostics - Comprehensive system and environment validation
  • Automated Setup - Intelligent setup and configuration workflows
  • Installation Validation - Verify installation integrity and dependencies
  • Platform Detection - Cross-platform compatibility checking

๐ŸŒ Network & Proxy Management

  • Proxy Configuration - Complete proxy setup and management
  • Network Diagnostics - Network connectivity and performance testing
  • Proxy Auto-detection - Automatic system proxy discovery
  • Network Recommendations - Environment-specific network optimization

๐Ÿ›ก๏ธ Enhanced Error Handling

  • Intelligent Error Recovery - Automatic error detection and recovery
  • Detailed Error Reporting - Comprehensive error context and solutions
  • Graceful Degradation - Fallback mechanisms for failed operations

๐ŸŽฏ Cross-Platform Auto-Paste

  • Windows Auto-paste - PowerShell-based automation for all IDEs
  • macOS Auto-paste - AppleScript automation with element detection
  • Linux Auto-paste - xdotool automation for window management
  • Multi-IDE Support - Cursor, VS Code, Zed, Claude Desktop, Custom apps
  • Configurable Target - User-selectable IDE from extension panel

๐Ÿ–ฅ๏ธ Platform-Specific Features

  • Windows Optimization - Windows-specific path handling and features
  • macOS Integration - Native macOS compatibility and optimization
  • Linux Support - Full Linux distribution compatibility
  • Cross-platform Validation - Unified experience across all platforms

๐Ÿงน Utility Tools

  • Wipe Logs - Clear stored logs and data
  • Process Management - Intelligent process monitoring and cleanup
  • Configuration Management - Centralized settings and preferences

๐Ÿ”‘ Key Additions

Audit Type Description
Accessibility WCAG-compliant checks for color contrast, missing alt text, keyboard navigation traps, ARIA attributes, and more.
Performance Lighthouse-driven analysis of render-blocking resources, excessive DOM size, unoptimized images, and other factors affecting page speed.
SEO Evaluates on-page SEO factors (like metadata, headings, and link structure) and suggests improvements for better search visibility.
Best Practices Checks for general best practices in web development.
NextJS Audit Injects a prompt used to perform a NextJS audit.
Audit Mode Runs all auditing tools in a sequence.
Debugger Mode Runs all debugging tools in a sequence.

๐Ÿ› ๏ธ Using Audit Tools

โœ… Before You Start

Ensure you have:

  • An active tab in your browser
  • The BrowserTools extension enabled

โ–ถ๏ธ Running Audits

Headless Browser Automation: Puppeteer automates a headless Chrome instance to load the page and collect audit data, ensuring accurate results even for SPAs or content loaded via JavaScript.

The headless browser instance remains active for 60 seconds after the last audit call to efficiently handle consecutive audit requests.

Structured Results: Each audit returns results in a structured JSON format, including overall scores and detailed issue lists. This makes it easy for MCP-compatible clients to interpret the findings and present actionable insights.

The MCP server provides tools to run audits on the current page. Here are example queries you can use to trigger them:

Accessibility Audit (runAccessibilityAudit)

Ensures the page meets accessibility standards like WCAG.

Example Queries:

  • "Are there any accessibility issues on this page?"
  • "Run an accessibility audit."
  • "Check if this page meets WCAG standards."

Performance Audit (runPerformanceAudit)

Identifies performance bottlenecks and loading issues.

Example Queries:

  • "Why is this page loading so slowly?"
  • "Check the performance of this page."
  • "Run a performance audit."

SEO Audit (runSEOAudit)

Evaluates how well the page is optimized for search engines.

Example Queries:

  • "How can I improve SEO for this page?"
  • "Run an SEO audit."
  • "Check SEO on this page."

Best Practices Audit (runBestPracticesAudit)

Checks for general best practices in web development.

Example Queries:

  • "Run a best practices audit."
  • "Check best practices on this page."
  • "Are there any best practices issues on this page?"

Audit Mode (runAuditMode)

Runs all audits in a particular sequence. Will run a NextJS audit if the framework is detected.

Example Queries:

  • "Run audit mode."
  • "Enter audit mode."

NextJS Audits (runNextJSAudit)

Checks for best practices and SEO improvements for NextJS applications

Example Queries:

  • "Run a NextJS audit."
  • "Run a NextJS audit, I'm using app router."
  • "Run a NextJS audit, I'm using page router."

Debugger Mode (runDebuggerMode)

Runs all debugging tools in a particular sequence

Example Queries:

  • "Enter debugger mode."

Architecture

There are three core components all used to capture and analyze browser data:

  1. Chrome Extension: A browser extension that captures screenshots, console logs, network activity, DOM elements, and browser storage (cookies, localStorage, sessionStorage).
  2. Node Server: An intermediary server that facilitates communication between the Chrome extension and any instance of an MCP server.
  3. MCP Server: A Model Context Protocol server that provides standardized tools for AI clients to interact with the browser.
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MCP Client โ”‚ โ”€โ”€โ–บ โ”‚  MCP Server  โ”‚ โ”€โ”€โ–บ โ”‚  Node Server  โ”‚ โ”€โ”€โ–บ โ”‚   Chrome    โ”‚
โ”‚  (e.g.      โ”‚ โ—„โ”€โ”€ โ”‚  (Protocol   โ”‚ โ—„โ”€โ”€ โ”‚ (Middleware)  โ”‚ โ—„โ”€โ”€ โ”‚  Extension  โ”‚
โ”‚   Cursor)   โ”‚     โ”‚   Handler)   โ”‚     โ”‚               โ”‚     โ”‚             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Model Context Protocol (MCP) is a capability supported by Anthropic AI models that allow you to create custom tools for any compatible client. MCP clients like Claude Desktop, Cursor, Cline or Zed can run an MCP server which "teaches" these clients about a new tool that they can use.

These tools can call out to external APIs but in our case, all logs are stored locally on your machine and NEVER sent out to any third-party service or API. WebAI-MCP runs a local instance of a NodeJS API server which communicates with the WebAI-MCP Chrome Extension.

All consumers of the WebAI-MCP Server interface with the same NodeJS API and Chrome extension.

Chrome Extension

  • Monitors XHR requests/responses and console logs
  • Tracks selected DOM elements
  • Sends all logs and current element to the WebAI Connector
  • Connects to Websocket server to capture/send screenshots
  • Retrieves cookies, localStorage, and sessionStorage data
  • Allows user to configure token/truncation limits + screenshot folder path

Node Server

  • Acts as middleware between the Chrome extension and MCP server
  • Receives logs and currently selected element from Chrome extension
  • Processes requests from MCP server to capture logs, screenshot or current element
  • Retrieves browser storage data (cookies, localStorage, sessionStorage)
  • Sends Websocket command to the Chrome extension for capturing a screenshot
  • Intelligently truncates strings and # of duplicate objects in logs to avoid token limits
  • Removes cookies and sensitive headers to avoid sending to LLMs in MCP clients

MCP Server

  • Implements the Model Context Protocol
  • Provides standardized tools for AI clients
  • Compatible with various MCP clients (Cursor, Cline, Zed, Claude Desktop, etc.)

๐ŸŽฏ Usage Examples

Once installed, you can use natural language commands with your MCP client:

Storage Access

  • "What cookies are set on this page?"
  • "Show me the localStorage data"
  • "What's in sessionStorage?"

Element Inspection

  • "Inspect all buttons on this page"
  • "Get the computed styles for .header elements"
  • "Find all elements with class 'nav-item'"

Audits & Analysis

  • "Run an accessibility audit"
  • "Check the performance of this page"
  • "Analyze SEO issues"
  • "Enter audit mode"

Debugging

  • "Take a screenshot"
  • "Show me console errors"
  • "What network requests were made?"
  • "Enter debugger mode"

Network & Proxy Management

  • "Configure proxy settings"
  • "Test network connectivity"
  • "Auto-detect system proxy"
  • "Optimize network settings for this environment"

Automated Diagnostics

  • "Run system diagnostics"
  • "Validate installation"
  • "Check platform compatibility"
  • "Setup automated configuration"

Cross-Platform Auto-Paste

  • "Take a screenshot and paste it to VS Code" (configure target IDE in extension)
  • "Screenshot this page" (auto-pastes to configured IDE)
  • Windows: PowerShell automation with process detection
  • macOS: AppleScript with element detection and fallbacks
  • Linux: xdotool automation (requires xclip and xdotool)

๐Ÿ”ง Compatibility

MCP Clients

  • โœ… Augment - Full integration and testing
  • โœ… Cursor IDE - Primary integration
  • โœ… Claude Desktop - Full support
  • โœ… Cline - Compatible
  • โœ… Zed - Compatible
  • โœ… Any MCP-compatible client

Operating Systems

  • โœ… Windows - Full support with path conversion
  • โœ… macOS - Native support
  • โœ… Linux - Native support

Node.js Versions

  • โœ… Node.js 18+ - Recommended
  • โœ… Node.js 20 - Fully tested
  • โœ… Node.js 22 - Latest support

Browsers

  • โœ… Chrome - Primary support
  • โœ… Chromium - Compatible
  • โœ… Edge - Compatible (Chromium-based)

๐Ÿ“š Documentation

๐Ÿ”„ Migration from Browser Tools MCP

If you're currently using the original browser-tools-mcp or AgentDeskAI/browser-tools-mcp, here's how to migrate to WebAI-MCP:

๐Ÿ“ฆ Package Migration

1. Update MCP Server Package:

# Remove old package
npm uninstall @cpjet64/browser-tools-mcp
# OR if using original
npm uninstall @munawwar-forks/browser-tools-mcp

# Install new package
npm install @cpjet64/webai-mcp

2. Update WebAI Server Package:

# Remove old package
npm uninstall @cpjet64/browser-tools-server
# OR if using original
npm uninstall @munawwar-forks/browser-tools-server

# Install new package
npm install @cpjet64/webai-server

โš™๏ธ Configuration Updates

Update your MCP client configuration:

Before (Original):

{
  "mcpServers": {
    "browser-tools": {
      "command": "npx",
      "args": ["@munawwar-forks/browser-tools-mcp"]
    }
  }
}

After (WebAI-MCP):

{
  "mcpServers": {
    "webai": {
      "command": "npx",
      "args": ["@cpjet64/webai-mcp"]
    }
  }
}

๐Ÿ”ง Chrome Extension

Option 1: Download from Releases (Recommended)

  1. Download the latest .zip from Releases
  2. Remove the old extension from Chrome
  3. Load the new extension using "Load unpacked"

Option 2: Build from Source

git clone https://github.com/cpjet64/webai-mcp.git
cd webai-mcp/chrome-extension
# Load the folder in Chrome Extensions โ†’ Developer mode โ†’ Load unpacked

โœจ New Features Available After Migration

  • ๐ŸŽฏ Cross-Platform Auto-Paste - Windows, macOS, Linux support
  • ๐Ÿ”ง Automated Diagnostics - System validation and setup workflows
  • ๐ŸŒ Network & Proxy Management - Complete network configuration tools
  • ๐Ÿ›ก๏ธ Enhanced Error Handling - Better error recovery and reporting
  • ๐Ÿช Storage Access Tools - Cookies, localStorage, sessionStorage
  • ๐Ÿงช Advanced Audits - Accessibility, performance, SEO analysis

๐Ÿ” Verification

After migration, test that everything works:

# Start the new WebAI server
npx @cpjet64/webai-server

# Test in your MCP client
"Take a screenshot"
"Run system diagnostics"
"Configure proxy settings"

๐Ÿ’ก Migration Notes

  • Backward Compatible - All existing functionality preserved
  • Same API - No changes to MCP tool interfaces
  • Enhanced Features - Additional tools and capabilities
  • Better Stability - Improved error handling and cross-platform support

๐Ÿค Contributing

WebAI-MCP is actively maintained and welcomes contributions.

๐Ÿ› Issues & Feature Requests

  • Open an issue for bugs or feature requests
  • Check existing issues before creating new ones
  • Provide detailed reproduction steps and environment information

๐Ÿ”„ Development

  • Fork the repository and create feature branches
  • Follow existing code style and patterns
  • Add tests for new functionality
  • Update documentation as needed

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments


Made with โค๏ธ by cpjet64 | Independent Project | v1.4.1 | Fully Integrated

About

Monitor browser logs and much more directly from MCP compatible IDEs.

Resources

License

Stars

Watchers

Forks

Contributors 12