Skip to main content
Glama

@businessmaps/bifrost

CI npm

MCP 服务器,允许 AI 工具调用在浏览器中运行的函数。

该守护进程位于任何 MCP 客户端和您的浏览器标签页之间。它一端通过 stdio 使用 JSON-RPC 通信,另一端通过 WebSocket 通信。您的浏览器应用连接并注册工具后,AI 即可调用它们。

快速开始

1. 添加到您的 AI 工具

Claude Code:

claude mcp add --transport stdio bifrost -- npx @businessmaps/bifrost --no-auth

Claude Desktop - 添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "bifrost": {
      "command": "npx",
      "args": ["@businessmaps/bifrost", "--no-auth"]
    }
  }
}

Cursor - 添加到 .cursor/mcp.json:

{
  "mcpServers": {
    "bifrost": {
      "command": "npx",
      "args": ["@businessmaps/bifrost", "--no-auth"]
    }
  }
}

无需安装。npx 会自动下载并运行该包。

2. 将客户端添加到您的浏览器应用

npm i @businessmaps/bifrost-browser

或通过 CDN:

<script src="https://unpkg.com/@businessmaps/bifrost-browser"></script>

包含 TypeScript 类型定义。

3. 注册工具

import { BifrostBrowser } from "@businessmaps/bifrost-browser";

const bridge = new BifrostBrowser({ port: 3099 });

bridge.registerTools([
  {
    name: "get_page_title",
    description: "Returns the page title",
    inputSchema: { type: "object", properties: {} },
    handler: async () => document.title,
  },
  {
    name: "get_selection",
    description: "Returns the user's current text selection",
    inputSchema: { type: "object", properties: {} },
    handler: async () => window.getSelection().toString(),
  },
]);

bridge.connect();

就是这样。现在 AI 可以在您的浏览器标签页中调用 get_page_titleget_selection 了。处理程序可以完全访问 DOM、Canvas、IndexedDB、剪贴板、fetch 等。

Related MCP server: @teatak/mcp-server-browser

认证

默认情况下,守护进程在启动时会生成一个随机令牌。获取方式有两种:

  • 终端模式 - 守护进程启动时令牌会打印在屏幕上

  • MCP 模式 - AI 调用内置的 bifrost_connection_info 工具获取令牌,然后告诉您将其粘贴到应用中

将令牌传递给客户端:

const bridge = new BifrostBrowser({ port: 3099, token: "TOKEN" });

在本地开发期间,可以使用 --no-auth 完全跳过认证。

多标签页

每个标签页都会注册自己的工具。调用会路由到拥有该工具的标签页。断开标签页连接会移除其工具。

选项

--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/bifrost.git && cd bifrost
npm install
npm test

架构 · 客户端 API · 贡献指南

许可证

Apache 2.0

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    An MCP server that provides AI models with full browser automation capabilities through Chrome. It enables navigation, interaction, screenshots, and complete DevTools access by bridging AI clients with a companion Chrome extension.
    99
    16
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that runs in the browser, letting web pages register custom tools and prompts and expose them to an MCP client over WebSocket. Enables agents to drive UI, call page-scoped APIs, and get human-in-the-loop confirmation.
    15
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Turns your Chrome browser into an MCP server, allowing AI clients to control browser actions like clicking, typing, navigating, and data extraction through custom JavaScript tools.
    29
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables websites to expose JavaScript functions as MCP tools, allowing AI agents to interact with the browser environment via a protocol and Chrome extension.
    1,094
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Business-Maps/bifrost'

If you have feedback or need assistance with the MCP directory API, please join our Discord server