nekoro-browser-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NEKORO_PORT | No | Port for the nekoro-browser daemon to listen on. Set via NEKORO_PORT environment variable or --port flag. | 28417 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| box_ofC | box_of(".btn") → {x, y, w, h, visible, tag, text} |
| capture_screenshotC | capture_screenshot() → base64 PNG |
| click_at_xyC | click_at_xy(100, 200) — CDP 完整鼠标点击序列 (isTrusted:true) |
| click_indexC | click_index(3) — CDP 真实坐标点击 (isTrusted:true) |
| click_selectorC | click_selector(".btn") — CDP 真实坐标点击 (isTrusted:true) |
| click_textC | click_text("喜欢") — CDP 真实坐标点击 (isTrusted:true) |
| close_tabA | close_tab(123) — 关掉指定标签;tab 省略则关当前 attached tab。 走扩展 close_tab action(chrome.tabs.remove)。关掉活动标签后扩展会自动重连到 另一可用标签、经 attach 回调同步 active_tab_id。无标签可关 → ok:false。 |
| dialog_offB | dialog_off() — JS 层覆盖 window.alert/confirm/prompt 为自动关闭(需在触发前注入, 盖不住 beforeunload / 已开的原生对话框)。想要兜底防挂用扩展的 CDP 层处置(见 get_last_dialog)——那个 attach 后一直生效、覆盖 beforeunload。 |
| drain_eventsA | drain_events() → list — 拉取自上次 drain 后所有缓存的 CDP 事件。 每个事件为 {method, params, sessionId, tabId}(tabId 用于按标签过滤)。 |
| ensure_real_tabA | ensure_real_tab() — 当前 tab 是 chrome:// 等内部页时自动导航到 about:blank。 返回 {url, title}。 |
| fill_inputA | fill_input("#email", "a@b.com") — 框架感知填值。 走 scripting:原生 value setter 写值 + 派发 input/change,React/Vue 受控组件 能收到 onChange(type_text 的 Input.insertText 常绕不过框架 setter)。 非 input/textarea/contenteditable 或找不到元素 → ok:false,不伪造成功。 自定义组件要真实键入用 click_selector + type_text。 |
| find_textC | find_text("喜欢") → [{text, tag, match, w, h}] |
| get_cookiesD | get_cookies("https://example.com") |
| get_last_dialog | get_last_dialog() → {dialog} — 取最近一次被扩展自动处置的原生对话框,读后清。 attach 后扩展 Page.enable + 拦 Page.javascriptDialogOpening 立即处置(beforeunload 放行、alert/confirm/prompt 取消),防原生对话框冻结页面 JS 线程导致 evaluate 系 helper 挂死。dialog = {kind, message, url, defaultPrompt} 或 None(期间无对话框)。 仅事后观测,不能代答:需 confirm()===true 或特定 prompt 字符串的流程会被无条件取消。 |
| get_markdownC | get_markdown() → 页面内容转 Markdown |
| get_response_bodyD | get_response_body("1234.5") → CDP 网络响应体 |
| hoverD | hover(".menu") — CSS 选择器悬停 |
| hover_indexC | hover_index(3) — 悬停 state() 列表的第 N 个元素 |
| http_getC | http_get("https://example.com") → 纯 HTTP GET 返回 HTML 字符串。用于静态页/API。 |
| iframe_targetC | iframe_target("player") → 返回第一个 URL 含 url_substr 的 iframe targetId。 |
| jsA | js("document.title") — 在当前页面执行 JS,返回完成值。
先按裸表达式/脚本 eval( |
| list_site_actionsC | list_site_actions() → 已固化的站点函数 + 载入失败的文件。 |
| list_tabsB | list_tabs() → nekoro 托管组里的标签 [{tabId,url,title,active,attached}]。 |
| navigateB | navigate("https://example.com") — 默认等 readyState==='complete' 再返回。 wait=False 立即返回(Page.navigate 一发出就走)。loaded 标记是否等到加载完成。 |
| network_enableC | network_enable() — 启用 CDP 网络请求捕获 |
| new_tabA | new_tab("https://example.com") — 开新标签,加入 nekoro 托管组,切过去并 attach。
走扩展 navigate action:chrome.tabs.create + 分组 + waitTabLoad 等真实 load 事件,
尽量等到加载完(不像原来裸 Target.createTarget 直接返回、后续 wait 撞 about:blank
stale-complete 竞态);超时则 loaded=False。返回 {tabId, loaded},之后 helper 直接
作用于新标签。注意:load 等待上限由扩展内部硬编码(~10s), |
| page_htmlC | page_html() → 完整 HTML |
| page_infoC | page_info() → {title, url} |
| page_textA | page_text() → 可见文本 |
| press_keyA | press_key("Enter") / press_key("a") — 修饰键位: Alt=1 Ctrl=2 Meta=4 Shift=8。 特殊键(Enter/Tab/Arrow*/Backspace…)带 virtual key code,监听 e.keyCode/e.which/e.key 的页面(表单、老站)都能触发;单字符可打印键补发 char 事件(直接进 input,不走 insertText); Alt/Ctrl/Meta 修饰时不发 char(让 Ctrl+A 走快捷键而非打出字符 'a')。 移植 browser-harness press_key。 |
| reload_agent_helpersC | reload_agent_helpers() — 重新加载 agent_helpers.py,无需重启 daemon。 |
| reload_extensionC | reload_extension() — 强制重载扩展(自愈用) |
| scroll_into_viewC | scroll_into_view("#target") — 滚动到可见 |
| scroll_toC | scroll_to(0, 500) — 滚动页面视口到坐标 (window.scrollTo) |
| scroll_wheelC | scroll_wheel(0, 500) — CDP compositor 级 mouseWheel(能穿透 iframe/shadow DOM)。 fire-and-forget 修复后 CDP Input.dispatchMouseEvent 不再超时。 |
| set_cookieD | set_cookie("token", "abc", domain=".example.com") |
| sleepC | sleep(2) |
| stateD | state() → [{index, changed, tag, text, box}] — 索引元素树 |
| switch_tabC | switch_tab(123) — 把后续命令切到该标签(未 attach 则先 attach)。 |
| type_textD | type_text("hello") — CDP Input.insertText |
| upload_file | upload_file("input[type=file]", r"C:\a.png") — 给文件输入框设文件。 走 CDP DOM.setFileInputFiles(触发 change 事件,框架能收到);path 为绝对路径, 单个 str 或多个 list。文件不存在 / 找不到元素 / 元素非 file input → ok:false,不伪造成功。 注意:作用于当前 attached tab,nodeId 经 daemon.query_selector 解析。 |
| wait_for_loadC | wait_for_load(15) — poll document.readyState (无 listener 泄漏)。 |
| wait_for_network_idleA | wait_for_network_idle(0.5, 15) — 等待【当前活动标签】的 Network 请求静默 idle_time 秒。 只算 active_tab_id 的事件:其它 attached 标签(后台轮询/SSE 页)的 Network 事件也进全局 缓冲,不过滤会一直把 idle 窗口顶开、永不静默。 |
| wait_selectorC | wait_selector(".modal", "visible", 15) — 等待元素状态 |
| cdpB | Raw CDP command, e.g. method='Page.navigate', params={'url': 'https://example.com'}. |
| exec_pythonA | Escape hatch: run arbitrary Python in the daemon namespace (all helpers pre-bound, top-level await allowed). Use when no single tool fits — e.g. multi-step flows in one round trip. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/zeshuochen/nekoro-browser'
If you have feedback or need assistance with the MCP directory API, please join our Discord server