@page2ai/mcp 0.2.0 → 0.2.2
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 +24 -0
- package/README.md +13 -3
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/manifest.json +9 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ 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.2 - 2026-08-02
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Requires `@page2ai/core` 0.1.4, which closes three holes an external review panel found in the
|
|
12
|
+
0.1.2 content-root fix. None was found by testing; all three were predicted from the diff and
|
|
13
|
+
then reproduced. The worst: pages with no `<main>` at all still hit the original bug, so a card
|
|
14
|
+
grid inside `<div class="sl-main">` returned 32 characters for the whole page. Also: a page
|
|
15
|
+
whose content is a form lost its article to an unrelated sidebar card, and a real post under a
|
|
16
|
+
large related-posts rail was demoted in favour of the rail.
|
|
17
|
+
|
|
18
|
+
## 0.2.1 - 2026-08-02
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- Pages built with a card grid lost almost all of their content. `@page2ai/core` chose the
|
|
22
|
+
conversion root with the FIRST `<article>` in document order, and HTML5 allows that tag on any
|
|
23
|
+
self-contained component, so a decorative card outranked the page. `docs.astro.build` returned
|
|
24
|
+
208 characters of body where it now returns 3,494; `blog.cloudflare.com` returned 927 where it
|
|
25
|
+
now returns 15,068. An `<article>` is now used only when it carries at least half its
|
|
26
|
+
container's content text. Requires `@page2ai/core` 0.1.2.
|
|
27
|
+
- The server reported the wrong version over the wire. `SERVER_VERSION` was a hardcoded constant
|
|
28
|
+
beside `package.json` and `manifest.json`, and it drifted on the first release after it was
|
|
29
|
+
written. It is now read from `package.json`, with a fallback so a missing file can never stop
|
|
30
|
+
the server from starting.
|
|
31
|
+
|
|
8
32
|
## [0.2.0] - 2026-07-29
|
|
9
33
|
|
|
10
34
|
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
|
-
|
|
155
|
-
|
|
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
|
|
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
|
-
|
|
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;
|
|
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,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,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;AAElC,mEAAmE;AACnE,EAAE;AACF,mFAAmF;AACnF,8FAA8F;AAC9F,2FAA2F;AAC3F,4FAA4F;AAC5F,EAAE;AACF,2FAA2F;AAC3F,0FAA0F;AAC1F,oDAAoD;AACpD,MAAM,cAAc,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cp",
|
|
4
4
|
"display_name": "Page2AI — Web to Markdown",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.2",
|
|
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": [
|
|
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": [
|
|
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.
|
|
3
|
+
"version": "0.2.2",
|
|
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.
|
|
38
|
+
"@page2ai/core": "^0.1.4",
|
|
39
39
|
"zod": "^4.2.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|