SuperAPI AI Directory

page2ai-mcp

Convert web pages into clean Markdown locally, preserving tables, code blocks and headings.

Open website

About this tool

Purpose

page2ai-mcp is an MCP (Model Context Protocol) server used to convert any web page URL into clean Markdown for use by an LLM as context. It fetches HTML from the passed-in URL, performs the conversion locally, and includes SSRF protection. The entire process does not depend on external APIs and does not send telemetry data; the only network request is to access the URL you pass in.

Main capabilities

  • Fetch, extract, convert: one tool, one command, all done locally.
  • Preserve code blocks (including language hints), tables, and reading structure; discard navigation and page decoration elements.
  • The output includes YAML front matter (title, source, fetch timestamp, extractor source information), followed by the clean Markdown body.
  • No API key, no account, no telemetry.
  • Since 0.2.0, the same stdio connection can respond to two MCP protocol revisions at the same time; serveStdio determines the protocol era from the first message and fixes one server instance for the lifetime of the connection, so clients using older SDKs are unaffected.
  • Since 0.2.5, the unscoped package page2ai-mcp automatically follows the latest server version through the ^ range.

Usage

Requires Node.js 20+. What starts is a stdio MCP server, which silently waits for a client, so it should be connected to one of the following clients rather than run on its own.

  • One-click install package: download page2ai-mcp-<version>.mcpb from the latest release, then in Claude Desktop open Settings → Extensions → Advanced settings → Install Extension…, and select the file.
  • Claude Desktop: add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude), then fully quit and restart Claude Desktop.
  • Cursor: add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
  • VS Code (GitHub Copilot): add to .vscode/mcp.json.
  • Windsurf: add to ~/.codeium/windsurf/mcp_config.json (macOS/Linux) or %USERPROFILE%.codeium\windsurf\mcp_config.json (Windows).
  • Zed: add to settings.json (zed: open settings file).
  • Other MCP clients: any MCP client that supports stdio will do, such as Cline, Continue, JetBrains AI Assistant, LM Studio, etc.; point their MCP server settings to the same command: npx -y page2ai-mcp.
  • If npx provides an outdated cached version, you can run npx -y page2ai-mcp@latest once.
  • Let an AI agent install it: you can point to llms-install.md, which contains the exact commands and verification steps for each client.

Hosted endpoint (beta, no installation required): for clients that only accept a remote MCP server URL (Streamable HTTP), it provides the same tool and the same code (see remote/), rate-limited by IP. Privacy tradeoff: URLs sent to the hosted endpoint are fetched by that server and pass through infrastructure operated by the author (deployed on Vercel). Running locally via npx keeps everything on your machine; prefer local running when conditions allow.

Tool parameters: page_to_markdown requires no setup, and every parameter has a reasonable default. Planned: the profile parameter (auto | docs | marketing | research | dashboard | wordpress-marketing).

Example prompts:

  1. Fetch documentation and answer questions: “Use page_to_markdown to fetch https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking and summarize the three main use cases for extended thinking.”
  2. Extract an API reference and generate a code snippet: “Fetch https://ai.google.dev/gemini-api/docs/thinking with page_to_markdown, then generate a Python code sample using the thinking budget parameter.”
  3. Compare two documentation pages: “Fetch both https://docs.anthropic.com/en/docs/prompt-engineering and https://platform.openai.com/docs/guides/prompt-engineering with page_to_markdown, then summarize the differences in approach.”

Use cases

  • Provide web content as LLM context for MCP clients such as Claude Desktop, Cursor, Windsurf, Zed, and others.
  • Fetch documentation and answer questions, extract API references to generate code examples, compare two documentation pages.
  • Web content extraction that needs to preserve code blocks, tables, and reading structure.

Limitations and privacy

  • Requires Node.js 20+.
  • The server itself does not collect data, does not send telemetry, and makes no external network calls other than the URLs you explicitly provide. However, your AI client (Claude, ChatGPT, etc.) will still send the extracted Markdown to its model provider according to that client's privacy policy, and this part is outside the control of this server; see PRIVACY.md for details.
  • The optional hosted endpoint is different in nature: the URL you ask to convert is fetched by a server operated by the author (deployed on Vercel), and Vercel retains its standard operational logs; no account, no tracking. If that trade-off matters for your use case, run the server locally (the code is the same).
  • Known security advisories: none. Migrating to the v2 SDK removed 90 transitive dependencies (production dependencies dropped from 117 to 26), and also removed the @hono/node-server advisory that 0.1.x carried through the monolithic @modelcontextprotocol/sdk; as of 0.2.0, npm audit is clean.
  • Build provenance: releases since v0.1.2 are published with npm provenance via GitHub Actions, with each version carrying a Sigstore attestation recorded in the public Rekor transparency ledger and showing a badge on npmjs.com.
  • License: MIT, Copyright © 2026 Igor Saevets.

Related projects

  • Page2AI Chrome extension:https://github.com/igorsaevets/page2ai-extension(同一提取核心,以浏览器扩展形式面向人类用户)
  • @page2ai/core:https://npmjs.com/package/@page2ai/core(共享提取库)
  • page2ai-mcp (unscoped):https://npmjs.com/package/page2ai-mcp(本包的薄封装,发布以便 npx -y page2ai-mcp runs without a scope prefix)
  • Software Heritage archive: SWHID swh:1:snp:05123c51ef9e7c0aeb06f42b1263c07a8d26999a

Author: Igor Saevets, AI expert, founder of Page2AI. Full bio: igorsaevets.github.io/page2ai-docs/about/.