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

any-browser-mcp

v1.0.8

Published

MCP server that attaches to existing browser sessions via Chrome DevTools Protocol

Readme

Any Browser MCP 🚀

Revolutionary Browser Automation via Model Context Protocol (MCP)

🎯 The Breakthrough: No Isolated Contexts

Unlike traditional browser automation tools that create separate, isolated browser instances, Any Browser MCP directly controls your existing browser - the one you can see and interact with!

Traditional Automation (Isolated)

Your Real Browser          Automation Tool
┌─────────────────┐       ┌─────────────────┐
│ 🌐 Your tabs    │  ❌   │ 🤖 Separate     │
│ • Gmail         │       │ • Clean profile │
│ • Your data     │       │ • No bookmarks  │
└─────────────────┘       └─────────────────┘

Any Browser MCP (Direct Control)

Your Real Browser (SAME BROWSER!)
┌─────────────────────────────────┐
│ 🌐 Your tabs ← 🤖 MCP Controls  │
│ • Gmail      ← ✅ Available     │
│ • Your data  ← ✅ Available     │
└─────────────────────────────────┘

A production-grade MCP (Model Context Protocol) server that directly controls your existing browser via the Chrome DevTools Protocol (CDP). No isolated contexts - it controls the actual browser windows you can see and interact with!

🌟 Key Features

  • 🚀 Auto-Launch Chrome - Automatically starts Chrome with debugging when needed
  • 🔗 Direct Browser Control - Controls your actual visible browser tabs
  • 📋 Profile Preservation - Uses your bookmarks, passwords, extensions
  • 🛠️ 20+ Automation Tools - Complete browser automation toolkit
  • 🎯 No Isolation - Works with your real browser, not a separate instance
  • ⚡ Chrome DevTools Protocol - Direct WebSocket communication for maximum performance
  • 🔄 Smart Detection - Finds existing Chrome or launches new instance
  • 🧹 Graceful Cleanup - Proper connection management and cleanup

📦 Installation

Quick Start (Recommended) - Direct Control

# Auto-launch Chrome and start MCP server:
npx any-browser-mcp-direct --verbose

Traditional MCP Server (Isolated Contexts)

# Original version with Playwright isolation:
npx any-browser-mcp@latest

Global Installation

npm install -g any-browser-mcp

Local Development

git clone <repository>
cd any-browser-mcp
npm install

🎯 Quick Start

1. Start Your Browser with Debugging

Chrome/Chromium:

# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

# Windows
chrome.exe --remote-debugging-port=9222

# Linux
google-chrome --remote-debugging-port=9222

Edge:

# Windows
msedge.exe --remote-debugging-port=9223

# macOS
/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --remote-debugging-port=9223

Firefox:

# Enable in about:config
devtools.debugger.remote-enabled = true
devtools.debugger.remote-port = 9224

2. Run the MCP Server

Auto-detect running browser:

npx any-browser-mcp@latest

Connect to specific endpoint:

npx any-browser-mcp@latest --endpoint ws://127.0.0.1:9222/devtools/browser

Connect to specific browser:

npx any-browser-mcp@latest --browser chrome

3. Configure with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "anybrowser": {
      "command": "npx",
      "args": ["any-browser-mcp@latest"]
    }
  }
}

🛠️ Available Tools

Browser Management

  • browser_screenshot - Take screenshots of page or elements
  • browser_get_content - Get HTML content or text
  • browser_wait_for - Wait for elements or conditions
  • browser_evaluate - Execute JavaScript in browser context

Navigation

  • browser_navigate - Navigate to URLs
  • browser_back / browser_forward - Browser history navigation
  • browser_reload - Reload current page
  • browser_new_tab - Open new tabs
  • browser_list_tabs - List all open tabs
  • browser_switch_tab - Switch between tabs

Interaction

  • browser_click - Click elements
  • browser_type - Type text with realistic timing
  • browser_fill - Fill inputs quickly
  • browser_press_key - Press keyboard keys
  • browser_hover - Hover over elements
  • browser_select_option - Select from dropdowns
  • browser_drag_and_drop - Drag and drop elements

Utilities

  • browser_find_elements - Find and inspect elements
  • browser_get_attribute - Get element attributes
  • browser_get_text - Extract text content
  • browser_check_element - Check element states
  • browser_get_page_info - Get comprehensive page info
  • browser_scroll - Scroll page or elements

🌐 Netlify Deployment

1. Environment Variables

Set in Netlify dashboard:

CDP_ENDPOINT=ws://your-browser-host:9222/devtools/browser
ALLOW_BROWSER_LAUNCH=true  # Optional: allow launching browsers
NODE_ENV=production

2. Deploy

netlify init
netlify deploy --prod

3. Configure Claude Desktop for Remote

{
  "mcpServers": {
    "any-browser-remote": {
      "endpoint": "https://your-site.netlify.app/.netlify/functions/any-browser-mcp",
      "transportType": "http"
    }
  }
}

🔧 CLI Options

any-browser-mcp [options]

Options:
  -e, --endpoint <url>     Explicit CDP endpoint (ws://...)
  -b, --browser <type>     Browser preference (detect|chrome|edge|firefox)
  -p, --port <number>      Custom debugging port
  --launch                 Launch browser if none found
  -v, --verbose            Enable verbose logging
  --help                   Show help

📋 Examples

Basic Page Automation

// Navigate to a website
await browser_navigate({ url: "https://example.com" });

// Find and click a button
await browser_click({ selector: "button.submit" });

// Fill a form
await browser_fill({ selector: "#email", value: "[email protected]" });
await browser_fill({ selector: "#password", value: "password123" });

// Take a screenshot
await browser_screenshot({ fullPage: true, path: "result.png" });

Advanced Interaction

// Wait for dynamic content
await browser_wait_for({ 
  selector: ".loading", 
  state: "hidden", 
  timeout: 10000 
});

// Extract data from multiple elements
const elements = await browser_find_elements({ 
  selector: ".product-card",
  limit: 20,
  includeText: true,
  includeAttributes: true
});

// Execute custom JavaScript
const result = await browser_evaluate({ 
  script: "return document.querySelectorAll('.item').length" 
});

🔒 Security Considerations

  • Local Use: Browser debugging ports are only accessible locally by default
  • Remote Deployment: Ensure proper network security when exposing CDP endpoints
  • Session Management: Sessions auto-expire after 30 minutes of inactivity
  • CORS: Properly configured for cross-origin requests in Netlify deployment

🐛 Troubleshooting

Browser Not Found

# Check if browser is running with debugging enabled
curl http://localhost:9222/json/version

# Try explicit endpoint
any-browser-mcp --endpoint ws://127.0.0.1:9222/devtools/browser

# Launch new instance
any-browser-mcp --launch --verbose

Connection Issues

  • Ensure no firewall blocking debugging ports
  • Check browser isn't running in incognito/private mode
  • Verify correct port numbers for your browser
  • Use --verbose flag for detailed connection logs

Netlify Function Issues

  • Check environment variables are set correctly
  • Verify CDP endpoint is accessible from Netlify
  • Monitor function logs for detailed error information
  • Ensure CORS headers are properly configured

📄 License

MIT License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📚 Resources