Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

close-browser

Close a specific AdsPower browser profile by providing its user ID, enabling automated browser management through the LocalAPI MCP server.

Instructions

Close the browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesThe browser id of the browser to stop, it is required when you want to stop the browser

Implementation Reference

  • The handler function closeBrowser that sends an axios GET request to the CLOSE_BROWSER API endpoint with the userId parameter and returns a success message.
    async closeBrowser({ userId }: CloseBrowserParams) { const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.CLOSE_BROWSER}`, { params: { user_id: userId } }); return 'Browser closed successfully'; },
  • Zod schema defining the input for close-browser tool: requires a 'userId' string parameter.
    closeBrowserSchema: z.object({ userId: z.string().describe('The browser id of the browser to stop, it is required when you want to stop the browser') }).strict(),
  • Registers the 'close-browser' tool on the MCP server using the closeBrowserSchema and wrapped browserHandlers.closeBrowser function.
    server.tool('close-browser', 'Close the browser', schemas.closeBrowserSchema.shape, wrapHandler(browserHandlers.closeBrowser));

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