Skip to content
Back to search

fetch-mcp

A flexible HTTP fetching Model Context Protocol server.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/zcaceres--fetch-mcp/badge.svg)](/listings/zcaceres--fetch-mcp)

HTML

<a href="/listings/zcaceres--fetch-mcp"><img src="/api/listings/zcaceres--fetch-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

As an MCP server

Add to your MCP client configuration:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["mcp-fetch-server"]
    }
  }
}

As a CLI

npx mcp-fetch <command> <url> [flags]

Or install globally:

npm install -g mcp-fetch-server
mcp-fetch <command> <url> [flags]

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 159 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Fetch MCP Server
  2. ![fetch mcp logo](logo.jpg)
  3. [![npm version](https://img.shields.io/npm/v/mcp-fetch-server.svg)](https://www.npmjs.com/package/mcp-fetch-server)
  4. An MCP server for fetching web content in multiple formats — HTML, JSON, plain text, Markdown, readable article content, and YouTube transcripts.
  5. <a href="https://glama.ai/mcp/servers/nu09wf23ao">
  6. <img width="380" height="200" src="https://glama.ai/mcp/servers/nu09wf23ao/badge" alt="Fetch Server MCP server" />
  7. </a>
  8. ## Tools
  9. All tools accept the following common parameters:
  10. | Parameter | Type | Required | Description |
  11. |-----------|------|----------|-------------|
  12. | `url` | string | Yes | URL to fetch |
  13. | `headers` | object | No | Custom headers to include in the request |
  14. | `max_length` | number | No | Maximum characters to return (default: 5000) |
  15. | `start_index` | number | No | Start from this character index (default: 0) |
  16. | `proxy` | string | No | Proxy URL (e.g. `http://proxy:8080`) |
  17. - **fetch_html** — Fetch a website and return its raw HTML content.
  18. - **fetch_markdown** — Fetch a website and return its content converted to Markdown.
  19. - **fetch_txt** — Fetch a website and return plain text with HTML tags, scripts, and styles removed.
  20. - **fetch_json** — Fetch a URL and return the JSON response.
  21. - **fetch_readable** — Fetch a website and extract the main article content using [Mozilla Readability](https://github.com/mozilla/readability), returned as Markdown. Strips navigation, ads, and boilerplate. Ideal for articles and blog posts.
  22. - **fetch_youtube_transcript** — Fetch a YouTube video's captions/transcript. Uses `yt-dlp` if available, otherwise extracts directly from the page. Accepts an additional `lang` parameter (default: `"en"`) to select the caption language.
  23. ## Installation
  24. ### As an MCP server
  25. Add to your MCP client configuration:
  26. ```json
  27. {
  28. "mcpServers": {
  29. "fetch": {
  30. "command": "npx",
  31. "args": ["mcp-fetch-server"]
  32. }
  33. }
  34. }
  35. ```
  36. ### As a CLI
  37. ```bash
  38. npx mcp-fetch <command> <url> [flags]
  39. ```
  40. Or install globally:
  41. ```bash
  42. npm install -g mcp-fetch-server
  43. mcp-fetch <command> <url> [flags]
  44. ```
  45. ## CLI Usage
  46. ```
  47. mcp-fetch <command> <url> [flags]
  48. ```
  49. ### Commands
  50. | Command | Description |
  51. |---------|-------------|
  52. | `html` | Fetch a URL and return raw HTML |
  53. | `markdown` | Fetch a URL and return Markdown |
  54. | `readable` | Fetch a URL and return article content as Markdown (via Readability) |
  55. | `txt` | Fetch a URL and return plain text |
  56. | `json` | Fetch a URL and return JSON |
  57. | `youtube` | Fetch a YouTube video transcript |
  58. ### Flags
  59. | Flag | Description |
  60. |------|-------------|
  61. | `--max-length <N>` | Maximum characters to return |
  62. | `--start-index <N>` | Start from this character index |
  63. | `--proxy <URL>` | Proxy URL |
  64. | `--lang <code>` | Language code for YouTube transcripts (default: `en`) |
  65. | `--help` | Show help message |
  66. | `--version` | Show version |
  67. ### Examples
  68. ```bash
  69. # Fetch a page as markdown
  70. mcp-fetch markdown https://example.com
  71. # Extract article content without boilerplate
  72. mcp-fetch readable https://example.com/blog/post
  73. # Get a YouTube transcript in Spanish
  74. mcp-fetch youtube https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang es
  75. # Fetch with a length limit
  76. mcp-fetch html https://example.com --max-length 10000
  77. # Fetch through a proxy
  78. mcp-fetch json https://api.example.com/data --proxy http://proxy:8080
  79. ```
  80. ## Environment Variables
  81. | Variable | Description |
  82. |----------|-------------|
  83. | `DEFAULT_LIMIT` | Default character limit for responses (default: `5000`, set to `0` for no limit) |
  84. | `MAX_RESPONSE_BYTES` | Maximum response body size in bytes (default: `10485760` / 10 MB) |
  85. Example with a custom limit:
  86. ```json
  87. {
  88. "mcpServers": {
  89. "fetch": {
  90. "command": "npx",
  91. "args": ["mcp-fetch-server"],
  92. "env": {
  93. "DEFAULT_LIMIT": "50000"
  94. }
  95. }
  96. }
  97. }
  98. ```
  99. ## Features
  100. - Fetch web content as HTML, JSON, plain text, or Markdown
  101. - Extract article content with Mozilla Readability (strips ads, nav, boilerplate)
  102. - Extract YouTube video transcripts (via `yt-dlp` or direct extraction)
  103. - Proxy support for requests behind firewalls
  104. - Pagination with `max_length` and `start_index`
  105. - Custom request headers
  106. - SSRF protection (blocks private/localhost addresses and DNS rebinding)
  107. - Response size limits to prevent memory exhaustion
  108. ## Development
  109. ```bash
  110. bun install
  111. bun run dev # start with watch mode
  112. bun test # run tests
  113. bun run build # build for production
  114. ```
  115. ## License
  116. This project is licensed under the MIT License.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.