@j0hanz/fetch-url-mcp 1.11.8 → 1.12.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 j0hanz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,28 +6,36 @@
6
6
 
7
7
  [![Add to LM Studio](https://files.lmstudio.ai/deeplink/mcp-install-light.svg)](https://lmstudio.ai/install-mcp?name=fetch-url&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmV0Y2gtdXJsLW1jcEBsYXRlc3QiXX0%3D) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=fetch-url&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqMGhhbnovZmV0Y2gtdXJsLW1jcEBsYXRlc3QiXX0%3D) [![Install in Goose](https://block.github.io/goose/img/extension-install-dark.svg)](https://block.github.io/goose/extension?cmd=npx&arg=-y&arg=%40j0hanz%2Ffetch-url-mcp%40latest&id=%40j0hanz%2Ffetch-url-mcp&name=fetch-url&description=fetch-url%20MCP%20server)
8
8
 
9
- A web content fetcher MCP server that converts HTML to clean, AI and human readable markdown.
9
+ An MCP server that fetches web pages and converts them to clean, readable Markdown.
10
10
 
11
11
  ## Overview
12
12
 
13
- The Fetch URL MCP Server provides a standardized interface for fetching public web content and transforming it into Markdown enriched with structured metadata. It validates URLs and applies noise removal heuristics. The server supports both inline and task-based execution modes, making it suitable for a wide range of client applications and LLM interactions.
13
+ This server takes a URL, fetches the page, and strips away everything you don't need navigation, sidebars, banners, scripts leaving just the main content as Markdown. It's perfect for feeding into LLMs, giving them the distilled essence of a page without the noise. It also recognizes GitHub, GitLab, Bitbucket, and Gist URLs and rewrites them to fetch the raw content directly.
14
+
15
+ By default it runs over stdio. Pass `--http` if you need a proper HTTP endpoint with auth, rate limiting, TLS, and session support.
14
16
 
15
17
  ## Key Features
16
18
 
17
- - `fetch-url` validates public HTTP(S) URLs, fetches the page, and returns cleaned Markdown plus structured metadata.
18
- - The tool advertises optional task support and emits progress updates while fetching and transforming larger pages.
19
- - GitHub, GitLab, Bitbucket, and Gist page URLs are rewritten to raw-content endpoints when possible before fetch.
20
- - `internal://instructions` exposes built-in guidance as an MCP resource.
21
- - HTTP mode adds host/origin validation, auth, rate limiting, health checks, OAuth protected-resource metadata, and session-bound URLs.
19
+ - **HTML to Markdown** Turns any public web page into clean, readable Markdown with metadata like `title`, `url`, `contentSize`, and `truncated`.
20
+ - **Smart URL handling** Recognizes GitHub, GitLab, Bitbucket, and Gist page URLs and rewrites them to raw-content endpoints before fetching.
21
+ - **Task mode** Big or slow pages can run as async MCP tasks with progress updates, instead of blocking.
22
+ - **Self-documenting** — Includes an `internal://instructions` resource and a `get-help` prompt so clients know how to use it.
23
+ - **HTTP mode** Optionally serves over Streamable HTTP with host/origin validation, bearer or OAuth auth, rate limiting, health checks, and TLS.
24
+
25
+ ## Web Client
26
+
27
+ A browser-based client is available if you want to use the server without any MCP setup.
28
+
29
+ **[Live app](https://fetch-url-client.vercel.app)** · [Source code](https://github.com/j0hanz/fetch-url)
22
30
 
23
31
  ## Requirements
24
32
 
25
- - Node.js >=24 (from `package.json`)
26
- - Docker is optional if you want to run the published container image.
33
+ - **Node.js** >= 24
34
+ - **Docker** (optional) — only needed if you want to run the container image
27
35
 
28
36
  ## Quick Start
29
37
 
30
- Use this standard MCP client configuration:
38
+ Add this to your MCP client config:
31
39
 
32
40
  ```json
33
41
  {
@@ -474,9 +482,9 @@ For more info, see [Kilo Code docs](https://kilocode.ai/docs).
474
482
 
475
483
  ## Use Cases
476
484
 
477
- - Fetch documentation pages, blog posts, or reference material into Markdown before sending them to an LLM.
478
- - Retrieve repository-hosted content from GitHub, GitLab, Bitbucket, or Gists and let the server rewrite page URLs to raw endpoints when possible.
479
- - Use task mode for large pages or slower sites when the fetch might otherwise be delayed, cancelled, or better handled asynchronously.
485
+ - **Documentation for LLMs** — Grab a docs page, blog post, or reference article as Markdown and pass it straight into a context window.
486
+ - **Repository content** Hand it a GitHub, GitLab, or Bitbucket URL and it resolves the raw content endpoint. Works with Gists too.
487
+ - **Slow or large pages** Task mode lets big fetches run in the background while sending progress updates back to the client.
480
488
 
481
489
  ## Architecture
482
490
 
@@ -522,13 +530,13 @@ For more info, see [Kilo Code docs](https://kilocode.ai/docs).
522
530
 
523
531
  #### `fetch-url`
524
532
 
525
- Fetch public webpages and convert HTML into AI-readable Markdown. The tool is read-only, does not execute page JavaScript, and supports optional task mode for larger or slower fetches.
533
+ Takes a URL and returns Markdown. Read-only no JavaScript execution. Supports running as a background MCP task for large or slow pages.
526
534
 
527
535
  | Parameter | Type | Required | Description |
528
536
  | --------- | -------- | -------- | --------------------------- |
529
537
  | `url` | `string` | yes | Target URL. Max 2048 chars. |
530
538
 
531
- The response is returned as MCP text content and, when validation succeeds, as `structuredContent` containing `url`, `resolvedUrl`, `finalUrl`, `title`, `metadata`, `markdown`, `fetchedAt`, `contentSize`, and `truncated`. A `truncated: true` result means the content hit server-enforced fetch or inline limits.
539
+ You get text content back by default. If output validation passes, the response also includes `structuredContent` with typed fields: `url`, `resolvedUrl`, `finalUrl`, `title`, `metadata`, `markdown`, `fetchedAt`, `contentSize`, and `truncated`. A `true` value for `truncated` means the content hit a server-side size limit.
532
540
 
533
541
  ```text
534
542
  1. [Client] -- tools/call {name: "fetch-url", arguments} --> [Server]
@@ -572,57 +580,101 @@ The response is returned as MCP text content and, when validation succeeds, as `
572
580
 
573
581
  ### Structured Output
574
582
 
575
- - `fetch-url` publishes an explicit `outputSchema` and returns `structuredContent` when the assembled response passes validation.
583
+ The tool declares an `outputSchema` and includes `structuredContent` in the response when validation passes. Clients that support structured output get typed data directly; the rest use the text fallback.
576
584
 
577
585
  ## Configuration
578
586
 
579
- | Variable | Default | Applies To | Notes |
580
- | ------------------------------------------ | ------------------------- | ----------------- | --------------------------------------------------------------------- |
581
- | `HOST` | `127.0.0.1` | HTTP mode | Bind address. Non-loopback bindings also require `ALLOW_REMOTE=true`. |
582
- | `PORT` | `3000` | HTTP mode | Listening port for `--http`. |
583
- | `ALLOW_REMOTE` | `false` | HTTP mode | Must be enabled to bind to a non-loopback interface. |
584
- | `ACCESS_TOKENS` | unset | HTTP mode | Comma- or space-separated static bearer tokens. |
585
- | `API_KEY` | unset | HTTP mode | Alternate static token source for header auth. |
586
- | `OAUTH_ISSUER_URL` | unset | HTTP mode | Enables OAuth mode when combined with the other OAuth URLs. |
587
- | `OAUTH_AUTHORIZATION_URL` | unset | HTTP mode | Optional explicit authorization endpoint. |
588
- | `OAUTH_TOKEN_URL` | unset | HTTP mode | Optional explicit token endpoint. |
589
- | `OAUTH_REVOCATION_URL` | unset | HTTP mode | Optional OAuth revocation endpoint. |
590
- | `OAUTH_REGISTRATION_URL` | unset | HTTP mode | Optional OAuth dynamic client registration endpoint. |
591
- | `OAUTH_INTROSPECTION_URL` | unset | HTTP mode | Required for OAuth token introspection. |
592
- | `OAUTH_REQUIRED_SCOPES` | empty | HTTP mode | Required scopes enforced after auth. |
593
- | `OAUTH_CLIENT_ID` | unset | HTTP mode | Optional introspection client ID. |
594
- | `OAUTH_CLIENT_SECRET` | unset | HTTP mode | Optional introspection client secret. |
595
- | `SERVER_TLS_KEY_FILE` | unset | HTTP mode | Enable HTTPS when set together with `SERVER_TLS_CERT_FILE`. |
596
- | `SERVER_TLS_CERT_FILE` | unset | HTTP mode | TLS certificate path. |
597
- | `SERVER_TLS_CA_FILE` | unset | HTTP mode | Optional custom CA bundle. |
598
- | `SERVER_MAX_CONNECTIONS` | `0` | HTTP mode | Optional connection cap. |
599
- | `SERVER_HEADERS_TIMEOUT_MS` | unset | HTTP mode | Optional Node server tuning. |
600
- | `SERVER_REQUEST_TIMEOUT_MS` | unset | HTTP mode | Optional Node server tuning. |
601
- | `SERVER_KEEP_ALIVE_TIMEOUT_MS` | unset | HTTP mode | Optional keep-alive tuning. |
602
- | `SERVER_KEEP_ALIVE_TIMEOUT_BUFFER_MS` | unset | HTTP mode | Optional keep-alive tuning buffer. |
603
- | `SERVER_MAX_HEADERS_COUNT` | unset | HTTP mode | Optional header count limit. |
604
- | `SERVER_BLOCK_PRIVATE_CONNECTIONS` | `false` | HTTP mode | Enables inbound private-network protections. |
605
- | `ALLOWED_HOSTS` | empty | HTTP mode | Additional allowed `Host` and `Origin` values. |
606
- | `ALLOW_LOCAL_FETCH` | `false` | Fetching | Allows loopback and private-network fetch targets. |
607
- | `FETCH_TIMEOUT_MS` | `15000` | Fetching | Network fetch timeout in milliseconds. |
608
- | `USER_AGENT` | `fetch-url-mcp/<version>` | Fetching | Override the outbound user agent string. |
609
- | `MAX_INLINE_CONTENT_CHARS` | `0` | Tool output | `0` means no explicit inline truncation limit. |
610
- | `TASKS_MAX_TOTAL` | `5000` | Tasks | Total task capacity. |
611
- | `TASKS_MAX_PER_OWNER` | `1000` | Tasks | Per-owner task cap, clamped to the total cap. |
612
- | `TASKS_STATUS_NOTIFICATIONS` | `false` | Tasks | Enables status notifications for tasks. |
613
- | `TASKS_REQUIRE_INTERCEPTION` | `true` | Tasks | Requires task interception for task-capable tool execution. |
614
- | `TRANSFORM_CANCEL_ACK_TIMEOUT_MS` | `200` | Transform workers | Cancellation acknowledgement timeout. |
615
- | `TRANSFORM_WORKER_MODE` | `threads` | Transform workers | Worker execution mode. |
616
- | `TRANSFORM_WORKER_MAX_OLD_GENERATION_MB` | unset | Transform workers | Optional worker memory limit. |
617
- | `TRANSFORM_WORKER_MAX_YOUNG_GENERATION_MB` | unset | Transform workers | Optional worker memory limit. |
618
- | `TRANSFORM_WORKER_CODE_RANGE_MB` | unset | Transform workers | Optional worker memory limit. |
619
- | `TRANSFORM_WORKER_STACK_MB` | unset | Transform workers | Optional worker stack size. |
620
- | `FETCH_URL_MCP_EXTRA_NOISE_TOKENS` | empty | Content cleanup | Extra noise-removal tokens. |
621
- | `FETCH_URL_MCP_EXTRA_NOISE_SELECTORS` | empty | Content cleanup | Extra DOM selectors for noise removal. |
622
- | `FETCH_URL_MCP_LOCALE` | system default | Content cleanup | Locale override for extraction heuristics. |
623
- | `MARKDOWN_HEADING_KEYWORDS` | built-in list | Markdown cleanup | Override heading keywords used by cleanup. |
624
- | `LOG_LEVEL` | `info` | Logging | `debug`, `info`, `warn`, or `error`. |
625
- | `LOG_FORMAT` | `text` | Logging | Set to `json` for structured logs. |
587
+ All configuration is through environment variables. For basic stdio usage, nothing needs to be set.
588
+
589
+ ### HTTP Server
590
+
591
+ | Variable | Default | Notes |
592
+ | ------------------------------------- | ----------- | --------------------------------------------------------------------- |
593
+ | `HOST` | `127.0.0.1` | Bind address. Non-loopback bindings also require `ALLOW_REMOTE=true`. |
594
+ | `PORT` | `3000` | Listening port for `--http`. |
595
+ | `ALLOW_REMOTE` | `false` | Must be enabled to bind to a non-loopback interface. |
596
+ | `ALLOWED_HOSTS` | empty | Additional allowed `Host` and `Origin` values. |
597
+ | `SERVER_MAX_CONNECTIONS` | `0` | Optional connection cap. |
598
+ | `SERVER_HEADERS_TIMEOUT_MS` | unset | Optional Node server tuning. |
599
+ | `SERVER_REQUEST_TIMEOUT_MS` | unset | Optional Node server tuning. |
600
+ | `SERVER_KEEP_ALIVE_TIMEOUT_MS` | unset | Optional keep-alive tuning. |
601
+ | `SERVER_KEEP_ALIVE_TIMEOUT_BUFFER_MS` | unset | Optional keep-alive tuning buffer. |
602
+ | `SERVER_MAX_HEADERS_COUNT` | unset | Optional header count limit. |
603
+ | `SERVER_BLOCK_PRIVATE_CONNECTIONS` | `false` | Enables inbound private-network protections. |
604
+
605
+ ### Authentication & OAuth
606
+
607
+ | Variable | Default | Notes |
608
+ | ------------------------- | ------- | ----------------------------------------------------------- |
609
+ | `ACCESS_TOKENS` | unset | Comma- or space-separated static bearer tokens. |
610
+ | `API_KEY` | unset | Alternate static token source for header auth. |
611
+ | `OAUTH_ISSUER_URL` | unset | Enables OAuth mode when combined with the other OAuth URLs. |
612
+ | `OAUTH_AUTHORIZATION_URL` | unset | Optional explicit authorization endpoint. |
613
+ | `OAUTH_TOKEN_URL` | unset | Optional explicit token endpoint. |
614
+ | `OAUTH_REVOCATION_URL` | unset | Optional OAuth revocation endpoint. |
615
+ | `OAUTH_REGISTRATION_URL` | unset | Optional OAuth dynamic client registration endpoint. |
616
+ | `OAUTH_INTROSPECTION_URL` | unset | Required for OAuth token introspection. |
617
+ | `OAUTH_REQUIRED_SCOPES` | empty | Required scopes enforced after auth. |
618
+ | `OAUTH_CLIENT_ID` | unset | Optional introspection client ID. |
619
+ | `OAUTH_CLIENT_SECRET` | unset | Optional introspection client secret. |
620
+
621
+ ### TLS
622
+
623
+ | Variable | Default | Notes |
624
+ | ---------------------- | ------- | ----------------------------------------------------------- |
625
+ | `SERVER_TLS_KEY_FILE` | unset | Enable HTTPS when set together with `SERVER_TLS_CERT_FILE`. |
626
+ | `SERVER_TLS_CERT_FILE` | unset | TLS certificate path. |
627
+ | `SERVER_TLS_CA_FILE` | unset | Optional custom CA bundle. |
628
+
629
+ ### Fetching
630
+
631
+ | Variable | Default | Notes |
632
+ | ------------------- | ------------------------- | -------------------------------------------------- |
633
+ | `ALLOW_LOCAL_FETCH` | `false` | Allows loopback and private-network fetch targets. |
634
+ | `FETCH_TIMEOUT_MS` | `15000` | Network fetch timeout in milliseconds. |
635
+ | `USER_AGENT` | `fetch-url-mcp/<version>` | Override the outbound user agent string. |
636
+
637
+ ### Tool Output
638
+
639
+ | Variable | Default | Notes |
640
+ | -------------------------- | ------- | ---------------------------------------------- |
641
+ | `MAX_INLINE_CONTENT_CHARS` | `0` | `0` means no explicit inline truncation limit. |
642
+
643
+ ### Tasks
644
+
645
+ | Variable | Default | Notes |
646
+ | ---------------------------- | ------- | ------------------------------------------------------ |
647
+ | `TASKS_MAX_TOTAL` | `5000` | Total task capacity. |
648
+ | `TASKS_MAX_PER_OWNER` | `1000` | Per-owner task cap, clamped to the total cap. |
649
+ | `TASKS_STATUS_NOTIFICATIONS` | `false` | Enables status notifications for tasks. |
650
+ | `TASKS_REQUIRE_INTERCEPTION` | `true` | Requires interception for task-capable tool execution. |
651
+
652
+ ### Transform Workers
653
+
654
+ | Variable | Default | Notes |
655
+ | ------------------------------------------ | --------- | ------------------------------------- |
656
+ | `TRANSFORM_CANCEL_ACK_TIMEOUT_MS` | `200` | Cancellation acknowledgement timeout. |
657
+ | `TRANSFORM_WORKER_MODE` | `threads` | Worker execution mode. |
658
+ | `TRANSFORM_WORKER_MAX_OLD_GENERATION_MB` | unset | Optional worker memory limit. |
659
+ | `TRANSFORM_WORKER_MAX_YOUNG_GENERATION_MB` | unset | Optional worker memory limit. |
660
+ | `TRANSFORM_WORKER_CODE_RANGE_MB` | unset | Optional worker memory limit. |
661
+ | `TRANSFORM_WORKER_STACK_MB` | unset | Optional worker stack size. |
662
+
663
+ ### Content Cleanup
664
+
665
+ | Variable | Default | Notes |
666
+ | ------------------------------------- | -------------- | ------------------------------------------ |
667
+ | `FETCH_URL_MCP_EXTRA_NOISE_TOKENS` | empty | Extra noise-removal tokens. |
668
+ | `FETCH_URL_MCP_EXTRA_NOISE_SELECTORS` | empty | Extra DOM selectors for noise removal. |
669
+ | `FETCH_URL_MCP_LOCALE` | system default | Locale override for extraction heuristics. |
670
+ | `MARKDOWN_HEADING_KEYWORDS` | built-in list | Override heading keywords used by cleanup. |
671
+
672
+ ### Logging
673
+
674
+ | Variable | Default | Notes |
675
+ | ------------ | ------- | ------------------------------------ |
676
+ | `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error`. |
677
+ | `LOG_FORMAT` | `text` | Set to `json` for structured logs. |
626
678
 
627
679
  ## HTTP Endpoints
628
680
 
@@ -649,6 +701,24 @@ The response is returned as MCP text content and, when validation succeeds, as `
649
701
 
650
702
  ## Development
651
703
 
704
+ ### Essential Commands
705
+
706
+ | Command | Description |
707
+ | -------------------- | ------------------------------------------------- |
708
+ | `npm run build` | Clean, compile TypeScript, copy assets. |
709
+ | `npm run dev` | Watch mode TypeScript compilation. |
710
+ | `npm run dev:run` | Run the server with `--watch` and `.env` support. |
711
+ | `npm start` | Start the compiled server. |
712
+ | `npm test` | Run the full test suite. |
713
+ | `npm run lint` | Lint with ESLint. |
714
+ | `npm run lint:fix` | Auto-fix lint issues. |
715
+ | `npm run type-check` | Type-check source and tests. |
716
+ | `npm run format` | Format with Prettier. |
717
+ | `npm run inspector` | Build and launch MCP Inspector. |
718
+
719
+ <details>
720
+ <summary><b>All npm scripts</b></summary>
721
+
652
722
  | Script | Command |
653
723
  | ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
654
724
  | `clean` | `node scripts/tasks.mjs clean` |
@@ -675,17 +745,26 @@ The response is returned as MCP text content and, when validation succeeds, as `
675
745
  | `inspector` | `npm run build && npx -y @modelcontextprotocol/inspector node dist/index.js --stdio` |
676
746
  | `prepublishOnly` | `npm run lint && npm run type-check && npm run build` |
677
747
 
748
+ </details>
749
+
678
750
  ## Build and Release
679
751
 
680
- - The repository includes release automation under `.github/workflows/`.
681
- - `Dockerfile` and `docker-compose.yml` are available for container-based packaging and local runs.
682
- - `npm run prepublishOnly` runs the release gate: lint, type-check, and build.
752
+ - `npm run prepublishOnly` runs lint, type-check, and build as a single release gate.
753
+ - CI workflows are under `.github/workflows/`.
754
+ - `Dockerfile` and `docker-compose.yml` are included for containerized runs.
755
+ - Published on npm as [`@j0hanz/fetch-url-mcp`](https://www.npmjs.com/package/@j0hanz/fetch-url-mcp).
683
756
 
684
757
  ## Troubleshooting
685
758
 
686
- - For stdio mode, avoid writing logs to stdout; keep logs on stderr.
687
- - For HTTP mode, verify MCP protocol headers and endpoint routing.
688
- - Update client snippets when client MCP configuration formats change.
759
+ | Symptom | Likely Cause | Fix |
760
+ | --------------------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------- |
761
+ | Server output mixes with MCP traffic on stdio | Logs going to stdout | Ensure all logging writes to stderr; the server does this by default. |
762
+ | HTTP mode returns `403` | Host/origin mismatch | Add the domain to `ALLOWED_HOSTS` or verify loopback bindings. |
763
+ | HTTP mode returns `401` | Missing or invalid token | Set `ACCESS_TOKENS` or configure OAuth env vars for remote bindings. |
764
+ | Fetch returns private-IP error | SSRF protections blocked the target | Set `ALLOW_LOCAL_FETCH=true` if the target is intentionally local. |
765
+ | `truncated: true` in response | Content exceeded inline limits | Increase `MAX_INLINE_CONTENT_CHARS` or accept truncated output. |
766
+ | Transform timeout or worker crash | Large or complex HTML | Tune `TRANSFORM_WORKER_MAX_OLD_GENERATION_MB` or increase `FETCH_TIMEOUT_MS`. |
767
+ | Client config not working | Wrong config format for the client | Check the matching `<details>` block above — config keys vary by client. |
689
768
 
690
769
  ## Credits
691
770
 
@@ -700,5 +779,12 @@ The response is returned as MCP text content and, when validation succeeds, as `
700
779
 
701
780
  ## Contributing and License
702
781
 
703
- - License: MIT
704
- - Contributions are welcome via pull requests.
782
+ Pull requests welcome. Please make sure these pass before submitting:
783
+
784
+ 1. `npm run lint` and `npm run type-check`
785
+ 2. `npm test`
786
+ 3. `npm run format`
787
+
788
+ ## License
789
+
790
+ MIT License. See [LICENSE](LICENSE) for details.
@@ -209,10 +209,10 @@ export function setTaskToolCallCapability(server, enabled) {
209
209
  if (!requests)
210
210
  return;
211
211
  if (enabled) {
212
- requests.tools = { call: {} };
212
+ requests['tools'] = { call: {} };
213
213
  return;
214
214
  }
215
- delete requests.tools;
215
+ delete requests['tools'];
216
216
  }
217
217
  const DEFAULT_PROGRESS_TOTAL = 8;
218
218
  const PROGRESS_NOTIFICATION_TIMEOUT_MS = 5000;
package/dist/lib/utils.js CHANGED
@@ -72,9 +72,9 @@ export function getErrorMessage(error) {
72
72
  if (typeof error === 'string' && error.length > 0)
73
73
  return error;
74
74
  if (isObject(error) &&
75
- typeof error.message === 'string' &&
76
- error.message.length > 0) {
77
- return error.message;
75
+ typeof error['message'] === 'string' &&
76
+ error['message'].length > 0) {
77
+ return error['message'];
78
78
  }
79
79
  if (error === null || error === undefined)
80
80
  return UNKNOWN_ERROR_MESSAGE;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@j0hanz/fetch-url-mcp",
3
- "version": "1.11.8",
3
+ "version": "1.12.0",
4
4
  "mcpName": "io.github.j0hanz/fetch-url-mcp",
5
- "description": "A web content fetcher MCP server that converts HTML to clean, AI and human readable markdown.",
5
+ "description": "An MCP server that fetches web pages and converts them to clean, readable Markdown.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -42,7 +42,16 @@
42
42
  "web-scraper",
43
43
  "llm-context",
44
44
  "ai-tools",
45
- "fetch-url-mcp"
45
+ "fetch-url-mcp",
46
+ "typescript",
47
+ "nodejs",
48
+ "stdio",
49
+ "streamable-http",
50
+ "structured-output",
51
+ "metadata-extraction",
52
+ "url-rewriting",
53
+ "worker-threads",
54
+ "content-cleanup"
46
55
  ],
47
56
  "scripts": {
48
57
  "clean": "node scripts/tasks.mjs clean",
@@ -88,7 +97,7 @@
88
97
  "knip": "^6",
89
98
  "prettier": "^3.8.1",
90
99
  "tsx": "^4.21.0",
91
- "typescript": "^5.9.3",
100
+ "typescript": "^6.0.2",
92
101
  "typescript-eslint": "^8.57.2"
93
102
  },
94
103
  "engines": {