Skip to main content
Glama
puremd

pure.md MCP server

Official
by puremd

search-web

Search the web and retrieve content in markdown format for AI clients, enabling web unblocking and content access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The inline handler function for the 'search-web' tool. It fetches search results from the pure.md API endpoint using the provided query and API key, returning markdown content or an error message.
    server.tool("search-web", { query: z.string() }, async ({ query }) => { try { const response = await fetch(`https://pure.md/search?q=${query}`, { headers: { "x-puremd-api-token": PUREMD_API_KEY }, }); const markdown = await response.text(); return { content: [{ type: "text", text: markdown }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: (error as Error).message }], isError: true, }; } });
  • Zod input schema for the 'search-web' tool, defining a single 'query' parameter as a string.
    server.tool("search-web", { query: z.string() }, async ({ query }) => {
  • src/index.ts:43-59 (registration)
    Registration of the 'search-web' tool on the MCP server using server.tool(), including inline schema and handler.
    server.tool("search-web", { query: z.string() }, async ({ query }) => { try { const response = await fetch(`https://pure.md/search?q=${query}`, { headers: { "x-puremd-api-token": PUREMD_API_KEY }, }); const markdown = await response.text(); return { content: [{ type: "text", text: markdown }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: (error as Error).message }], isError: true, }; } });
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/puremd/puremd-mcp'

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