Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

get-browser-list

Retrieve browser profiles from AdsPower with filtering, sorting, and pagination options to manage and organize browser instances.

Instructions

Get the list of browsers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdNoThe 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
sizeNoThe size of the page, max is 100, if get more than 100, you need to use the page to get the next page, default is 10
pageNoThe page of the browser, default is 1
idNoThe id of the browser
serialNumberNoThe serial number of the browser
sortNoThe sort of the browser
orderNoThe order of the browser

Implementation Reference

  • The handler function that implements the core logic of the 'get-browser-list' tool by querying the API for browser list and returning formatted JSON.
    async getBrowserList(params: GetBrowserListParams) { const { groupId, size, id, serialNumber, sort, order, page } = params; const urlParams = new URLSearchParams(); if (size) { urlParams.set('page_size', size.toString()); } if (page) { urlParams.set('page', page.toString()); } if (id) { urlParams.set('user_id', id); } if (groupId) { urlParams.set('group_id', groupId); } if (serialNumber) { urlParams.set('serial_number', serialNumber); } if (sort) { urlParams.set('user_sort', JSON.stringify({ [sort]: order || 'asc', })); } const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.GET_BROWSER_LIST}`, { params: urlParams }); return `Browser list: ${JSON.stringify(response.data.data.list, null, 2)}`; },
  • Zod schema defining the input parameters for the 'get-browser-list' tool.
    getBrowserListSchema: z.object({ groupId: z.string() .regex(/^\d+$/, "Group ID must be a numeric string") .optional() .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'), size: z.number().optional().describe('The size of the page, max is 100, if get more than 100, you need to use the page to get the next page, default is 10'), page: z.number().optional().describe('The page of the browser, default is 1'), id: z.string().optional().describe('The id of the browser'), serialNumber: z.string().optional().describe('The serial number of the browser'), sort: z.enum(['serial_number', 'last_open_time', 'created_time']).optional() .describe('The sort of the browser'), order: z.enum(['asc', 'desc']).optional() .describe('The order of the browser') }).strict(),
  • Registration of the 'get-browser-list' tool on the MCP server, linking name, description, schema, and handler.
    server.tool('get-browser-list', 'Get the list of browsers', schemas.getBrowserListSchema.shape, wrapHandler(browserHandlers.getBrowserList));

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