Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

create-browser

Set up and launch a customized browser profile with defined configurations like domain, cookies, proxy settings, and fingerprints using the AdsPower LocalAPI MCP Server.

Instructions

Create a browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookieNoThe cookie of the browser, eg: "[{"domain":".baidu.com","expirationDate":"","name":"","path":"/","sameSite":"unspecified","secure":true,"value":"","id":1}]"
countryNoThe country of the browser, eg: "CN"
domainNameNoThe domain name of the browser, eg: facebook.com
fingerprintConfigNoThe 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: ""
groupIdYesThe 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
nameNoThe name of the browser, eg: "My Browser"
openUrlsNoThe open urls of the browser, eg: ["https://www.google.com"]
passwordNoThe password of the browser, eg: "password"
storageStrategyNoThe storage strategy of the browser, default is 0
sysAppCateIdNoThe sys app cate id of the browser, you can use the get-application-list tool to get the application list
userProxyConfigYesThe user proxy config of the browser
usernameNoThe username of the browser, eg: "user"

Implementation Reference

  • The main handler function `createBrowser` that executes the tool logic: builds request body and sends POST to API endpoint `/api/v1/user/create` to create a browser profile, returns success message or throws 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}`); },
  • Zod input schema `createBrowserSchema` with fields like domainName, groupId, proxy configs, etc., used for validation in the tool.
    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') }),
  • MCP server.tool registration of 'create-browser' with description, schema.shape, and wrapped handler from browserHandlers.createBrowser.
    server.tool('create-browser', 'Create a browser', schemas.createBrowserSchema.shape, wrapHandler(browserHandlers.createBrowser));

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/AdsPower/local-api-mcp-typescript'

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