Skip to main content
Glama

unblock

Bypass bot detection and anti-scraping measures to access web content, extract data, and capture screenshots from websites with protection mechanisms.

Instructions

Bypass bot detection and anti-scraping measures

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
contentNo
screenshotNo
stealthNo
blockAdsNo
headersNo

Implementation Reference

  • src/index.ts:191-204 (registration)
    Registration of the 'unblock' tool in the MCP server's listTools handler, defining 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'], },
  • MCP server handler for the 'unblock' tool. Calls BrowserlessClient.unblock(), handles response including text content and binary screenshot, returns MCP content array.
    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'); } }
  • Zod schema and TypeScript type for UnblockRequest used by the client.unblock method.
    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 returned by the Browserless /unblock endpoint.
    export interface UnblockResponse { content?: string; screenshot?: Buffer; cookies?: Cookie[]; browserWSEndpoint?: string; }
  • BrowserlessClient.unblock method that proxies the request to the Browserless server's /unblock HTTP endpoint via axios.
    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); } }

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