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

mcp-chrome-bridger

v1.0.20

Published

Chrome Native-Messaging host (Node) - Fork with Chrome Web Store support

Downloads

1,240

Readme

MCP Chrome Native Host

This package provides the native messaging host used by the Chrome extension.

Features

  • Two-way communication with the extension through Chrome Native Messaging
  • Multi-browser registration support for Chrome and Chromium on Linux, macOS, and Windows
  • Local HTTP service used by the extension and MCP clients
  • TypeScript implementation
  • Native host registration and permission repair commands

Prerequisites

  • Node.js 14+
  • npm 6+

Development

Build and register the native host locally:

cd app/native-server
npm run dev

Start the extension in development mode:

cd app/chrome-extension
npm run dev

Build the native host:

npm run build

Installation

Install the npm package globally:

npm install -g mcp-chrome-bridger

This package name stays mcp-chrome-bridger.

Commands

Register for detected browsers:

mcp-chrome-bridger register --detect

Register for a specific browser:

# Chrome only
mcp-chrome-bridger register --browser chrome

# Chromium only
mcp-chrome-bridger register --browser chromium

# Both Chrome and Chromium
mcp-chrome-bridger register --browser all

System-level registration:

mcp-chrome-bridger register --system

Repair file permissions:

mcp-chrome-bridger fix-permissions

Browser Support

| Browser | Linux | macOS | Windows | | ------------- | ----- | ----- | ------- | | Google Chrome | Yes | Yes | Yes | | Chromium | Yes | Yes | Yes |

User-level manifest locations:

  • Linux: ~/.config/[browser-name]/NativeMessagingHosts/
  • macOS: ~/Library/Application Support/[Browser]/NativeMessagingHosts/
  • Windows: %APPDATA%\[Browser]\NativeMessagingHosts\

Compatibility

The native host keeps compatibility in two places:

  • Native host package name remains mcp-chrome-bridger
  • Native messaging host registration writes both the new and legacy host names
  • Build output contains both wrapper script names:
    • mcp-chrome-server-host.sh / .bat
    • run_host.sh / .bat

The extension will try the new host name first and fall back to the legacy host name if needed.

Extension Integration Example

let nativePort = null;
let serverRunning = false;

function startServer() {
  if (nativePort) {
    console.log('Already connected to the native host');
    return;
  }

  try {
    nativePort = chrome.runtime.connectNative('com.mcpchromeserver.nativehost');

    nativePort.onMessage.addListener((message) => {
      console.log('Received native message:', message);

      if (message.type === 'started') {
        serverRunning = true;
        console.log(`Server started on port ${message.payload.port}`);
      } else if (message.type === 'stopped') {
        serverRunning = false;
        console.log('Server stopped');
      } else if (message.type === 'error') {
        console.error('Native host error:', message.payload.message);
      }
    });

    nativePort.onDisconnect.addListener(() => {
      console.log('Native host disconnected:', chrome.runtime.lastError);
      nativePort = null;
      serverRunning = false;
    });

    nativePort.postMessage({ type: 'start', payload: { port: 3000 } });
  } catch (error) {
    console.error('Failed to start native messaging:', error);
  }
}

function stopServer() {
  if (nativePort && serverRunning) {
    nativePort.postMessage({ type: 'stop' });
  }
}

async function testPing() {
  try {
    const response = await fetch('http://localhost:3000/ping');
    return await response.json();
  } catch (error) {
    console.error('Ping failed:', error);
    return null;
  }
}

Testing

npm run test

License

MIT