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

@iflow-mcp/alexanderhupfer-shopify-iframe-dev-mcp

v0.2.0

Published

MCP stdio server with a localhost browser bridge for Shopify embedded app debugging

Downloads

79

Readme

shopify-iframe-dev-mcp

shopify-iframe-dev-mcp.js is a single-file MCP server for inspecting and debugging a Shopify embedded app from an MCP client. It runs over stdio and exposes a localhost WebSocket bridge that a browser page can connect to.

The browser bridge client is embedded in shopify-iframe-dev-mcp.js as readable JavaScript source so the injected snippet remains inspectable.

What it does

  • Maintains browser sessions connected through the localhost bridge
  • Lets the MCP client choose the active browser session
  • Executes arbitrary JavaScript inside the connected iframe page
  • Returns a copy-paste browser-console snippet with the correct bridge port already embedded
  • Falls forward to the next free localhost port if the preferred bridge port is already taken

Requirements

  • Node.js 18 or newer
  • @modelcontextprotocol/sdk installed via npm install
  • A browser tab or iframe where you can paste the bridge snippet

Installation

npm install

Running the server

From the repository root:

npm start

The MCP transport is stdio. The browser bridge binds to 127.0.0.1.

Environment variables:

  • BRIDGE_PORT Default: 17373 Preferred starting port for the browser bridge.
  • BRIDGE_EVAL_TIMEOUT_MS Default: 10000 Timeout in milliseconds for bridge_eval.
  • BRIDGE_TOKEN Optional. Overrides the default randomly generated bridge token used to authenticate browser connections.

If BRIDGE_PORT is already in use, the server increments upward until it finds a free port.

MCP client configuration

Configure your MCP client to launch the server with:

node shopify-iframe-dev-mcp.js

If your client needs a structured command configuration, the equivalent shape is:

{
  "command": "node",
  "args": ["shopify-iframe-dev-mcp.js"]
}

If the MCP client supports package execution, you can also point it at the installed CLI binary name instead of the script path.

Exposed tools

  • bridge_status Returns bridge host, resolved port, requested port, auth mode, session count, and current active session.
  • bridge_browser_snippet Returns wsUrl plus a minified snippet value to paste directly into the browser console.
  • bridge_list_sessions Lists connected browser sessions and their metadata.
  • bridge_select_session Marks one connected session as the active target for evals.
  • bridge_eval Runs arbitrary JavaScript inside the selected browser session.

Typical flow

  1. Start the server.
  2. Call bridge_browser_snippet.
  3. Copy the returned snippet value exactly as-is.
  4. Paste it into the embedded app iframe browser console.
  5. Call bridge_list_sessions.
  6. Optionally call bridge_select_session.
  7. Call bridge_eval.

Example bridge_eval payload:

{
  "code": "return { title: document.title, url: location.href };",
  "timeoutMs": 5000
}

Health endpoint

The bridge also exposes a local HTTP health endpoint at:

http://127.0.0.1:<resolved-port>/health

It returns the resolved bridge host, resolved bridge port, requested bridge port, and current session state.

Security model

  • The browser bridge listens only on 127.0.0.1.
  • Browser connections must present a bridge token.
  • bridge_browser_snippet includes the correct token and resolved port automatically.
  • Anyone with access to that snippet can connect to the local bridge for the lifetime of the server process.
  • bridge_eval executes arbitrary JavaScript in the connected page context.

Notes

  • This is a development-only tool.
  • The bridge is local only and does not bypass browser same-origin restrictions outside the connected page context.