@page2ai/mcp
Advanced tools
+14
-0
@@ -8,2 +8,16 @@ # Changelog | ||
| ## 0.2.1 - 2026-08-02 | ||
| ### Fixed | ||
| - Pages built with a card grid lost almost all of their content. `@page2ai/core` chose the | ||
| conversion root with the FIRST `<article>` in document order, and HTML5 allows that tag on any | ||
| self-contained component, so a decorative card outranked the page. `docs.astro.build` returned | ||
| 208 characters of body where it now returns 3,494; `blog.cloudflare.com` returned 927 where it | ||
| now returns 15,068. An `<article>` is now used only when it carries at least half its | ||
| container's content text. Requires `@page2ai/core` 0.1.2. | ||
| - The server reported the wrong version over the wire. `SERVER_VERSION` was a hardcoded constant | ||
| beside `package.json` and `manifest.json`, and it drifted on the first release after it was | ||
| written. It is now read from `package.json`, with a fallback so a missing file can never stop | ||
| the server from starting. | ||
| ## [0.2.0] - 2026-07-29 | ||
@@ -10,0 +24,0 @@ |
+21
-1
@@ -14,2 +14,4 @@ #!/usr/bin/env node | ||
| // serves only the 2025 era no matter which SDK version is installed. | ||
| import { readFileSync } from 'node:fs'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { serveStdio } from '@modelcontextprotocol/server/stdio'; | ||
@@ -19,3 +21,21 @@ import { Server } from '@modelcontextprotocol/server'; | ||
| const SERVER_NAME = 'page2ai-mcp'; | ||
| const SERVER_VERSION = '0.2.0'; | ||
| // Read the version from package.json instead of restating it here. | ||
| // | ||
| // This used to be `const SERVER_VERSION = '0.2.0'`, a third source of truth beside | ||
| // package.json and manifest.json, kept in sync by remembering to. It drifted on the very next | ||
| // release: 0.2.1 shipped while the running server still introduced itself over the wire as | ||
| // 0.2.0, so a client asking what it was talking to got the wrong answer and nothing failed. | ||
| // | ||
| // Wrapped because a version string is not worth crashing a server over: if the layout ever | ||
| // changes and the file is not where dist/index.js expects it, an unknown version is a far | ||
| // better outcome than a server that will not start. | ||
| const SERVER_VERSION = (() => { | ||
| try { | ||
| const pkgPath = fileURLToPath(new URL('../package.json', import.meta.url)); | ||
| return JSON.parse(readFileSync(pkgPath, 'utf8')).version || '0.0.0-unknown'; | ||
| } | ||
| catch { | ||
| return '0.0.0-unknown'; | ||
| } | ||
| })(); | ||
| // Log to stderr — stdio transport uses stdout for JSON-RPC frames, so anything | ||
@@ -22,0 +42,0 @@ // written to stderr is safe (Claude Desktop logs it to the debug console). |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,yCAAyC;AACzC,+EAA+E;AAC/E,4EAA4E;AAC5E,2EAA2E;AAC3E,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,qEAAqE;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE7F,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,GAAG,GAAG,CAAC,GAAW,EAAQ,EAAE;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,WAAW,KAAK,GAAG,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,iFAAiF;AACjF,0EAA0E;AAC1E,MAAM,WAAW,GAAG,GAAW,EAAE;IAC/B,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KACxB,EACD;QACE,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;SACV;KACF,CACF,CAAC;IAEF,MAAM,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAClD,KAAK,EAAE,CAAC,wBAAwB,CAAC;KAClC,CAAC,CAAC,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AE,OAAO;IACf,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,oBAAoB,GAAG,CAAC,OAAO,EAAE,CAAC;CACzD,CAAC,CAAC;AAEH,GAAG,CAAC,UAAU,cAAc,2CAA2C,CAAC,CAAC;AAEzE,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAQ,EAAE;IACxC,GAAG,CAAC,GAAG,MAAM,oBAAoB,CAAC,CAAC;IACnC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CACjB,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EACrB,CAAC,GAAY,EAAE,EAAE;QACf,GAAG,CAAC,iBAAiB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC"} |
+9
-3
@@ -5,3 +5,3 @@ { | ||
| "display_name": "Page2AI — Web to Markdown", | ||
| "version": "0.1.2", | ||
| "version": "0.2.1", | ||
| "description": "Convert any web page or HTML string to clean Markdown for LLM context", | ||
@@ -41,3 +41,5 @@ "long_description": "Page2AI MCP converts web pages to Markdown optimized for AI context windows. Extracts main content using DOM-position-aware dedup, preserves code blocks with language hints, converts tables and lists, and strips navigation, ads, and cookie banners. Works offline against local HTML strings or online against URLs. Zero external API calls in v0.1 — pure Node + linkedom.\n\nCompanion to the Page2AI Chrome extension. Shares the same extraction core (@page2ai/core) with the browser extension available at https://github.com/igorsaevets/page2ai-extension.", | ||
| "command": "node", | ||
| "args": ["${__dirname}/dist/index.js"] | ||
| "args": [ | ||
| "${__dirname}/dist/index.js" | ||
| ] | ||
| } | ||
@@ -53,3 +55,7 @@ }, | ||
| "claude_desktop": ">=1.0.0", | ||
| "platforms": ["darwin", "win32", "linux"], | ||
| "platforms": [ | ||
| "darwin", | ||
| "win32", | ||
| "linux" | ||
| ], | ||
| "runtimes": { | ||
@@ -56,0 +62,0 @@ "node": ">=18.0.0" |
+2
-2
| { | ||
| "name": "@page2ai/mcp", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "mcpName": "io.github.igorsaevets/page2ai-mcp", | ||
@@ -38,3 +38,3 @@ "description": "MCP server that converts any web page URL to clean Markdown for LLM context. Zero external API calls, SSRF-guarded, 100% local.", | ||
| "@modelcontextprotocol/server": "^2.0.0", | ||
| "@page2ai/core": "^0.1.0", | ||
| "@page2ai/core": "^0.1.2", | ||
| "zod": "^4.2.0" | ||
@@ -41,0 +41,0 @@ }, |
+13
-3
@@ -154,10 +154,20 @@ # @page2ai/mcp — Web to Markdown for LLM Context | ||
| - GitHub issues: https://github.com/igorsaevets/page2ai-mcp/issues | ||
| - Docs: https://igorsaevets.github.io/page2ai-docs/mcp/ | ||
| Pick the channel by what you have, not by what is quickest to type: | ||
| | You have | Use | | ||
| |---|---| | ||
| | 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 | | ||
| | 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 | | ||
| | A usage question | [Docs](https://igorsaevets.github.io/page2ai-docs/mcp/) first, then an issue | | ||
| ## About the author | ||
| Written and maintained by **Igor Saevets** — AI expert and founder of Page2AI. Full bio and social links: [igorsaevets.github.io/page2ai-docs/about/](https://igorsaevets.github.io/page2ai-docs/about/). | ||
| Written and maintained by **Igor Saevets** — AI expert and founder of Page2AI. Full bio: | ||
| [igorsaevets.github.io/page2ai-docs/about/](https://igorsaevets.github.io/page2ai-docs/about/). | ||
| These are identity and collaboration links, not the support queue. A bug reported in a DM is a bug | ||
| nobody else can find later, so anything you want fixed belongs in the table above. | ||
| - LinkedIn: [linkedin.com/in/igorsaevets](https://www.linkedin.com/in/igorsaevets/) | ||
| - Facebook: [facebook.com/igorsaevets](https://www.facebook.com/igorsaevets/) | ||
| - GitHub: [github.com/igorsaevets](https://github.com/igorsaevets) | ||
@@ -164,0 +174,0 @@ - ORCID: [0009-0006-8636-1377](https://orcid.org/0009-0006-8636-1377) |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
35613
9.57%324
8.72%202
5.21%1
Infinity%Updated