TgeBrowser MCP Operations
Use MCP tools to operate TgeBrowser environments, groups, proxies, and browser automation via the mcptgebrowser* tools.
When to Use This Skill
Apply when the user:
- - Asks to create, update, delete, or list TgeBrowser environments
- Mentions opening or closing browsers/profiles, fingerprint, UA, or proxy
- Wants to manage groups, proxies, or check API status
- Needs browser automation (navigate, click, fill forms, screenshot, etc.)
- Refers to TgeBrowser or tgebrowser operations
Ensure TgeBrowser is running (default port 50326). The MCP server connects to the TgeBrowser Local API.
Smart Defaults & Best Practices
When creating browsers:
- - Always use
{"protocol": "direct"} for proxy if user doesn't specify one - Default fingerprint OS to
"Windows" if not specified - Set
webrtc: "disabled" by default for better privacy - Use
clearCacheOnStart: true for clean sessions
When opening browsers:
- - Use
args: ["--headless"] for automation tasks unless user needs to see the browser - Let the system auto-assign port unless user specifies one
When automating:
- - Always call
mcp__tgebrowser__open-browser first and extract the ws URL from response - Then call
mcp__tgebrowser__connect-browser-with-ws with that ws URL - After connection, you can use navigation and interaction tools
Error handling:
- - If browser open fails, check if TgeBrowser app is running via INLINECODE8
- If envId not found, list browsers first with INLINECODE9
- Before deleting cache, always close the browser first
Common Workflows
Quick Start: Create and Use a Browser
- 1. Create:
mcp__tgebrowser__create-browser with minimal params (name + proxy) - Open:
mcp__tgebrowser__open-browser with returned envId - Connect:
mcp__tgebrowser__connect-browser-with-ws with ws URL from step 2 - Automate: Use navigation/interaction tools
- Close:
mcp__tgebrowser__close-browser when done
Find and Open Existing Browser
- 1. List:
mcp__tgebrowser__get-browser-list with keyword if needed - Open: Use envId from list
- Connect and automate
Batch Operations
- - Use
mcp__tgebrowser__get-browser-list to get all browsers - Iterate through list for batch operations
- Use
mcp__tgebrowser__close-all-profiles to close all at once
Essential MCP Tools
Browser Lifecycle (Most Common)
Create a browser:
CODEBLOCK0
Open a browser:
CODEBLOCK1
Connect for automation:
CODEBLOCK2
Close a browser:
CODEBLOCK3
Browser Management
List browsers:
CODEBLOCK4
Update browser:
CODEBLOCK5
Delete browser:
CODEBLOCK6
Get opened browsers:
CODEBLOCK7
Browser Automation (After Connection)
Navigate:
CODEBLOCK8
Take screenshot:
CODEBLOCK9
Get page content:
CODEBLOCK10
Interact with elements:
CODEBLOCK11
Execute JavaScript:
CODEBLOCK12
Utility Tools
Get cookies:
CODEBLOCK13
Get User-Agent:
CODEBLOCK14
Generate new fingerprint:
CODEBLOCK15
Clear cache:
CODEBLOCK16
Close all browsers:
CODEBLOCK17
Check system status:
CODEBLOCK18
Groups & Proxies
List groups:
CODEBLOCK19
List proxies:
CODEBLOCK20
Intelligent Automation Guide
Auto-detect and Handle Common Scenarios
Scenario 1: User wants to automate a website
- 1. Check if any browser is open: INLINECODE17
- If none, create one with smart defaults: INLINECODE18
- Open it with headless mode: INLINECODE19
- Connect using ws URL from response
- Navigate and automate
Scenario 2: User mentions a website but no browser specified
- - Automatically create a temporary browser with optimal settings
- Use descriptive name like "Temp-{website_domain}"
- Clean up after task completion
Scenario 3: User wants to "open browser" without details
- - List existing browsers first
- If found, use the most recently created one
- If none exist, create one with defaults
- Always prefer reusing existing browsers over creating new ones
Scenario 4: Automation fails
- - Check connection status first
- Verify browser is still open: INLINECODE20
- If closed, reopen and reconnect automatically
- Retry the failed operation once
Scenario 5: User wants to "close everything"
- - Use
mcp__tgebrowser__close-all-profiles - one command closes all
Smart Parameter Inference
When envId is missing:
- - List browsers and use the first/only one if count = 1
- If multiple, ask user or use most recent
When proxy is not specified:
- - Always default to
{"protocol": "direct"} (no proxy) - Never leave proxy undefined
When fingerprint is not specified:
- - Use safe defaults: INLINECODE23
When selector fails:
- - Try common alternatives (id, class, name, xpath)
- Wait a few seconds and retry
- Get page HTML to help debug
When screenshot path not specified:
- - Auto-generate: INLINECODE24
- Create directory if needed
Proactive Error Prevention
Before opening browser:
- - Verify TgeBrowser is running: INLINECODE25
- If not running, inform user to start TgeBrowser app
Before deleting/clearing cache:
- - Check if browser is open: INLINECODE26
- If open, close it first automatically
Before creating browser:
- - Validate proxy format if provided
- Ensure browserName is not empty
- Check if name already exists (list first)
Before automation:
- - Ensure browser is connected
- Verify page is loaded (check URL or title)
- Wait for elements before interacting
Batch Operations Intelligence
When user wants to operate on multiple browsers:
- 1. Get full list: INLINECODE27
- Filter by keyword if user mentioned specific criteria
- Process in parallel when possible (open, close, update)
- Report progress and errors clearly
When user wants to clean up:
- 1. Close all: INLINECODE28
- List all: INLINECODE29
- Delete unwanted ones based on criteria (name pattern, age, etc.)
Context Awareness
Remember across operations:
- - Last opened browser envId
- Last used ws URL
- Current page URL after navigation
- Recently created browsers
Infer user intent:
- - "Open browser" → open existing or create new
- "Go to website" → navigate if connected, or open→connect→navigate
- "Click button" → find best selector automatically
- "Get data" → extract visible text or specific elements
- "Take screenshot" → full page by default
- "Close" → close current browser or all if multiple mentioned
All parameter names are camelCase in JSON objects passed to MCP tools.
Environment Management
See references/environment-management.md for mcptgebrowseropen-browser, mcptgebrowserclose-browser, mcptgebrowsercreate-browser, mcptgebrowserupdate-browser, mcptgebrowserdelete-browser, mcptgebrowserget-browser-list, mcptgebrowserget-opened-browser, mcptgebrowserget-profile-cookies, mcptgebrowserget-profile-ua, mcptgebrowserclose-all-profiles, mcptgebrowsernew-fingerprint, mcptgebrowserdelete-cache, mcptgebrowserget-browser-active and their parameters.
Group Management
See references/group.md for mcptgebrowserget-group-list parameters.
System
See references/system.md for mcptgebrowsercheck-status parameters.
Proxy Management
See references/proxy.md for mcptgebrowserget-proxy-list parameters.
Proxy Config (proxy field for create-browser / update-browser)
See references/proxy-config.md for all fields (protocol, host, port, username, password, etc.) and example.
Fingerprint Config (fingerprint field for create-browser / update-browser)
See references/fingerprint.md for all fields (os, kernel, timezone, language, webrtc, TLS, etc.) and example.
Browser Automation
Browser automation tools (navigate, click-element, fill-input, screenshot, etc.) are fully supported via MCP. These tools require an active browser connection established via mcptgebrowseropen-browser or mcptgebrowserconnect-browser-with-ws.
Deep-Dive Documentation
Reference docs with full enum values and field lists:
| Reference | Description | When to use |
|---|
| references/environment-management.md | open-browser, close-browser, create-browser, update-browser, delete-browser, get-browser-list, get-opened-browser, get-profile-cookies, get-profile-ua, close-all-profiles, new-fingerprint, delete-cache, get-browser-active parameters. | Any browser environment operation (open, create, update, delete, list, cookies, UA, cache, status). |
| references/group.md |
get-group-list parameters. | Listing browser groups. |
|
references/system.md |
check-status parameters. | Checking API availability. |
|
references/proxy.md |
get-proxy-list parameters. | Listing proxies. |
|
references/proxy-config.md | Full
proxy field list (protocol, host, port, username, password, etc.) and example. | Building proxy config for create-browser / update-browser. |
|
references/fingerprint.md |
fingerprint field list (os, kernel, timezone, language, webrtc, canvas, TLS, etc.) and example. | Building or editing fingerprint config for create-browser / update-browser. |
|
references/kernel-config.md | Supported
kernel version values for
fingerprint.kernel. | Pinning a specific Chrome version when creating or updating a browser. |
|
references/ua-version.md |
uasystem_version enum for
fingerprint.random_ua: specific OS versions, generic “any version” per system, and omit behavior. | Constraining or randomizing UA by OS (e.g. Android only, or “any macOS version”) when creating or updating a browser. |
Use these when you need the exact allowed values or semantics; the main skill text above only summarizes.
TgeBrowser MCP 操作
通过 mcptgebrowser* 工具使用 MCP 工具操作 TgeBrowser 环境、分组、代理和浏览器自动化。
何时使用此技能
当用户出现以下情况时应用:
- - 要求创建、更新、删除或列出 TgeBrowser 环境
- 提及打开或关闭浏览器/配置文件、指纹、UA 或代理
- 想要管理分组、代理或检查 API 状态
- 需要浏览器自动化(导航、点击、填写表单、截图等)
- 提及 TgeBrowser 或 tgebrowser 操作
确保 TgeBrowser 正在运行(默认端口 50326)。MCP 服务器连接到 TgeBrowser 本地 API。
智能默认值及最佳实践
创建浏览器时:
- - 如果用户未指定代理,始终使用 {protocol: direct}
- 如果未指定,默认指纹操作系统为 Windows
- 默认设置 webrtc: disabled 以获得更好的隐私保护
- 使用 clearCacheOnStart: true 确保会话干净
打开浏览器时:
- - 除非用户需要看到浏览器,否则自动化任务使用 args: [--headless]
- 除非用户指定端口,否则让系统自动分配端口
自动化时:
- - 始终先调用 mcptgebrowseropen-browser 并从响应中提取 ws URL
- 然后使用该 ws URL 调用 mcptgebrowserconnect-browser-with-ws
- 连接后,即可使用导航和交互工具
错误处理:
- - 如果浏览器打开失败,通过 mcptgebrowsercheck-status 检查 TgeBrowser 应用是否正在运行
- 如果找不到 envId,先使用 mcptgebrowserget-browser-list 列出浏览器
- 删除缓存前,始终先关闭浏览器
常见工作流程
快速开始:创建并使用浏览器
- 1. 创建:使用最少参数(名称 + 代理)调用 mcptgebrowsercreate-browser
- 打开:使用返回的 envId 调用 mcptgebrowseropen-browser
- 连接:使用步骤 2 中的 ws URL 调用 mcptgebrowserconnect-browser-with-ws
- 自动化:使用导航/交互工具
- 关闭:完成后调用 mcptgebrowserclose-browser
查找并打开现有浏览器
- 1. 列出:如需关键词搜索,使用 mcptgebrowserget-browser-list
- 打开:使用列表中的 envId
- 连接并自动化
批量操作
- - 使用 mcptgebrowserget-browser-list 获取所有浏览器
- 遍历列表进行批量操作
- 使用 mcptgebrowserclose-all-profiles 一次性关闭所有浏览器
核心 MCP 工具
浏览器生命周期(最常用)
创建浏览器:
mcptgebrowsercreate-browser
必需:{browserName: MyBrowser, proxy: {protocol: direct}}
应用智能默认值:Windows 操作系统、禁用 WebRTC、启动时清除缓存
打开浏览器:
mcptgebrowseropen-browser
必需:{envId: 123} 或 {userIndex: 1}
返回:用于自动化的 ws URL - 请保存此 URL!
连接以进行自动化:
mcptgebrowserconnect-browser-with-ws
必需:{wsUrl: ws://127.0.0.1:xxxxx/devtools/browser/...}
使用 open-browser 响应中的 ws URL
关闭浏览器:
mcptgebrowserclose-browser
必需:{envId: 123} 或 {userIndex: 1}
浏览器管理
列出浏览器:
mcptgebrowserget-browser-list
可选:{keyword: 搜索词, pageSize: 50}
当不知道 envId 时,使用此工具查找
更新浏览器:
mcptgebrowserupdate-browser
必需:{envId: 123, browserName: NewName}
可选:proxy、fingerprint、groupId、remark
删除浏览器:
mcptgebrowserdelete-browser
必需:{envId: 123} 或 {userIndex: 1}
如果浏览器已打开,请先关闭
获取已打开的浏览器:
mcptgebrowserget-opened-browser
无需参数
返回当前正在运行的浏览器列表
浏览器自动化(连接后)
导航:
mcptgebrowsernavigate
必需:{url: https://example.com}
截图:
mcptgebrowserscreenshot
可选:{savePath: ./screenshot.png, isFullPage: true}
默认为整页截图
获取页面内容:
mcptgebrowserget-page-visible-text - 获取可读文本
mcptgebrowserget-page-html - 获取完整 HTML
无需参数
与元素交互:
mcptgebrowserclick-element {selector: #button}
mcptgebrowserfill-input {selector: #email, text: user@example.com}
mcptgebrowserselect-option {selector: #country, value: US}
mcptgebrowserhover-element {selector: .menu}
mcptgebrowserscroll-element {selector: #footer}
mcptgebrowserpress-key {key: Enter}
执行 JavaScript:
mcptgebrowserevaluate-script
必需:{script: return document.title}
返回脚本执行结果
实用工具
获取 Cookie:
mcptgebrowserget-profile-cookies
必需:{envId: 123}
获取 User-Agent:
mcptgebrowserget-profile-ua
必需:{envId: 123}
生成新指纹:
mcptgebrowsernew-fingerprint
必需:{envId: 123}
浏览器必须处于关闭状态
清除缓存:
mcptgebrowserdelete-cache
必需:{envId: 123}
浏览器必须处于关闭状态
关闭所有浏览器:
mcptgebrowserclose-all-profiles
无需参数
紧急停止所有浏览器
检查系统状态:
mcptgebrowsercheck-status
无需参数
验证 TgeBrowser 应用是否正在运行
分组与代理
列出分组:
mcptgebrowserget-group-list
可选:{pageSize: 50}
列出代理:
mcptgebrowserget-proxy-list
可选:{pageSize: 50}
智能自动化指南
自动检测并处理常见场景
场景 1:用户想要自动化操作某个网站
- 1. 检查是否有浏览器已打开:mcptgebrowserget-opened-browser
- 如果没有,使用智能默认值创建一个:{browserName: Auto-Browser, proxy: {protocol: direct}, fingerprint: {os: Windows, webrtc: disabled}}
- 使用无头模式打开:{envId: <返回的ID>, args: [--headless]}
- 使用响应中的 ws URL 进行连接
- 导航并自动化
场景 2:用户提到某个网站但未指定浏览器
- - 自动使用最佳设置创建一个临时浏览器
- 使用描述性名称,如 Temp-{网站域名}
- 任务完成后进行清理
场景 3:用户想要打开浏览器但未提供详细信息
- - 先列出已有浏览器
- 如果找到,使用最近创建的那个
- 如果没有,使用默认值创建一个
- 始终优先重用现有浏览器而非创建新浏览器
场景 4:自动化失败
- - 首先检查连接状态
- 验证浏览器是否仍处于打开状态:mcptgebrowserget-opened-browser
- 如果已关闭,自动重新打开并重新连接
- 重试失败的操作一次
场景 5:用户想要关闭所有
- - 使用 mcptgebrowserclose-all-profiles - 一条命令关闭所有
智能参数推断
当缺少 envId 时:
- - 列出浏览器,如果数量为 1,则使用第一个/唯一的一个
- 如果有多个,询问用户或使用最近的一个
当未指定代理时:
- - 始终默认使用 {protocol: direct}(无代理)
- 绝不让代理未定义
当未指定指纹时: