Skip to main content
Glama
zbkm
by zbkm

mmnt_search

Perform targeted searches using the Mamont search engine by submitting a query string and specifying page number for results.

Instructions

Search in Mamont search engine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYespage number
queryYesquery string

Implementation Reference

  • Core handler function that performs the search by fetching from mmnt.ru, decoding win1251, parsing HTML with cheerio, and extracting search results including title, description, URL, cache, and web archive links.
    export async function searchMamont(request: string, page: number = 0): Promise<SearchResult> { const ot = page * 10 + 1; const response = await fetch(`https://www.mmnt.ru/get?st=${encodeURIComponent(request)}&in=w&ot=${ot}`); const buffer = await response.arrayBuffer(); const text = iconv.decode(Buffer.from(buffer), "windows-1251"); // convert win1251 -> utf8 const $ = cheerio.load(text); const result: SearchResult = []; $(".link_block").each((i, elem) => { if (i == 0) return; const linkElement = $(elem).find("p.link_p a").first(); const title = linkElement.text().trim(); const description = $(elem).find("p.desc_p").text().trim(); const url = $(elem).find("p.link_p a").first().attr("href")!; const cache = $(elem).find("p.cache_p a").first().attr("href")?.match(/\/cache\/([a-f0-9]+)\.html/)?.[1]; const web_archive = $(elem).find("p.arch_p a").first()?.attr("href"); result.push({ title, description, url, ...(cache ? {cache} : {}), ...(web_archive ? {web_archive} : {}), }); }); return result; }
  • Zod schema defining the input parameters for the mmnt_search tool: query (string) and page (number).
    export const SearchParams = { query: z.string({description: "query string"}), page: z.number({description: "page number"}) };
  • src/index.ts:15-25 (registration)
    Registers the mmnt_search tool on the MCP server with name, description, input schema (SearchParams), and a thin async handler that invokes searchMamont and returns the JSON-stringified result as text content.
    server.tool( "mmnt_search", "Search in Mamont search engine", SearchParams, async ({query, page}) => ({ content: [{ type: "text", text: JSON.stringify(await searchMamont(query, page)) }] }) );

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