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.
The MCP server does not need global installation. You can run the server directly using your terminal and Node.js environment:
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.
To use MiraiLens with the Claude Desktop app, edit your local settings file:
{
"mcpServers": {
"mirailens": {
"command": "npx",
"args": ["-y", "mirailens@latest"]
}
}
}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.
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.