Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

open-browser

Open a browser profile with custom fingerprint settings through the AdsPower LocalAPI MCP Server, enabling automated browser management and configuration.

Instructions

Open the browser, both environment and profile mean browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNumberNoThe serial number of the browser to open
userIdNoThe browser id of the browser to open
ipTabNoThe ip tab of the browser, 0 is not use ip tab, 1 is use ip tab, default is 0
launchArgsNoThe launch args of the browser, use chrome launch args, eg: ["--blink-settings=imagesEnabled=false","--disable-notifications"], or vista url, eg: ["https://www.adspower.net"]
clearCacheAfterClosingNoThe clear cache after closing of the browser, 0 is not clear cache after closing, 1 is clear cache after closing, default is 0
cdpMaskNoThe cdp mask of the browser, 0 is not use cdp mask, 1 is use cdp mask, default is 0

Implementation Reference

  • The core handler function for the 'open-browser' tool. It constructs API parameters and makes a GET request to the local API endpoint to start/open the browser, returning connection details like ws.puppeteer or throwing an error on failure.
    async openBrowser({ serialNumber, userId, ipTab, launchArgs, clearCacheAfterClosing, cdpMask }: OpenBrowserParams) {
        const params = new URLSearchParams();
        if (serialNumber) {
            params.set('serial_number', serialNumber);
        }
        if (userId) {
            params.set('user_id', userId);
        }
        if (ipTab) {
            params.set('open_tabs', ipTab);
        }
        if (launchArgs) {
            params.set('launch_args', launchArgs);
        }
        if (clearCacheAfterClosing) {
            params.set('clear_cache_after_closing', clearCacheAfterClosing);
        }
        if (cdpMask) {
            params.set('cdp_mask', cdpMask);
        }
        params.set('open_tabs', '0');
    
        const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.START_BROWSER}`, { params });
        if (response.data.code === 0) {
            return `Browser opened successfully with: ${Object.entries(response.data.data).map(([key, value]) => {
                if (value && typeof value === 'object') {
                    return Object.entries(value).map(([key, value]) => `ws.${key}: ${value}`).join('\n');
                }
                return `${key}: ${value}`;
            }).join('\n')}`;
        }
        throw new Error(`Failed to open browser: ${response.data.msg}`);
    },
  • Registers the 'open-browser' tool with the MCP server, providing name, description, input schema, and the wrapped handler function.
    server.tool('open-browser', 'Open the browser, both environment and profile mean browser', schemas.openBrowserSchema.shape, 
        wrapHandler(browserHandlers.openBrowser));
  • Zod schema defining the input parameters for the 'open-browser' tool, including optional fields like serialNumber, userId, launchArgs, etc.
    openBrowserSchema: z.object({
        serialNumber: z.string().optional().describe('The serial number of the browser to open'),
        userId: z.string().optional().describe('The browser id of the browser to open'),
        ipTab: z.enum(['0', '1']).optional().describe('The ip tab of the browser, 0 is not use ip tab, 1 is use ip tab, default is 0'),
        launchArgs: z.string().optional().describe(`The launch args of the browser, use chrome launch args, eg: ${JSON.stringify(["--blink-settings=imagesEnabled=false", "--disable-notifications"])}, or vista url, eg: ${JSON.stringify(["https://www.adspower.net"])}`),
        clearCacheAfterClosing: z.enum(['0', '1']).optional().describe('The clear cache after closing of the browser, 0 is not clear cache after closing, 1 is clear cache after closing, default is 0'),
        cdpMask: z.enum(['0', '1']).optional().describe('The cdp mask of the browser, 0 is not use cdp mask, 1 is use cdp mask, default is 0'),
    }).strict(),
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to do so. It does not explain what 'open' means operationally (e.g., whether it launches a process, requires authentication, has side effects like resource consumption, or involves rate limits). The phrase 'both environment and profile mean browser' is confusing and adds no clarity, making the tool's behavior opaque.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, poorly structured sentence that is both under-specified and confusing ('both environment and profile mean browser'). It wastes space on unclear phrasing rather than conveying useful information, failing to be appropriately concise or front-loaded with actionable details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a browser automation tool with 6 parameters and no annotations or output schema, the description is severely incomplete. It does not cover what the tool does operationally, when to use it, behavioral traits, or expected outcomes, leaving critical gaps for an agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 6 parameters (e.g., serialNumber, userId, ipTab). The description adds no additional meaning or context beyond what the schema provides, such as explaining how parameters interact or their practical implications. However, since the schema is comprehensive, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Open the browser, both environment and profile mean browser' is tautological—it essentially restates the tool name 'open-browser' without specifying what 'open' entails (e.g., launching a browser instance, connecting to an existing one, or initializing a session). It fails to distinguish this tool from siblings like 'create-browser' or 'connect-browser-with-ws', leaving the purpose vague and unclear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing an existing browser profile), exclusions, or comparisons to sibling tools like 'create-browser' (for new instances) or 'connect-browser-with-ws' (for WebSocket connections), leaving the agent without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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