@aiquants/html-to-markdown 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/README.md +11 -12
  2. package/package.json +5 -4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @aiquants/html-to-markdown
2
2
 
3
- A tool to dynamically fetch a web page from a given URL and convert it to Markdown. <!-- Now with Model Context Protocol (MCP) server support! -->
3
+ A tool to dynamically fetch a web page from a given URL and convert it to Markdown. Now with Model Context Protocol (MCP) server support!
4
4
 
5
5
  This tool fetches the fully rendered HTML after JavaScript execution and converts it to Markdown. It supports complex pages, including footnotes and table structures.
6
6
 
@@ -10,9 +10,9 @@ This tool fetches the fully rendered HTML after JavaScript execution and convert
10
10
  - **High-Fidelity Conversion**: Performs powerful AST (Abstract Syntax Tree)-based conversion using `rehype` and `remark`.
11
11
  - **Preserves Table Content**: Retains HTML tags within table cells (`<td>`, `<th>`) as much as possible to maintain rich formatting.
12
12
  - **Link Normalization**: Automatically converts relative links on the page to absolute links to prevent broken links.
13
- - **Multiple Interfaces**: Usable as a Node.js library and command-line tool. <!-- and MCP server. -->
14
- <!-- - **MCP Server Support**: Provides Model Context Protocol server functionality for AI assistants. -->
15
- <!-- - **Streamable MCP Support**: Supports streamable MCP protocols for real-time progress updates. -->
13
+ - **Multiple Interfaces**: Usable as a Node.js library, command-line tool, and MCP server.
14
+ - **MCP Server Support**: Provides Model Context Protocol server functionality for AI assistants.
15
+ - **Streamable MCP Support**: Supports streamable MCP protocols for real-time progress updates.
16
16
 
17
17
  ## Installation
18
18
 
@@ -75,7 +75,7 @@ async function main() {
75
75
  main();
76
76
  ```
77
77
 
78
- <!-- ### As an MCP Server
78
+ ### As an MCP Server
79
79
 
80
80
  This package can be used as a Model Context Protocol (MCP) server, allowing AI assistants and MCP-compatible applications to convert web pages to Markdown.
81
81
 
@@ -88,14 +88,14 @@ This package can be used as a Model Context Protocol (MCP) server, allowing AI a
88
88
  "html-to-md": {
89
89
  "command": "npx",
90
90
  "args": [
91
- "@aiquants/html-to-markdown",
92
- "mcp"
91
+ "aiq-html2md-mcp"
93
92
  ],
94
93
  "type": "stdio"
95
94
  },
96
95
  "html-to-md-streamable": {
97
96
  "url": "http://127.0.0.1:4001/mcp",
98
- "type": "http"
97
+ "type": "http",
98
+ "_comment": "Note: You need to start the streamable MCP server separately using 'npx aiq-html2md-mcp-stream'"
99
99
  }
100
100
  }
101
101
  ```
@@ -107,7 +107,7 @@ This package can be used as a Model Context Protocol (MCP) server, allowing AI a
107
107
  "mcpServers": {
108
108
  "html-to-markdown": {
109
109
  "command": "npx",
110
- "args": ["@aiquants/html-to-markdown", "mcp"],
110
+ "args": ["aiq-html2md-mcp"],
111
111
  "description": "Convert HTML content from URLs to Markdown format"
112
112
  }
113
113
  }
@@ -119,14 +119,14 @@ This package can be used as a Model Context Protocol (MCP) server, allowing AI a
119
119
  ```bash
120
120
  # Start the streamable MCP server (requires global installation)
121
121
  npm install -g @aiquants/html-to-markdown
122
- html-to-markdown-mcp-streamable
122
+ aiq-html2md-mcp-stream
123
123
  ```
124
124
 
125
125
  Alternatively, you can use npx to run without global installation:
126
126
 
127
127
  ```bash
128
128
  # Using npx with the streamable server binary
129
- npx @aiquants/html-to-markdown html-to-markdown-mcp-streamable
129
+ npx aiq-html2md-mcp-stream
130
130
  ```
131
131
 
132
132
  #### MCP Tools Available
@@ -151,7 +151,6 @@ await mcpServer.start(8000); // Port 8000
151
151
  const streamableMcpServer = createStreamableMcpServer();
152
152
  await streamableMcpServer.start(8000); // Port 8000
153
153
  ```
154
- -->
155
154
 
156
155
  ## API
157
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/html-to-markdown",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "HTML to Markdown converter",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,9 +13,9 @@
13
13
  }
14
14
  },
15
15
  "bin": {
16
- "html-to-markdown": "./dist/main.js",
17
- "html-to-markdown-mcp": "./dist/mcp.js",
18
- "html-to-markdown-mcp-streamable": "./dist/mcp-streamable.js"
16
+ "aiq-html2md": "./dist/main.js",
17
+ "aiq-html2md-mcp": "./dist/mcp.js",
18
+ "aiq-html2md-mcp-stream": "./dist/mcp-streamable.js"
19
19
  },
20
20
  "files": [
21
21
  "dist",
@@ -29,6 +29,7 @@
29
29
  "debug": "NODE_OPTIONS='--enable-source-maps' vite-node --inspect-brk=9229 main.ts --",
30
30
  "start": "vite-node main.ts",
31
31
  "build": "vite build",
32
+ "prepublishOnly": "npm run build",
32
33
  "lint": "biome lint app/",
33
34
  "format": "biome format --write",
34
35
  "check": "biome check --fix src/",