A
securityF
licenseA
qualityEnables browser automation using Python scripts, offering operations like taking webpage screenshots, retrieving HTML content, and executing JavaScript.
Last updated -
4
18
Python
由 Playwright 提供支持的模型上下文协议 (MCP) 的高级 Web 浏览服务器,通过灵活、安全的 API 实现无头浏览器交互。
添加到您的claude_desktop_config.json
:
browse_to()
方法中的超时时间所有重要事件均记录详细信息,以便于调试。
browse_to(url: str, context: Optional[Any] = None)
url
:要导航到的网站context
:可选上下文对象(当前未使用)extract_text_content(selector: Optional[str] = None, context: Optional[Any] = None)
selector
:可选的 CSS 选择器,用于提取特定内容context
:可选上下文对象(当前未使用)click_element(selector: str, context: Optional[Any] = None)
selector
:要点击的元素的 CSS 选择器context
:可选上下文对象(当前未使用)get_page_screenshots(full_page: bool = False, selector: Optional[str] = None, context: Optional[Any] = None)
full_page
:捕获整个页面截图selector
:屏幕截图的可选元素context
:可选上下文对象(当前未使用)get_page_links(filter_pattern: Optional[str] = None, context: Optional[Any] = None)
filter_pattern
:用于过滤链接的可选文本模式context
:可选上下文对象(当前未使用)input_text(selector: str, text: str, context: Optional[Any] = None)
selector
:输入元素的 CSS 选择器text
:要输入的文本context
:可选上下文对象(当前未使用)create_new_tab(url: Optional[str] = None, context: Optional[Any] = None)
url
:在新标签页中导航到的可选 URLcontext
:可选上下文对象(当前未使用)switch_tab(tab_id: str, context: Optional[Any] = None)
tab_id
:要切换到的选项卡的 IDcontext
:可选上下文对象(当前未使用)list_tabs(context: Optional[Any] = None)
context
:可选上下文对象(当前未使用)close_tab(tab_id: Optional[str] = None, context: Optional[Any] = None)
tab_id
:要关闭的选项卡的可选 ID(默认为当前选项卡)context
:可选上下文对象(当前未使用)refresh_page(context: Optional[Any] = None)
context
:可选上下文对象(当前未使用)get_page_info(context: Optional[Any] = None)
context
:可选上下文对象(当前未使用)scroll_page(direction: str = "down", amount: str = "page", context: Optional[Any] = None)
direction
:滚动方向(‘向上’,‘向下’,‘向左’,‘向右’)amount
:滚动量(‘页’、‘一半’或数字)context
:可选上下文对象(当前未使用)wait_for_navigation(timeout_ms: int = 10000, context: Optional[Any] = None)
timeout_ms
:等待的最长时间(以毫秒为单位)context
:可选上下文对象(当前未使用)execute_javascript(script: str, context: Optional[Any] = None)
script
:要执行的 JavaScript 代码context
:可选上下文对象(当前未使用)欢迎贡献代码!欢迎提交 Pull 请求。
MIT 许可证
如有问题或疑问,请在 GitHub 上打开问题。
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
先进的网络浏览服务器通过安全的 API 实现无头浏览器交互,提供导航、内容提取、元素交互和屏幕截图等功能。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/random-robbie/mcp-web-browser'
If you have feedback or need assistance with the MCP directory API, please join our Discord server