MCP server that lets AI tools call functions running in your browser.
The daemon sits between any MCP client and your browser tab. It speaks JSON-RPC over stdio on one side and WebSocket on the other. Your browser app connects, registers tools, and the AI can call them.
Requirements: Node.js 18+ · ws (installed automatically)
npm i -g @businessmaps/bifrostThen register it with your MCP client. For example:
claude mcp add --transport stdio bifrost -- bifrost --no-authNote: The
--no-authflag is currently recommended because there is an unresolved issue with token authentication when MCP clients launch the daemon. Without it the client has no way to read the token printed to stderr.
The MCP client starts the daemon automatically.
Install the client library in your browser app:
npm i @businessmaps/bifrost-browserOr use a CDN:
<script src="https://unpkg.com/@businessmaps/bifrost-browser"></script>TypeScript types are included out of the box — no @types package needed.
Then register your tools:
import { BifrostBrowser } from "@businessmaps/bifrost-browser";
const bridge = new BifrostBrowser({
port: 3099,
token: "TOKEN", // printed to stderr when daemon starts
});
bridge.registerTools([
{
name: "get_selection",
description: "Returns the user's text selection",
inputSchema: { type: "object", properties: {} },
handler: async () => window.getSelection().toString(),
},
]);
bridge.connect();Handlers run in the browser -- full access to DOM, Canvas, IndexedDB, Clipboard, fetch, etc.
There's a working live demo with five sample tools you can try right away.
The daemon generates a token on startup and prints it to stderr. Pass it to the client — the token is sent via the Sec-WebSocket-Protocol header during the WebSocket handshake. Skip with --no-auth during local dev.
Each tab registers its own tools. Calls route to whoever owns the tool. Disconnecting a tab removes its tools.
--port <port> WebSocket port (default: 3099)
--timeout <secs> Tool call timeout (default: 120)
--no-auth Disable token auth (dev only)
--help, -h Show this message
--version, -v Show version
git clone https://github.com/Business-Maps/mcp.git && cd mcp
npm install
npm testArchitecture · Client API · Contributing
Apache 2.0