@page2ai/mcp 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html); while the
6
6
  major version is `0`, a minor bump may carry breaking changes.
7
7
 
8
+ ## 0.2.1 - 2026-08-02
9
+
10
+ ### Fixed
11
+ - Pages built with a card grid lost almost all of their content. `@page2ai/core` chose the
12
+ conversion root with the FIRST `<article>` in document order, and HTML5 allows that tag on any
13
+ self-contained component, so a decorative card outranked the page. `docs.astro.build` returned
14
+ 208 characters of body where it now returns 3,494; `blog.cloudflare.com` returned 927 where it
15
+ now returns 15,068. An `<article>` is now used only when it carries at least half its
16
+ container's content text. Requires `@page2ai/core` 0.1.2.
17
+ - The server reported the wrong version over the wire. `SERVER_VERSION` was a hardcoded constant
18
+ beside `package.json` and `manifest.json`, and it drifted on the first release after it was
19
+ written. It is now read from `package.json`, with a fallback so a missing file can never stop
20
+ the server from starting.
21
+
8
22
  ## [0.2.0] - 2026-07-29
9
23
 
10
24
  Adopts MCP protocol revision **2026-07-28**, published 2026-07-28, one day after the
package/README.md CHANGED
@@ -151,14 +151,24 @@ npx @modelcontextprotocol/inspector node dist/index.js
151
151
 
152
152
  ## Support
153
153
 
154
- - GitHub issues: https://github.com/igorsaevets/page2ai-mcp/issues
155
- - Docs: https://igorsaevets.github.io/page2ai-docs/mcp/
154
+ Pick the channel by what you have, not by what is quickest to type:
155
+
156
+ | You have | Use |
157
+ |---|---|
158
+ | 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 |
159
+ | 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 |
160
+ | A usage question | [Docs](https://igorsaevets.github.io/page2ai-docs/mcp/) first, then an issue |
156
161
 
157
162
  ## About the author
158
163
 
159
- 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/).
164
+ Written and maintained by **Igor Saevets** — AI expert and founder of Page2AI. Full bio:
165
+ [igorsaevets.github.io/page2ai-docs/about/](https://igorsaevets.github.io/page2ai-docs/about/).
166
+
167
+ These are identity and collaboration links, not the support queue. A bug reported in a DM is a bug
168
+ nobody else can find later, so anything you want fixed belongs in the table above.
160
169
 
161
170
  - LinkedIn: [linkedin.com/in/igorsaevets](https://www.linkedin.com/in/igorsaevets/)
171
+ - Facebook: [facebook.com/igorsaevets](https://www.facebook.com/igorsaevets/)
162
172
  - GitHub: [github.com/igorsaevets](https://github.com/igorsaevets)
163
173
  - ORCID: [0009-0006-8636-1377](https://orcid.org/0009-0006-8636-1377)
164
174
  - Email: igorsaevets@gmail.com
package/dist/index.js CHANGED
@@ -11,11 +11,31 @@
11
11
  // that probe with `server/discover` get the 2026-07-28 era. Wiring a `Server`
12
12
  // straight to a `StdioServerTransport` — as this file did through v0.1.2 —
13
13
  // serves only the 2025 era no matter which SDK version is installed.
14
+ import { readFileSync } from 'node:fs';
15
+ import { fileURLToPath } from 'node:url';
14
16
  import { serveStdio } from '@modelcontextprotocol/server/stdio';
15
17
  import { Server } from '@modelcontextprotocol/server';
16
18
  import { handlePageToMarkdown, pageToMarkdownDefinition } from './tools/page-to-markdown.js';
17
19
  const SERVER_NAME = 'page2ai-mcp';
18
- const SERVER_VERSION = '0.2.0';
20
+ // Read the version from package.json instead of restating it here.
21
+ //
22
+ // This used to be `const SERVER_VERSION = '0.2.0'`, a third source of truth beside
23
+ // package.json and manifest.json, kept in sync by remembering to. It drifted on the very next
24
+ // release: 0.2.1 shipped while the running server still introduced itself over the wire as
25
+ // 0.2.0, so a client asking what it was talking to got the wrong answer and nothing failed.
26
+ //
27
+ // Wrapped because a version string is not worth crashing a server over: if the layout ever
28
+ // changes and the file is not where dist/index.js expects it, an unknown version is a far
29
+ // better outcome than a server that will not start.
30
+ const SERVER_VERSION = (() => {
31
+ try {
32
+ const pkgPath = fileURLToPath(new URL('../package.json', import.meta.url));
33
+ return JSON.parse(readFileSync(pkgPath, 'utf8')).version || '0.0.0-unknown';
34
+ }
35
+ catch {
36
+ return '0.0.0-unknown';
37
+ }
38
+ })();
19
39
  // Log to stderr — stdio transport uses stdout for JSON-RPC frames, so anything
20
40
  // written to stderr is safe (Claude Desktop logs it to the debug console).
21
41
  const log = (msg) => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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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AAE,IAAI,EAAE,iBAAiB,QAAQ,EAAE,EAAE,CAAC;SACxE,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,EAAE;IACrC,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,EAAE,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"}
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "page2ai-mcp",
4
4
  "display_name": "Page2AI — Web to Markdown",
5
- "version": "0.1.2",
5
+ "version": "0.2.1",
6
6
  "description": "Convert any web page or HTML string to clean Markdown for LLM context",
7
7
  "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.",
8
8
  "author": {
@@ -37,7 +37,9 @@
37
37
  "entry_point": "dist/index.js",
38
38
  "mcp_config": {
39
39
  "command": "node",
40
- "args": ["${__dirname}/dist/index.js"]
40
+ "args": [
41
+ "${__dirname}/dist/index.js"
42
+ ]
41
43
  }
42
44
  },
43
45
  "tools": [
@@ -48,7 +50,11 @@
48
50
  ],
49
51
  "compatibility": {
50
52
  "claude_desktop": ">=1.0.0",
51
- "platforms": ["darwin", "win32", "linux"],
53
+ "platforms": [
54
+ "darwin",
55
+ "win32",
56
+ "linux"
57
+ ],
52
58
  "runtimes": {
53
59
  "node": ">=18.0.0"
54
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@page2ai/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "mcpName": "io.github.igorsaevets/page2ai-mcp",
5
5
  "description": "MCP server that converts any web page URL to clean Markdown for LLM context. Zero external API calls, SSRF-guarded, 100% local.",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@modelcontextprotocol/server": "^2.0.0",
38
- "@page2ai/core": "^0.1.0",
38
+ "@page2ai/core": "^0.1.2",
39
39
  "zod": "^4.2.0"
40
40
  },
41
41
  "devDependencies": {