MCP server
@page2ai/mcp is an MCP server (Model Context Protocol) that exposes a single tool for turning any web page into clean Markdown. It speaks stdio, ships as an npm package, and requires no external services.
Hosted endpoint (no install)
Section titled “Hosted endpoint (no install)”For clients that accept a remote MCP server URL (Streamable HTTP):
https://page2ai-mcp-remote.vercel.app/api/mcpSame code as the local server, rate-limited per IP. Convenient when you cannot run Node.js on the host (mobile clients, browser-only IDEs, hosted playgrounds).
Privacy trade-off: URLs sent to the hosted endpoint are fetched from that server, so they transit infrastructure operated by the author (on Vercel). Running locally via npx keeps everything on your machine — prefer it when you can.
Install (local)
Section titled “Install (local)”Add to your MCP client configuration:
{ "mcpServers": { "page2ai": { "command": "npx", "args": ["-y", "page2ai-mcp"] } }}Restart the client. The page2ai server should show one tool: page_to_markdown.
Per-client setup
Section titled “Per-client setup”| Client | Method |
|---|---|
| Claude Code | claude mcp add page2ai -- npx -y page2ai-mcp |
| Claude Desktop (one-click) | Download page2ai-mcp-<version>.mcpb from latest release → Settings → Extensions → Advanced settings → Install Extension |
| Claude Desktop (JSON) | Add the JSON block above to claude_desktop_config.json, restart |
| Cursor | One-click install deeplink or add JSON to ~/.cursor/mcp.json |
| VS Code (GitHub Copilot) | code --add-mcp '{"name":"page2ai","command":"npx","args":["-y","page2ai-mcp"]}' |
| Codex CLI | codex mcp add page2ai -- npx -y page2ai-mcp |
| Gemini CLI | gemini mcp add page2ai npx -y page2ai-mcp |
Antigravity (agy) |
agy mcp add page2ai npx -y page2ai-mcp |
| Windsurf | Add JSON block to ~/.codeium/windsurf/mcp_config.json |
| Zed | Add to context_servers in settings.json |
| Cline (VS Code) | Install via llms-install.md — Cline reads it and configures itself |
| LobeHub | Listing page — one-click enable |
Tool: page_to_markdown
Section titled “Tool: page_to_markdown”Fetch a URL and convert the resulting HTML to Markdown.
Input schema.
{ "url": "string (required, HTTPS)", "includeFrontmatter": "boolean (default: true)", "includeImages": "boolean (default: true)", "timeoutMs": "number (default: 15000, max: 60000)"}Output.
{ "markdown": "string", "title": "string", "baseUrl": "string (final URL after redirects)", "charCount": "number", "extractedAt": "ISO 8601 timestamp"}Read-only. The tool declares readOnlyHint: true in its MCP manifest — it never writes, and it never modifies system state.
Safety
Section titled “Safety”The server enforces the following at runtime:
- HTTPS only — schemes other than
https:are rejected.http:,file:,data:, andjavascript:are blocked. - SSRF guard — blocks requests to loopback (
127.0.0.0/8), private IPv4 ranges (10/8,172.16/12,192.168/16), link-local (169.254/16, including AWS/GCP metadata endpoints), and IPv6 loopback / private ranges. - Redirect validation — after following redirects, the final URL is re-validated against the same rules.
- 10 MB size cap — responses larger than 10 MB are rejected.
- Timeout — enforced via
AbortController; default 15 s, cap 60 s. - UTF-8 only — response body must decode as UTF-8; other encodings are rejected.
Verify locally
Section titled “Verify locally”npx -y page2ai-mcpThe process starts on stdio and waits for JSON-RPC messages. To test it manually:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' | npx -y page2ai-mcpExpect a JSON response with server info and capabilities.
Registry
Section titled “Registry”Registered as io.github.igorsaevets/page2ai-mcp in the official MCP Registry. Downstream aggregators (Smithery, Glama, MCP.so, PulseMCP) pick up from that source automatically.
Known advisories
Section titled “Known advisories”npm audit reports one moderate finding in @hono/node-server, a transitive dependency of @modelcontextprotocol/sdk. The affected code path is only reached by the SDK’s HTTP/OAuth server code; this stdio server never loads it. See the package README for the full analysis.
Written by Igor Saevets — LinkedIn · GitHub · ORCID 0009-0006-8636-1377.