Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

get-opened-browser

Retrieve a list of currently opened browsers to manage and monitor active browser sessions effectively through AdsPower LocalAPI MCP Server integration.

Instructions

Get the list of opened browsers

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • The main handler function for the 'get-opened-browser' tool. It fetches the list of opened browsers from the local API endpoint and returns a formatted JSON string or throws an error.
    async getOpenedBrowser() { const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.GET_OPENED_BROWSER}`); if (response.data.code === 0) { return `Opened browser list: ${JSON.stringify(response.data.data.list, null, 2)}`; } throw new Error(`Failed to get opened browsers: ${response.data.msg}`); },
  • Registers the 'get-opened-browser' tool with the MCP server, specifying its name, description, input schema, and wrapped handler.
    server.tool('get-opened-browser', 'Get the list of opened browsers', schemas.emptySchema.shape, wrapHandler(browserHandlers.getOpenedBrowser));
  • The empty input schema (no parameters required) used by the 'get-opened-browser' tool.
    emptySchema: z.object({}).strict(),

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