About Shopify Iframe Dev MCP
Shopify Iframe Dev MCP is an MCP server in the Commerce category.
Install
git clone https://github.com/alexanderhupfer/shopify-iframe-dev-mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Shopify Iframe Dev MCP
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
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/sdkinstalled vianpm 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_PORTDefault:17373Preferred starting port for the browser bridge.BRIDGE_EVAL_TIMEOUT_MSDefault:10000Timeout in milliseconds forbridge_eval.BRIDGE_TOKENOptional. 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_statusReturns bridge host, resolved port, requested port, auth mode, session count, and current active session.bridge_browser_snippetReturnswsUrlplus a minifiedsnippetvalue to paste directly into the browser console.bridge_list_sessionsLists connected browser sessions and their metadata.bridge_select_sessionMarks one connected session as the active target for evals.bridge_evalRuns arbitrary JavaScript inside the selected browser session.
Typical flow
- Start the server.
- Call
bridge_browser_snippet. - Copy the returned
snippetvalue exactly as-is. - Paste it into the embedded app iframe browser console.
- Call
bridge_list_sessions. - Optionally call
bridge_select_session. - 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_snippetincludes 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_evalexecutes 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.
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.