@arabold/docs-mcp-server 2.2.0 → 2.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/README.md +14 -0
- package/dist/index.js +1 -1
- package/dist/{main-B6iwx1JH.js → main-DPijzQ1K.js} +428 -121
- package/dist/main-DPijzQ1K.js.map +1 -0
- package/package.json +1 -1
- package/dist/main-B6iwx1JH.js.map +0 -1
package/README.md
CHANGED
|
@@ -46,6 +46,12 @@ For agents and scripts, the CLI is usually the simplest way to use Grounded Docs
|
|
|
46
46
|
npx @arabold/docs-mcp-server@latest scrape react https://react.dev/reference/react
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
For hash-routed SPA docs sites, enable hash preservation explicitly:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx @arabold/docs-mcp-server@latest scrape my-spa https://docs.example.com/#/guide --preserve-hashes
|
|
53
|
+
```
|
|
54
|
+
|
|
49
55
|
**2. Query the index:**
|
|
50
56
|
|
|
51
57
|
```bash
|
|
@@ -97,6 +103,9 @@ npx @arabold/docs-mcp-server@latest
|
|
|
97
103
|
|
|
98
104
|
See **[Connecting Clients](docs/guides/mcp-clients.md)** for VS Code (Cline, Roo) and other setup options.
|
|
99
105
|
|
|
106
|
+
`scrape_docs` also accepts `preserveHashes: true` for documentation sites that use hash-based client-side routing.
|
|
107
|
+
Use it only for hash-routed SPAs; normal sites typically use hash fragments for in-page anchors.
|
|
108
|
+
|
|
100
109
|
<details>
|
|
101
110
|
<summary>Alternative: Run with Docker</summary>
|
|
102
111
|
|
|
@@ -135,6 +144,11 @@ See **[Embedding Models](docs/guides/embedding-models.md)** for configuring **Ol
|
|
|
135
144
|
- **[Supported Formats](docs/concepts/supported-formats.md)**: Complete file format and MIME type reference.
|
|
136
145
|
- **[Embedding Models](docs/guides/embedding-models.md)**: Configure OpenAI, Ollama, Gemini, and other providers.
|
|
137
146
|
|
|
147
|
+
### Hash-Routed SPAs
|
|
148
|
+
- Use `--preserve-hashes`, MCP `preserveHashes`, or the Web UI "Preserve Hash Routes" checkbox only for docs sites that route with URLs like `#/guide`.
|
|
149
|
+
- When enabled with `scrapeMode=fetch`, the scraper automatically upgrades the job to Playwright because plain fetch cannot evaluate client-side hash routes.
|
|
150
|
+
- Refresh reuses the stored `preserveHashes` setting by default, and CLI/Web refresh entrypoints can override it explicitly.
|
|
151
|
+
|
|
138
152
|
### Key Concepts & Architecture
|
|
139
153
|
- **[Deployment Modes](docs/infrastructure/deployment-modes.md)**: Standalone vs. Distributed (Docker Compose).
|
|
140
154
|
- **[Authentication](docs/infrastructure/authentication.md)**: Securing your server with OAuth2/OIDC.
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { s as sanitizeEnvironment, l as logger } from "./logger-CLtABTNb.js";
|
|
|
4
4
|
process.setSourceMapsEnabled(true);
|
|
5
5
|
sanitizeEnvironment();
|
|
6
6
|
const [{ runCli }, { ensurePlaywrightBrowsersInstalled }] = await Promise.all([
|
|
7
|
-
import("./main-
|
|
7
|
+
import("./main-DPijzQ1K.js"),
|
|
8
8
|
import("./utils-ntayxPjd.js").then((n) => n.u)
|
|
9
9
|
]);
|
|
10
10
|
ensurePlaywrightBrowsersInstalled();
|