Skip to main content
Glama

Website Scraper MCP Server

import TurndownService from "turndown"; /** * Converts raw HTML to Markdown using TurndownService * Removes script tags for security and cleaner output * @param html Raw HTML string to convert * @returns Markdown string */ export function htmlToMarkdown(html: string): string { // Remove script tags and their content before conversion const cleanHtml = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); const turndownService = new TurndownService({ codeBlockStyle: 'fenced', emDelimiter: '_' }); return turndownService.turndown(cleanHtml); }

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/tolik-unicornrider/mcp_scraper'

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