nectr-mcp 0.4.0 → 0.4.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/README.md +1 -1
- package/dist/client.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Node.js 20 or newer is required.
|
|
|
50
50
|
| Size | Words and estimated tokens of the whole page as markdown, against the raw HTML an agent receives, and the words left without JavaScript |
|
|
51
51
|
| robots.txt | Whether GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, PerplexityBot, Google-Extended and CCBot may fetch the page |
|
|
52
52
|
| Linked PDFs | Up to 3 PDFs on the same site: pages, words, and whether there's a text layer at all |
|
|
53
|
-
| Only with JavaScript | The share of words an agent misses without JavaScript, and the first 10 of those blocks |
|
|
53
|
+
| Only with JavaScript | The share of words an agent misses without JavaScript, and the first 10 of those blocks. For a page that isn't on your verified sites, nectr sends only the first 5, shortened, so the tool doesn't count them |
|
|
54
54
|
| Markdown | The page as markdown, last, and only for a page on one of your verified sites; otherwise the tool says it was left out and points to `list_sites`. `markdown` picks `"full"` (after JavaScript runs, the default), `"without_javascript"` or `"none"`. It's cut at 40,000 characters unless you raise `max_chars` |
|
|
55
55
|
|
|
56
56
|
Any public page can be scanned. The tool is read-only: nectr stores nothing from a scan. nectr honours the site's robots.txt for itself, so a page whose robots.txt keeps nectr out isn't fetched.
|
package/dist/client.js
CHANGED
|
@@ -41,7 +41,7 @@ export class NectrRedirectError extends Error {
|
|
|
41
41
|
this.name = "NectrRedirectError";
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const USER_AGENT = "nectr-mcp/0.4.
|
|
44
|
+
const USER_AGENT = "nectr-mcp/0.4.1";
|
|
45
45
|
// A scan fetches the page twice (a browser and plain HTTP) and checks linked
|
|
46
46
|
// PDFs, so it can take a while.
|
|
47
47
|
const TIMEOUT_MS = 90_000;
|
package/dist/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { registerTools } from "./tools.js";
|
|
3
|
-
export const VERSION = "0.4.
|
|
3
|
+
export const VERSION = "0.4.1";
|
|
4
4
|
export function createServer(client) {
|
|
5
5
|
const server = new McpServer({ name: "nectr", version: VERSION });
|
|
6
6
|
registerTools(server, client);
|
package/dist/tools.js
CHANGED
|
@@ -56,10 +56,15 @@ function onlyWithJavaScript(scan) {
|
|
|
56
56
|
const share = Math.round(scan.missing_word_share * 100);
|
|
57
57
|
const shown = blocks.slice(0, JS_BLOCKS_SHOWN).map((b) => `- ${b.replace(/\s+/g, " ").trim()}`);
|
|
58
58
|
const more = blocks.length > JS_BLOCKS_SHOWN ? [`- …and ${blocks.length - JS_BLOCKS_SHOWN} more.`] : [];
|
|
59
|
+
// Without the markdown, nectr sends only the first few blocks, shortened,
|
|
60
|
+
// so their number isn't the page's; the share still is.
|
|
61
|
+
const which = scan.markdown_included
|
|
62
|
+
? `, in ${plural(blocks.length, "block")}. An agent that doesn't run JavaScript misses them:`
|
|
63
|
+
: ". An agent that doesn't run JavaScript misses them. The first few blocks, shortened " +
|
|
64
|
+
"(the full list comes with the markdown, for the site's owner):";
|
|
59
65
|
return [
|
|
60
66
|
"## Only with JavaScript",
|
|
61
|
-
`${share}% of the page's words appear only after JavaScript runs
|
|
62
|
-
"An agent that doesn't run JavaScript misses them:",
|
|
67
|
+
`${share}% of the page's words appear only after JavaScript runs${which}`,
|
|
63
68
|
...shown,
|
|
64
69
|
...more,
|
|
65
70
|
];
|