Skip to main content
Glama
zbkm
by zbkm

mmnt_cache

Retrieve cached web pages from Mamont search engine. Specify a unique cache ID and choose to extract text-only or full HTML content.

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 main handler function extractCache that fetches the HTML from Mamont cache, decodes it, and optionally extracts text using cheerio.
    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(); }
  • Zod schema for CacheParams defining the input parameters: 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)"}) };
  • src/index.ts:27-37 (registration)
    Registration of the mmnt_cache tool using McpServer.tool, specifying name, description, input schema (CacheParams), and handler that calls extractCache.
    server.tool( "mmnt_cache", "Extract page from Mamont cache", CacheParams, async ({id, onlyText}) => ({ content: [{ type: "text", text: JSON.stringify(await extractCache(id, onlyText)) }] }) );

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

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