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

webpage-mcp

v0.7.1

Published

Webpage MCP server

Readme

webpage-mcp (MCP Server Package)

CI npm license

webpage-mcp is the Node.js MCP server package used by the Webpage MCP project.

It provides:

  • webpage-mcp: CLI for registration, diagnostics, and maintenance
  • webpage-mcp-stdio: MCP stdio server entry used by MCP clients

This package uses:

  • MCP Client <-> MCP Server: stdio
  • Webpage MCP Connector (Chrome extension) <-> MCP Server: Chrome Native Messaging
  • Internal bridge: local IPC socket / pipe

No localhost HTTP server or port is required.

Requirements

  • Node.js >= 20
  • Chrome/Chromium with the Webpage MCP Connector extension installed

Quick Start (npm users)

  1. Install the Webpage MCP Connector Chrome extension (release zip or unpacked build).
  2. Configure MCP client:
{
  "mcpServers": {
    "webpage-mcp": {
      "command": "npx",
      "args": ["-y", "-p", "webpage-mcp@latest", "webpage-mcp-stdio"]
    }
  }
}
  1. Start MCP client (with Chrome open and extension enabled).

webpage-mcp-stdio will silently bootstrap Native Messaging on startup (manifest/runtime check + user-level auto-register when needed).

  1. If connection still fails, run fallback recovery:
npx -y webpage-mcp@latest register --browser chrome --force --extension-id <your_extension_id>
npx -y webpage-mcp@latest doctor --fix

Recommended: copy the register command from extension popup/welcome page, because it already includes the current extension ID.

Is Register One-Time?

Usually yes. In many cases you do not need manual register because startup bootstrap handles it.

If manual register is used, re-register only when one of these changes:

  • extension ID
  • host install path
  • Chrome profile/manifest files reset

Normal restarts (OS / Chrome / MCP client) do not require re-registering.

CLI Commands

webpage-mcp register [--browser chrome|chromium|all] [--detect] [--system] [--extension-id <id1,id2>] [--force]
webpage-mcp doctor [--fix] [--json] [--browser chrome|chromium|all]
webpage-mcp report [--json] [--output <file>] [--copy] [--no-redact] [--include-logs none|tail|full] [--log-lines <n>] [--browser chrome|chromium|all]
webpage-mcp fix-permissions

Notes:

  • register --force is kept for compatibility; registration is idempotent.
  • register --system requires admin/sudo privileges.
  • report is intended for issue submission and troubleshooting.

Local Development (this monorepo)

Build package:

pnpm --filter webpage-mcp build

Verify local build health:

node app/mcp-server/dist/cli.js doctor

webpage-mcp-stdio started from local build also performs silent bootstrap. Only run manual register if connection still fails:

node app/mcp-server/dist/cli.js register --detect
# or
node app/mcp-server/dist/cli.js register --browser chrome --extension-id <your_extension_id>

Use local stdio entry in MCP client config:

{
  "mcpServers": {
    "webpage-mcp-local": {
      "command": "node",
      "args": [
        "/absolute/path/to/webpage-mcp/app/mcp-server/dist/mcp/mcp-server-stdio.js"
      ]
    }
  }
}

Environment Variables

  • WEBPAGE_MCP_NATIVE_SOCKET
    • Explicit IPC socket/pipe path for both native host and stdio bridge.
  • WEBPAGE_MCP_NATIVE_SOCKET_DIR
    • Unix only. Custom directory for default socket file.
  • WEBPAGE_MCP_STDIO_CONNECT_TIMEOUT_MS
    • Max wait time (ms) for stdio bridge to connect to native socket.
  • WEBPAGE_MCP_STDIO_CONNECT_RETRY_INTERVAL_MS
    • Retry interval (ms) for stdio bridge connection.
  • WEBPAGE_MCP_EXTENSION_ID / WEBPAGE_MCP_EXTENSION_IDS
    • Override/add allowed extension IDs during registration.
  • WEBPAGE_MCP_ALLOWED_ORIGINS
    • Additional allowed Chrome extension origins (comma or whitespace separated).
  • WEBPAGE_MCP_AUTH_TOKEN
    • Optional token exposed to extension via auth_get_token (for UI display/copy and downstream use).

Optional Auth Token

Set an auth token if you want the extension to read it from the native host:

export WEBPAGE_MCP_AUTH_TOKEN="your-token"

Current behavior:

  • Token is returned by native host auth_get_token.
  • Token is not currently enforced as an auth check for MCP tool calls.

Troubleshooting

If you see ENOENT / "Unable to connect to native bridge socket":

  1. Confirm extension is enabled and connected.
  2. Re-run registration with current extension ID:
npx -y webpage-mcp@latest register --browser chrome --force --extension-id <your_extension_id>
  1. Run:
npx -y webpage-mcp@latest doctor --fix
  1. Fully restart Chrome and retry.

Related Docs