create-browser
Create a browser profile with custom fingerprints, proxy settings, and configuration for automated testing or multi-account management.
Instructions
Create a browser
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainName | No | The domain name of the browser, eg: facebook.com | |
| openUrls | No | The open urls of the browser, eg: ["https://www.google.com"] | |
| cookie | No | The cookie of the browser, eg: "[{"domain":".baidu.com","expirationDate":"","name":"","path":"/","sameSite":"unspecified","secure":true,"value":"","id":1}]" | |
| username | No | The username of the browser, eg: "user" | |
| password | No | The password of the browser, eg: "password" | |
| groupId | Yes | The group id of the browser, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list or create a new group, or default is 0 | |
| name | No | The name of the browser, eg: "My Browser" | |
| country | No | The country of the browser, eg: "CN" | |
| sysAppCateId | No | The sys app cate id of the browser, you can use the get-application-list tool to get the application list | |
| userProxyConfig | Yes | The user proxy config of the browser | |
| fingerprintConfig | No | The fingerprint config of the browser, default is automatic_timezone: 0, timezone: "", language: [], flash: "", fonts: [], webrtc: disabled, browser_kernel_config: ua_auto, random_ua: ua_version: [], ua_system_version: [], tls_switch: 0, tls: "" | |
| storageStrategy | No | The storage strategy of the browser, default is 0 |
Implementation Reference
- src/handlers/browser.ts:56-64 (handler)The core handler function for the 'create-browser' tool. It constructs a request body using buildRequestBody and sends a POST request to the CREATE_BROWSER API endpoint. On success, it returns a formatted success message with the created browser details; otherwise, throws an error.async createBrowser(params: CreateBrowserParams) { const requestBody = buildRequestBody(params); const response = await axios.post(`${LOCAL_API_BASE}${API_ENDPOINTS.CREATE_BROWSER}`, requestBody); if (response.data.code === 0) { return `Browser created successfully with: ${Object.entries(response.data.data).map(([key, value]) => `${key}: ${value}`).join('\n')}`; } throw new Error(`Failed to create browser: ${response.data.msg}`); },
- src/utils/toolRegister.ts:17-18 (registration)Registers the 'create-browser' tool with the MCP server, using the createBrowserSchema for input validation and wrapping the browserHandlers.createBrowser function as the handler.server.tool('create-browser', 'Create a browser', schemas.createBrowserSchema.shape, wrapHandler(browserHandlers.createBrowser));
- src/types/schemas.ts:66-82 (schema)Zod schema defining the input parameters for the 'create-browser' tool, including fields like domainName, openUrls, cookie, groupId (required numeric string), proxy and fingerprint configs.createBrowserSchema: z.object({ domainName: z.string().optional().describe('The domain name of the browser, eg: facebook.com'), openUrls: z.array(z.string()).optional().describe('The open urls of the browser, eg: ["https://www.google.com"]'), cookie: z.string().optional().describe('The cookie of the browser, eg: "[{\"domain\":\".baidu.com\",\"expirationDate\":\"\",\"name\":\"\",\"path\":\"/\",\"sameSite\":\"unspecified\",\"secure\":true,\"value\":\"\",\"id\":1}]"'), username: z.string().optional().describe('The username of the browser, eg: "user"'), password: z.string().optional().describe('The password of the browser, eg: "password"'), groupId: z.string() .regex(/^\d+$/, "Group ID must be a numeric string") .describe('The group id of the browser, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list or create a new group, or default is 0'), name: z.string().optional().describe('The name of the browser, eg: "My Browser"'), country: z.string().optional().describe('The country of the browser, eg: "CN"'), sysAppCateId: z.string().optional().describe('The sys app cate id of the browser, you can use the get-application-list tool to get the application list'), userProxyConfig: userProxyConfigSchema, fingerprintConfig: fingerprintConfigSchema, storageStrategy: z.number().optional().describe('The storage strategy of the browser, default is 0') }),