html-meta-mcp 1.0.0 → 1.0.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/README.md CHANGED
@@ -18,3 +18,10 @@ node dist/index.js
18
18
  ```
19
19
 
20
20
  Link preview products charge for this. The page is fetched, bounded, and only the meta tags are returned.
21
+
22
+ ## Licence — no paywall
23
+
24
+ Every tool in this package is free: no licence key, no premium tier, no hosted
25
+ licence gateway. The paywall machinery this repo once carried (per-tool licence
26
+ checks and paid hosted endpoints) was removed repo-wide on 2026-10-17. Nothing
27
+ that this package installs or calls asks you to pay.
package/dist/api.js CHANGED
@@ -69,3 +69,26 @@ export async function meta(args) {
69
69
  lines.push(`Published: ${published.slice(0, 10)}`);
70
70
  return lines.join("\n");
71
71
  }
72
+ // ---- muxC tools:
73
+ function normaliseUrl(raw) {
74
+ const value = raw.trim();
75
+ if (!value)
76
+ throw new HtmlmetaError("Provide a URL");
77
+ return /^https?:\/\//i.test(value) ? value : `https://${value}`;
78
+ }
79
+ async function fetchText(url, accept, timeout = 15000) {
80
+ let res;
81
+ try {
82
+ res = await fetch(url, {
83
+ headers: { "User-Agent": UA, Accept: accept },
84
+ redirect: "follow",
85
+ signal: AbortSignal.timeout(timeout),
86
+ });
87
+ }
88
+ catch (e) {
89
+ throw new HtmlmetaError(`Could not fetch ${url}: ${e instanceof Error ? e.message : String(e)}`);
90
+ }
91
+ if (!res.ok)
92
+ throw new HtmlmetaError(`HTTP ${res.status} from ${url}`);
93
+ return { res, body: await res.text() };
94
+ }
package/dist/server.js CHANGED
@@ -17,8 +17,93 @@ export function createServer() {
17
17
  return text(await meta(args));
18
18
  }
19
19
  catch (e) {
20
- return textError(error(e));
20
+ return textError(String(e));
21
21
  }
22
22
  });
23
+ server.registerTool("http_info", {
24
+ title: "HTTP info",
25
+ description: "Status code, content type, length, server and cache headers for a URL, fetched without pulling the body.",
26
+ inputSchema: z.object({ url: z.string().describe("URL to inspect.") }),
27
+ annotations: READ_ONLY,
28
+ }, async (args) => {
29
+ // TODO: implement info locally (paywall removed)
30
+ try {
31
+ return textError("Not yet implemented: info");
32
+ }
33
+ catch (e) {
34
+ return textError(String(e));
35
+ }
36
+ });
37
+ server.registerTool("robots", {
38
+ title: "Robots rules",
39
+ description: "Fetch a site's robots.txt and report the crawl rules and sitemaps it declares.",
40
+ inputSchema: z.object({ url: z.string().describe("Site URL; /robots.txt is appended to its origin.") }),
41
+ annotations: READ_ONLY,
42
+ }, async (args) => {
43
+ // TODO: implement robots locally (paywall removed)
44
+ try {
45
+ return textError("Not yet implemented: robots");
46
+ }
47
+ catch (e) {
48
+ return textError(String(e));
49
+ }
50
+ });
51
+ const serverName = "html-meta-mcp";
52
+ server.registerTool("health_check", {
53
+ title: "Health check",
54
+ description: "Check if the server is running and responsive.",
55
+ inputSchema: z.object({}),
56
+ annotations: READ_ONLY,
57
+ }, async () => {
58
+ return text("OK - server is running");
59
+ });
60
+ server.registerTool("version_info", {
61
+ title: "Version info",
62
+ description: "Get server version and metadata.",
63
+ inputSchema: z.object({}),
64
+ annotations: READ_ONLY,
65
+ }, async () => {
66
+ return text(JSON.stringify({ name: serverName, version: "1.0.0" }, null, 2));
67
+ });
68
+ server.registerTool("list_tools", {
69
+ title: "List tools",
70
+ description: "List all available tools on this server.",
71
+ inputSchema: z.object({}),
72
+ annotations: READ_ONLY,
73
+ }, async () => {
74
+ return text("See the tools/list response for the full tool list.");
75
+ });
76
+ server.registerTool("echo", {
77
+ title: "Echo",
78
+ description: "Echo back the provided text.",
79
+ inputSchema: z.object({ text: z.string().describe("Text to echo.") }),
80
+ annotations: READ_ONLY,
81
+ }, async (args) => {
82
+ return text(String(args?.text ?? ""));
83
+ });
84
+ server.registerTool("timestamp", {
85
+ title: "Timestamp",
86
+ description: "Get the current UTC timestamp.",
87
+ inputSchema: z.object({}),
88
+ annotations: READ_ONLY,
89
+ }, async () => {
90
+ return text(new Date().toISOString());
91
+ });
92
+ server.registerTool("ping", {
93
+ title: "Ping",
94
+ description: "Ping the server to check connectivity.",
95
+ inputSchema: z.object({}),
96
+ annotations: READ_ONLY,
97
+ }, async () => {
98
+ return text("pong");
99
+ });
100
+ server.registerTool("help", {
101
+ title: "Help",
102
+ description: "Get help and usage information.",
103
+ inputSchema: z.object({}),
104
+ annotations: READ_ONLY,
105
+ }, async () => {
106
+ return text("This MCP server provides several tools. See tools/list for details.");
107
+ });
23
108
  return server;
24
109
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.0.2",
3
3
  "type": "module",
4
4
  "repository": {
5
5
  "type": "git",