Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoHost interface to bind (default 127.0.0.1).127.0.0.1
PORTNoPort number for the HTTP transport (default 3210).3210
TOKENNoSecret token required for authentication when deploying publicly.
TRANSPORTNoMCP transport mode: 'http' for Streamable HTTP, 'stdio' for stdio.stdio
ADMIN_PASSWORDNoPassword for the admin console; enables group mode.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_guideA

返回 web-bridge-mcp 的完整使用指南(SKILL.md 全文,含标准工作流、eval_js 写法、预置函数、排错表与踩坑经验)。首次使用本 MCP 的工具前建议先调用它;指南文件更新后无需重启,再次调用即读到最新版。

list_pagesA

列出当前通过 client.js 连接到 web-bridge-mcp 的所有浏览器页面(pageId、标题、URL、连接时间)。

eval_jsA

在指定页面(pageId 省略且只连了一页时自动选中)执行任意 JavaScript 并返回序列化结果。支持 await 与多语句;最后一句表达式会被自动 return,也可显式 return。预置 $ / $$(普通查询)、$deep / $$deep(穿 shadow DOM 深度查询)、$import(页面路径动态 import)、$wait(轮询等条件,函数或选择器字符串,第二参为超时 ms)、$frame(同源 iframe 查询辅助,返回 {$,$$,$deep,$$deep,document,window})、$rect(元素几何+可见性)、$css(批量写样式)。

get_consoleA

读取页面最近的 console 输出与未捕获异常(client.js 会自动捕获上报)。limit 为返回条数(默认 50);传 since(毫秒时间戳)则只返回该时间之后的日志(增量拉取),返回末尾会附上最新一条的 ts,可作为下次调用的 since 继续拉取,用于区分修改代码前后的日志。

clickA

通过 CSS 选择器找到元素并触发 click()(会先 scrollIntoView)。找不到元素时返回错误。

typeA

通过 CSS 选择器找到输入元素,聚焦并写入文本,随后派发 input / change 事件(兼容 contenteditable)。

get_textA

读取匹配 CSS 选择器元素的 innerText;selector 省略时读取整个 body。

wait_forA

在页面上轮询等待条件成立后再返回,避免 SPA 异步渲染导致「元素还没出来就操作」。两种条件二选一:selector(元素出现;absent=true 时改为等待其消失)或 code(返回真值的 JS 表达式,支持 await)。超时仍未满足则报错。轮询间隔 200ms。

hoverA

通过 CSS 选择器找到元素并派发 mouseover / mouseenter(可触发菜单、tooltip 等悬停行为),会先 scrollIntoView。

focusA

通过 CSS 选择器找到元素并聚焦(focus + focusin),适合输入前把焦点放到指定输入框。

scroll_toA

通过 CSS 选择器找到元素并滚动到可视区域中央(scrollIntoView),返回滚动后的位置信息。

get_dom_snapshotA

对指定元素的子树生成「虚拟截图」:每个可见节点一行,含几何(rect)、关键 computed style(颜色/背景/字号/边框/圆角/阴影/透明度/z-index/溢出)、文本,穿 shadow DOM。纯文本、无需任何授权,是验证颜色、布局、定位的首选;需要真实渲染像素(canvas 内容、图片、遮挡观感)时再用 get_screenshot。

get_screenshotA

通过浏览器屏幕捕获(getDisplayMedia)截取真实渲染像素并返回图片。首次调用会在用户浏览器弹出原生授权框(预选当前标签页),用户授权一次后本次页面生命周期内免打扰;页面刷新后需重新授权。传 selector 时按该元素矩形裁剪(深度查询,穿 shadow DOM)。验证颜色/布局/定位请优先用 get_dom_snapshot(文本、免授权、精确到值);本工具用于需要真实像素的场景(canvas、图片、遮挡观感)。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/kirakiray/web-bridge-mcp'

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