Automatically rewrites Bitbucket URLs to their raw content versions to extract clean, readable text from code repositories.
Automatically rewrites GitHub and Gist URLs to their raw content versions to extract clean, readable text from code repositories.
Automatically rewrites GitLab URLs to their raw content versions to extract clean, readable text from code repositories.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@superFetch MCP Serverfetch and clean the content from https://www.wired.com/story/ai-chip-wars/"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Fetch URL MCP Server
Fetch public web pages and convert them into clean, AI-readable Markdown.
Overview
Fetch URL is a Model Context Protocol (MCP) server that fetches public web pages, extracts meaningful content using Mozilla's Readability algorithm, and converts the result into clean Markdown optimized for LLM context windows. It handles noise removal, caching, SSRF protection, async task execution, and supports both stdio and Streamable HTTP transports.
Content extraction quality varies depending on the HTML structure and complexity of the source page. Fetch URL works best with standard article and documentation layouts. Pages relying on client-side JavaScript rendering may yield incomplete results.
Key Features
HTML to Markdown — Content extraction via Mozilla Readability + node-html-markdown
Noise removal — Strips navigation, ads, cookie banners, and other non-content elements
In-memory LRU cache — Faster repeat fetches with configurable TTL (24 h default)
Raw URL rewriting — Auto-converts GitHub, GitLab, Bitbucket, and Gist URLs to raw content endpoints
Tech Stack
Component | Technology |
Runtime | Node.js >= 24 |
Language | TypeScript 5.9 |
MCP SDK |
|
Content Extraction |
|
DOM Parsing |
|
Markdown Conversion |
|
Schema Validation |
|
Package Manager | npm |
Architecture
URL Validation — Normalize, block private hosts, transform raw-content URLs (GitHub, GitLab, Bitbucket)
Fetch — HTTP request with redirect following, DNS preflight SSRF checks, and size limits (10 MB)
Transform — Offloaded to worker threads: parse HTML with
linkedom, extract with Readability, remove DOM noise, convert to MarkdownCleanup — Multi-pass Markdown normalization (heading promotion, spacing, skip-link removal)
Cache + Respond — Store result in LRU cache, apply inline content limits, return structured content
Repository Structure
Requirements
Node.js >= 24
Quickstart
Add to your MCP client configuration:
Client Example (CLI)
Build the server and examples, then run the client:
Optional flags:
--fullreads the cached markdown resource to avoid inline truncation.--taskenables task-based execution with streamed status updates.--task-ttl <ms>sets task TTL;--task-poll <ms>sets poll interval.--http http://localhost:3000/mcpconnects to the Streamable HTTP server.Progress updates (when emitted) are printed to stderr.
Installation
NPX (Recommended)
No installation required — runs directly:
Global Install
From Source
Docker
Configuration
Runtime Modes
Flag | Description |
| Run in stdio mode (for desktop MCP clients; default) |
| Run in HTTP mode (Streamable HTTP on port 3000 by default) |
| Show usage help |
| Print server version |
When no transport flag is passed, the server starts in stdio mode.
Environment Variables
Core Settings
Variable | Default | Description |
|
| HTTP server bind address |
|
| HTTP server port (1024–65535) |
|
| Log level: |
|
| HTTP fetch timeout in ms (1000–60000) |
|
| Enable/disable in-memory content cache |
|
| Custom User-Agent header |
|
| Allow remote connections in HTTP mode |
| (empty) | Comma-separated host/origin allowlist for HTTP mode |
|
| Require |
Task Management
Variable | Default | Description |
|
| Maximum retained task records across all owners |
|
| Maximum retained task records per session/client |
|
| Emit experimental |
Authentication (HTTP Mode)
Variable | Default | Description |
| (empty) | Comma-separated static bearer tokens |
| (empty) | Single API key (added to static tokens) |
| (empty) | OAuth issuer URL (enables OAuth mode) |
| (empty) | OAuth authorization endpoint |
| (empty) | OAuth token endpoint |
| (empty) | OAuth token introspection endpoint |
| (empty) | OAuth token revocation endpoint |
| (empty) | OAuth dynamic client registration |
| (empty) | Required OAuth scopes |
| (empty) | OAuth client ID |
| (empty) | OAuth client secret |
Transform & Workers
Variable | Default | Description |
|
| Worker mode: |
| (unset) | V8 old generation heap limit per worker |
| (unset) | V8 young generation heap limit per worker |
| (unset) | V8 code range limit per worker |
| (unset) | Stack size limit per worker |
Content Tuning
Variable | Default | Description |
|
| Global inline markdown limit ( |
| (empty) | Additional CSS class/id tokens for noise removal |
| (empty) | Additional CSS selectors for noise removal |
| (built-in list) | Keywords triggering heading promotion |
| (system) | Locale for content processing |
Server Tuning
Variable | Default | Description |
|
| Maximum concurrent HTTP connections |
|
| Block connections from private IP ranges |
Hardcoded Defaults
Setting | Value |
Max HTML size | 10 MB |
Max inline content chars | 0 (unlimited, configurable) |
Fetch timeout | 15 s |
Transform timeout | 30 s |
Tool timeout | Fetch + Transform + 5 s padding |
Max redirects | 5 |
Cache TTL | 86400 s (24 h) |
Cache max keys | 100 |
Rate limit | 100 requests / 60 s |
Max sessions | 200 |
Session TTL | 30 min |
Max URL length | 2048 chars |
Worker pool max scale | 4 |
Usage
Stdio Mode
The server communicates via JSON-RPC over stdin/stdout. All MCP clients that support stdio transport can connect directly.
HTTP Mode
The server starts a Streamable HTTP endpoint at /mcp. Authenticate with bearer tokens via the ACCESS_TOKENS or API_KEY environment variables.
For POST /mcp, clients should send:
Accept: application/json, text/event-streamMCP-Protocol-Version: 2025-11-25(or2025-03-26for legacy clients)
MCP Surface
Tools
fetch-url
Fetches a webpage and converts it to clean Markdown format optimized for LLM context.
Useful for:
Reading documentation, blog posts, or articles
Extracting main content while removing navigation and ads
Caching content to speed up repeated queries
Limitations:
Does not execute complex client-side JavaScript interactions
Inline output may be truncated when
MAX_INLINE_CONTENT_CHARSis set
Parameters
Parameter | Type | Required | Default | Description |
|
| Yes | — | The URL of the webpage to fetch (http/https, max 2048 chars) |
|
| No |
| Preserve navigation, footers, and other elements normally filtered |
|
| No |
| Bypass cache and fetch fresh content |
|
| No |
| Per-call inline markdown limit ( |
Returns
Field | Type | Description |
|
| The canonical URL (pre-raw-transform) |
|
| The original URL provided by the caller |
|
| The normalized/transformed URL that was fetched |
|
| Final response URL after redirects |
|
| Extracted page title |
|
| Extracted metadata (title, description, author, image, favicon, publishedAt, modifiedAt) |
|
| Extracted content in Markdown format |
|
| Whether the response was served from cache |
|
| ISO timestamp for fetch/cache retrieval |
|
| Full markdown size before inline truncation |
|
| Whether inline markdown was truncated |
|
| Error message if the request failed |
|
| HTTP status code for failed requests |
|
| Additional error details |
Annotations
Annotation | Value |
|
|
|
|
|
|
|
|
Async Task Execution
The fetch-url tool supports optional async task execution (execution.taskSupport: "optional"). Include a task field in the tool call to run the fetch in the background:
Then poll tasks/get until the task status is completed or failed, and retrieve the result via tasks/result.
Prompts
Name | Description |
| Returns server usage instructions |
Resources
URI Pattern | MIME Type | Description |
|
| Server instructions and usage guidance |
|
| Cached markdown entries from prior |
Tasks
The server declares full MCP task support:
Endpoint | Description |
| List tasks (scoped to session/owner) |
| Get task status by ID |
| Retrieve completed task result |
| Cancel an in-flight task |
HTTP Mode Endpoints
Method | Path | Auth | Description |
|
| No | Health check (minimal payload) |
|
| Yes* | Detailed diagnostics and runtime metrics |
|
| Yes | MCP JSON-RPC (Streamable HTTP) |
|
| Yes | SSE stream for server-initiated messages |
|
| Yes | Terminate MCP session |
|
| Yes | Download cached content |
* verbose=true can be read without auth only for local-only deployments (ALLOW_REMOTE=false).
Session Behavior
Sessions are created on the first
POST /mcprequest with aninitializemessageSession ID is returned in the
mcp-session-idresponse headerSessions expire after 30 minutes of inactivity (max 200 concurrent)
Authentication
Static tokens: Set
ACCESS_TOKENSorAPI_KEYenvironment variables; pass asAuthorization: Bearer <token>OAuth: Configure
OAUTH_*environment variables to enable OAuth 2.0 token introspection
Client Configuration Examples
Add to your VS Code settings (.vscode/mcp.json or User Settings):
Add to claude_desktop_config.json:
Or manually add to Cursor MCP settings:
Add to your Windsurf MCP configuration:
Use the published image from GitHub Container Registry:
Or build and run locally:
Security
SSRF Protection
Fetch URL blocks requests to private and internal network addresses:
Blocked hosts:
localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,100.64.0.0/10Blocked IPv6:
::1,fc00::/7,fe80::/10, IPv4-mapped private addressesCloud metadata:
169.254.169.254(AWS),metadata.google.internal,metadata.azure.com,100.100.100.200(Azure IMDS)
DNS preflight checks run on every redirect hop to prevent DNS rebinding attacks.
Stdio Transport Safety
The server never writes non-protocol data to stdout. All logs and diagnostics go to stderr.
Rate Limiting
HTTP mode enforces a rate limit of 100 requests per 60-second window per client.
Content Safety
HTML downloads are capped at 10 MB
Worker threads run in isolation with configurable resource limits
Auth tokens are stored in-memory only and compared using timing-safe equality
Development Workflow
Install Dependencies
Scripts
Script | Command | Description |
|
| TypeScript watch mode |
|
| Run compiled output with watch + |
|
| Clean, compile, copy assets, make executable |
|
| Run compiled server |
|
| Run test suite (Node.js native test runner) |
|
| Run tests with coverage |
|
| ESLint |
|
| ESLint with auto-fix |
|
| Prettier |
|
| TypeScript type checking |
|
| Build and launch MCP Inspector |
Build and Release
CI/CD is handled via a GitHub Actions workflow (release.yml) that runs lint, type-check, test, build, and publishes to npm with version bumping.
Troubleshooting
MCP Inspector
Use the built-in inspector to test the server interactively:
Common Issues
Issue | Solution |
| URL is blocked (private IP/localhost) or malformed. Do not retry. |
| Worker pool busy. Wait briefly, then retry or use async task mode. |
Garbled output | Binary content (images, PDFs) cannot be converted. Ensure the URL serves HTML. |
No output in stdio mode | If you intended HTTP mode, pass |
Auth errors in HTTP mode | Set |
Stdout / Stderr Guidance
In stdio mode, stdout is reserved exclusively for MCP JSON-RPC messages. Logs and diagnostics are written to stderr. Never pipe stdout to a log file when using stdio transport.