Skip to main content
Glama

unblock

Bypass bot detection and anti-scraping mechanisms to extract web content, capture screenshots, and automate browser tasks with enhanced stealth and ad-blocking options.

Instructions

Bypass bot detection and anti-scraping measures

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockAdsNo
contentNo
headersNo
screenshotNo
stealthNo
urlYes

Implementation Reference

  • Core handler implementation in BrowserlessClient that proxies the unblock request via HTTP POST to the Browserless server's /unblock endpoint.
    /** * Bypass bot detection and anti-scraping measures */ async unblock(request: UnblockRequest): Promise<BrowserlessResponse<UnblockResponse>> { try { const response: AxiosResponse<UnblockResponse> = await this.httpClient.post('/unblock', request); return { success: true, data: response.data, }; } catch (error) { return this.handleError(error); } }
  • MCP server dispatch handler for the 'unblock' tool, which invokes the client.unblock method and formats the response as MCP content (text and potential binary screenshot).
    case 'unblock': { if (!args) throw new Error('Arguments are required'); const result = await this.client!.unblock(args as any); if (result.success && result.data) { const content = [ { type: 'text', text: 'Unblock operation completed successfully.', }, ]; if (result.data.content) { content.push({ type: 'text', text: result.data.content, }); } if (result.data.screenshot) { content.push({ type: 'binary', mimeType: 'image/png', data: result.data.screenshot.toString('base64'), } as any); } return { content }; } else { throw new Error(result.error || 'Failed to unblock'); } }
  • src/index.ts:190-205 (registration)
    Registration of the 'unblock' tool in the MCP ListTools response, including name, description, and input schema.
    { name: 'unblock', description: 'Bypass bot detection and anti-scraping measures', inputSchema: { type: 'object', properties: { url: { type: 'string' }, content: { type: 'boolean' }, screenshot: { type: 'boolean' }, stealth: { type: 'boolean' }, blockAds: { type: 'boolean' }, headers: { type: 'object' }, }, required: ['url'], }, },
  • Zod schema and TypeScript type definition for UnblockRequest input validation.
    // Unblock request schema export const UnblockRequestSchema = z.object({ url: z.string(), browserWSEndpoint: z.boolean().optional(), cookies: z.boolean().optional(), content: z.boolean().optional(), screenshot: z.boolean().optional(), ttl: z.number().optional(), stealth: z.boolean().optional(), blockAds: z.boolean().optional(), headers: z.record(z.string()).optional(), }); export type UnblockRequest = z.infer<typeof UnblockRequestSchema>;
  • TypeScript interface for UnblockResponse output type.
    export interface UnblockResponse { content?: string; screenshot?: Buffer; cookies?: Cookie[]; browserWSEndpoint?: string; }

Other Tools

Related 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/Lizzard-Solutions/browserless-mcp'

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