Skip to main content
Glama
zbkm
by zbkm

mmnt_cache

Extract cached web pages from the Mamont search engine by providing a unique cache ID, with options for text-only or HTML output.

Instructions

Extract page from Mamont cache

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesunique cache id
onlyTextYesShould the result be text only (no html)

Implementation Reference

  • The core handler function that fetches the cached HTML page from mmnt.ru, decodes from windows-1251 to UTF-8, and extracts plain text from the <pre> element if onlyText is true.
    export async function extractCache(id: string, onlyText: boolean = true): Promise<string> { const response = await fetch(`https://www.mmnt.ru/cache2/${id}.html`); const buffer = await response.arrayBuffer(); const html = iconv.decode(Buffer.from(buffer), "windows-1251"); // convert win1251 -> utf8 if (!onlyText) { return html; } const $ = cheerio.load(html); return $("pre").first().text(); }
  • src/index.ts:27-37 (registration)
    Registers the 'mmnt_cache' tool with the MCP server, using CacheParams schema and wrapping the extractCache handler.
    server.tool( "mmnt_cache", "Extract page from Mamont cache", CacheParams, async ({id, onlyText}) => ({ content: [{ type: "text", text: JSON.stringify(await extractCache(id, onlyText)) }] }) );
  • Zod schema defining input parameters for the mmnt_cache tool: id (string) and onlyText (boolean).
    export const CacheParams = { id: z.string({description: "unique cache id"}), onlyText: z.boolean({description: "Should the result be text only (no html)"}) };
Install Server

Other 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/zbkm/mmnt-mcp-server'

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