NPM REGISTRY

mirailens

Model Context Protocol (MCP) server package

The mirailens npm package is the core execution node of the MiraiLens system. It implements the Model Context Protocol (MCP) over standard I/O, allowing AI engines to submit structured browser control actions to your Chrome browser session via local loopback WebSockets.

$npx mirailens@latest
View on npmjs.com

Getting Started

Quick Start & Execution

The MCP server does not need global installation. You can run the server directly using your terminal and Node.js environment:

# Execute local server:
npx mirailens@latest

Once started, it will launch a local WebSocket server (typically on port 8080) and wait for the **MiraiLens Connector** Chrome extension to establish a connection.

MCP Client Configuration

Claude Desktop Configuration

To use MiraiLens with the Claude Desktop app, edit your local settings file:

Windows Settings Path:
%APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mirailens": {
      "command": "npx",
      "args": ["-y", "mirailens@latest"]
    }
  }
}

Exposed Interfaces

AI Protocol Tools

Once connected, the `mirailens` server exposes standard browser interaction tools to the AI agent:

navigate(url)

Navigates the active tab to a specific URL path.

click(selector)

Dispatches a click gesture to a matching element selector.

type(selector, text)

Enters keyboard input into target input/form fields.

screenshot()

Captures a PNG screenshot buffer of the active browser viewport.

Security Architecture

Sandboxed Local Execution

The `mirailens` package runs entirely inside your local system network namespace. It does not phone home, write configuration variables to remote databases, or upload logs to external servers. All automation requests are filtered and blocked unless the local Chrome browser extension matches active credentials.