Skip to main content
Glama

MTS MCP Server

by CalvinMagezi
single-page-scraper.ts955 B
import puppeteer from "puppeteer"; import * as cheerio from "cheerio"; import { NodeHtmlMarkdown } from "node-html-markdown"; export class SinglePageScraper { async scrapePage(url: string): Promise<string> { const browser = await puppeteer.launch({ headless: "new" }); try { const page = await browser.newPage(); await page.goto(url, { waitUntil: "networkidle0" }); const html = await page.content(); const $ = cheerio.load(html); // Remove unwanted elements $("script, style, nav, footer, header").remove(); // Find main content area const mainContent = $("main").html() || $("article").html() || $(".content").html() || $(".documentation").html() || $("body").html(); if (!mainContent) return ""; // Convert HTML to Markdown return NodeHtmlMarkdown.translate(mainContent); } finally { await browser.close(); } } }

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/CalvinMagezi/mts-mcp'

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