{
  "markdown": "# @page2ai/mcp — Web to Markdown for LLM Context\n\n[![npm version](https://img.shields.io/npm/v/%40page2ai%2Fmcp)](https://www.npmjs.com/package/@page2ai/mcp)\n[![CI](https://github.com/igorsaevets/page2ai-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/igorsaevets/page2ai-mcp/actions/workflows/ci.yml)\n[![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.igorsaevets%2Fpage2ai--mcp-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.igorsaevets/page2ai-mcp)\n[![license MIT](https://img.shields.io/npm/l/%40page2ai%2Fmcp)](./LICENSE)\n\n<sub>No downloads badge on purpose: npm download counts are dominated by registry mirrors and\nbots, and this README only shows numbers a human can trust.</sub>\n\n> One-click webpage-to-Markdown MCP server for ChatGPT, Claude, and Gemini.\n> Preserves code blocks with language hints, tables, and reading structure.\n> Fetch, extract, convert — one tool, one command, entirely on your machine.\n> No API key, no account, no telemetry; the only network requests are to the URLs you pass it.\n\nCompanion to the [Page2AI Chrome & Firefox extensions](https://github.com/igorsaevets/page2ai-extension);\nboth share the same [`@page2ai/core`](https://npmjs.com/package/@page2ai/core) extraction library.\n\n## Quick start\n\n```bash\nnpx -y page2ai-mcp\n```\n\nThis starts the stdio MCP server — it waits silently for a client, so wire it into one of\nthe clients below rather than running it bare. Requires **Node.js 20+**. No API key. If\n`npx` ever serves you a stale cached version, run `npx -y page2ai-mcp@latest` once.\n\n`page2ai-mcp` is a thin unscoped wrapper around [`@page2ai/mcp`](https://www.npmjs.com/package/@page2ai/mcp);\nsince 0.2.5 it follows the latest server automatically via a `^` range.\n\n### Hosted endpoint (beta) — no install at all\n\nFor clients that only accept a remote MCP server URL (Streamable HTTP):\n\n```\nhttps://page2ai-mcp-remote.vercel.app/api/mcp\n```\n\nSame tool, same code (see [`remote/`](./remote)), rate-limited per IP.\n**Privacy trade-off:** URLs sent to the hosted endpoint are fetched *from that\nserver*, so they transit infrastructure operated by the author (on Vercel).\nRunning locally via `npx` keeps everything on your machine — prefer it when you\ncan.\n\n### Claude Code\n\n```bash\nclaude mcp add page2ai -- npx -y page2ai-mcp\n```\n\n### Claude Desktop\n\nOne-click bundle: download `page2ai-mcp-<version>.mcpb` from the\n[latest release](https://github.com/igorsaevets/page2ai-mcp/releases/latest), then in\nClaude Desktop open **Settings → Extensions → Advanced settings → Install Extension…**\nand pick the file.\n\nOr add to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`,\nWindows: `%APPDATA%\\Claude\\`), then fully quit and restart Claude Desktop:\n\n```json\n{\n  \"mcpServers\": {\n    \"page2ai\": { \"command\": \"npx\", \"args\": [\"-y\", \"page2ai-mcp\"] }\n  }\n}\n```\n\n### Cursor\n\n[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=page2ai&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBhZ2UyYWktbWNwIl19)\n\n<!-- config = base64 of {\"command\":\"npx\",\"args\":[\"-y\",\"page2ai-mcp\"]}\n     regenerate: echo -n '{\"command\":\"npx\",\"args\":[\"-y\",\"page2ai-mcp\"]}' | base64 -w0 -->\n\nOr add to `~/.cursor/mcp.json` (global) / `.cursor/mcp.json` (project):\n\n```json\n{\n  \"mcpServers\": {\n    \"page2ai\": { \"command\": \"npx\", \"args\": [\"-y\", \"page2ai-mcp\"] }\n  }\n}\n```\n\n### VS Code (GitHub Copilot)\n\n```bash\ncode --add-mcp '{\"name\":\"page2ai\",\"command\":\"npx\",\"args\":[\"-y\",\"page2ai-mcp\"]}'\n```\n\nOr add to `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"page2ai\": { \"type\": \"stdio\", \"command\": \"npx\", \"args\": [\"-y\", \"page2ai-mcp\"] }\n  }\n}\n```\n\n### Codex CLI\n\n```bash\ncodex mcp add page2ai -- npx -y page2ai-mcp\n```\n\n### Gemini CLI\n\n```bash\ngemini mcp add page2ai npx -y page2ai-mcp\n```\n\n### Antigravity\n\n```bash\nagy mcp add page2ai npx -y page2ai-mcp\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json` (macOS/Linux) or\n`%USERPROFILE%\\.codeium\\windsurf\\mcp_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"page2ai\": { \"command\": \"npx\", \"args\": [\"-y\", \"page2ai-mcp\"] }\n  }\n}\n```\n\n### Zed\n\nAdd to `settings.json` (`zed: open settings file`):\n\n```json\n{\n  \"context_servers\": {\n    \"page2ai\": { \"command\": \"npx\", \"args\": [\"-y\", \"page2ai-mcp\"] }\n  }\n}\n```\n\n### Other MCP clients\n\nAny client that speaks MCP over stdio works — Cline, Continue, JetBrains AI Assistant,\nLM Studio and others. Point their MCP server settings at the same command:\n`npx -y page2ai-mcp`.\n\n### Letting an AI agent install it\n\nIf an AI agent (Cline, Claude Code, Codex, …) is doing the setup for you, point it at\n[`llms-install.md`](./llms-install.md) — a machine-oriented install guide with the exact\ncommand per client and a verification step.\n\n## Tools\n\n| Tool | Description | Read-only | Example |\n|------|-------------|-----------|---------|\n| `page_to_markdown` | Fetch a web page URL and convert to clean Markdown | ✅ | `page_to_markdown(url=\"https://docs.anthropic.com/en/api/messages\")` |\n\n## Example prompts\n\n**1. Fetch documentation and answer questions:**\n> \"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.\"\n\n**2. Extract API reference into a code snippet:**\n> \"Fetch https://ai.google.dev/gemini-api/docs/thinking with page_to_markdown, then generate a Python code sample using the thinking budget parameter.\"\n\n**3. Compare two documentation pages:**\n> \"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.\"\n\n## What a call returns\n\nVerbatim output of `page_to_markdown(url=\"https://docs.anthropic.com/en/api/messages\")`,\ncaptured 2026-08-29 on core 0.1.7, truncated:\n\n```markdown\n---\ntitle: \"Messages\"\nsource: \"https://platform.claude.com/docs/en/api/messages\"\ncaptured_at: \"2026-08-29T09:01:05.806Z\"\nextractor: \"page2ai-core\"\nextractor_version: \"0.1.7\"\nextractor_source: \"content-negotiation\"\n---\n# Messages\n\n## Create a Message\n\n**POST** `/v1/messages`\n\nSend a structured list of input messages with text and/or image content, and the\nmodel will generate the next message in the conversation.\n```\n\nYAML front matter (title, source, capture timestamp, extractor provenance), then the\narticle as clean Markdown — headings, tables and fenced code preserved, navigation and\nchrome dropped.\n\n## Configuration\n\nNo setup required — every argument has a sensible default. `page_to_markdown` accepts:\n\n| Argument | Type | Default | Effect |\n|---|---|---|---|\n| `url` | string, **required** | — | Absolute http(s) URL to convert. Private ranges, loopback and cloud metadata endpoints are blocked (SSRF guard) |\n| `include_images` | boolean | `true` | Keep `![alt](src)` image references in the output |\n| `include_frontmatter` | boolean | `true` | Prepend the YAML front matter block |\n| `timeout_ms` | integer | `15000` | Abort the fetch after N ms (1000–60000) |\n\nPlanned: a `profile` argument (`auto | docs | marketing | research | dashboard | wordpress-marketing`).\n\n## Privacy\n\n`@page2ai/mcp` collects no data, sends no telemetry, and makes no external network calls\nbeyond the URLs you explicitly provide. Note that your AI client (Claude, ChatGPT, …)\nstill sends the extracted Markdown to its own model provider under that client's privacy\npolicy — that part is outside this server's control. See [PRIVACY.md](./PRIVACY.md) for details.\n\nThe optional **hosted endpoint** is different by nature: URLs you ask it to convert are\nfetched from a server operated by the author (deployed on Vercel), and Vercel keeps its\nstandard operational logs. No accounts, no tracking. If that trade-off matters for your\nuse case, run the server locally — it is the same code.\n\n## Protocol revisions\n\nSince 0.2.0 this server answers **both** MCP protocol revisions on the same stdio\nconnection:\n\n| Revision | How a client opens the connection | Served |\n|---|---|---|\n| `2026-07-28` | `server/discover`, carrying `io.modelcontextprotocol/protocolVersion` in `_meta` | yes |\n| `2025-11-25` and earlier | the `initialize` handshake | yes |\n\n`serveStdio` picks the era from the opening message and pins one server instance for\nthe life of the connection, so clients on older SDKs are unaffected. Note that a\nmessage carrying no version claim is treated by the specification as a 2025-era\nopening; `server/discover` without that `_meta` field is therefore answered with\n`-32601` rather than being upgraded.\n\nVerify against a build with the raw JSON-RPC frames, without a client library:\n\n```bash\nprintf '%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"server/discover\",\"params\":{\"_meta\":{\"io.modelcontextprotocol/protocolVersion\":\"2026-07-28\"}}}' | node dist/index.js\n```\n\n## Known advisories\n\nNone. Moving to the v2 SDK removed 90 transitive packages (117 production\ndependencies down to 26) and with them the `@hono/node-server` advisory that\n0.1.x carried through the monolithic `@modelcontextprotocol/sdk`; that package\npulled the HTTP and OAuth server stack even for a stdio-only server. `npm audit`\nis clean as of 0.2.0.\n\n## Development\n\n```bash\ngit clone https://github.com/igorsaevets/page2ai-mcp\ncd page2ai-mcp\nnpm install\nnpm run build\nnode dist/index.js  # runs stdio MCP server\n```\n\nTest with MCP Inspector:\n```bash\nnpx @modelcontextprotocol/inspector node dist/index.js\n```\n\n## Support\n\nPick the channel by what you have, not by what is quickest to type:\n\n| You have | Use |\n|---|---|\n| A bug, a page that extracts badly, a feature idea | [GitHub issues](https://github.com/igorsaevets/page2ai-mcp/issues) — public and searchable, so the fix helps the next person too |\n| A security vulnerability | [Private vulnerability reporting](https://github.com/igorsaevets/page2ai-mcp/security/advisories/new), see [SECURITY.md](SECURITY.md). Do not open a public issue |\n| A usage question | [Docs](https://igorsaevets.github.io/page2ai-docs/mcp/) first, then an issue |\n\n## About the author\n\nWritten and maintained by **Igor Saevets** — AI expert and founder of Page2AI. Full bio:\n[igorsaevets.github.io/page2ai-docs/about/](https://igorsaevets.github.io/page2ai-docs/about/).\n\nThese are identity and collaboration links, not the support queue. A bug reported in a DM is a bug\nnobody else can find later, so anything you want fixed belongs in the table above.\n\n- LinkedIn: [linkedin.com/in/igorsaevets](https://www.linkedin.com/in/igorsaevets/)\n- Facebook: [facebook.com/igorsaevets](https://www.facebook.com/igorsaevets/)\n- GitHub: [github.com/igorsaevets](https://github.com/igorsaevets)\n- ORCID: [0009-0006-8636-1377](https://orcid.org/0009-0006-8636-1377)\n\n\n## Build provenance\n\nAn MCP server runs with the privileges of whatever launched it, so where the tarball came from\nis a security question, not a formality. Releases from v0.1.2 onward are published from GitHub\nActions with [npm provenance](https://docs.npmjs.com/generating-provenance-statements): each\nversion carries a Sigstore attestation naming the commit and workflow run that produced it,\nrecorded in the public Rekor transparency ledger and shown as a badge on npmjs.com.\n\nCheck it before you trust it:\n\n```bash\nnpm audit signatures\nnpm view @page2ai/mcp --json | jq '.dist.attestations'\n```\n\n## License\n\nMIT — see [LICENSE](./LICENSE). Copyright © 2026 Igor Saevets.\n\n## Related\n\n- **Page2AI Chrome extension** — https://github.com/igorsaevets/page2ai-extension (same extraction core, distributed as a browser extension for humans)\n- **@page2ai/core** — https://npmjs.com/package/@page2ai/core (the shared extraction library)\n- **page2ai-mcp** (unscoped) — https://npmjs.com/package/page2ai-mcp (thin wrapper around this package, published so `npx -y page2ai-mcp` works without a scope prefix)\n- **Software Heritage archive** — SWHID `swh:1:snp:05123c51ef9e7c0aeb06f42b1263c07a8d26999a`\n",
  "bytes": 11948,
  "sha": "1071ccc11aa9edb35bda8c0d409ff60424a7fd99eed86ccfe446d5836eeae642",
  "repo_slug": "igorsaevets/page2ai-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_igorsaevets_page2ai_mcp_872053c5/readme"
}