Skip to main content

FetchV2 MCP Server

PyPI version CI Python 3.11+ License: MIT

FetchV2 is a Model Context Protocol (MCP) server that retrieves web pages and returns clean Markdown. It uses Trafilatura to remove navigation, advertisements, footers, and other page elements.

What it does

Tool Use
fetch Fetch one web page and extract its main content
fetch_batch Fetch up to 10 web pages in one request
discover_links Find and filter links on a web page
fetch_llms_txt Read an llms.txt index and optionally fetch its linked pages

FetchV2 can return raw HTML, preserve links and tables, and paginate long content. The fetch tool checks robots.txt by default.

Quick start

Requirements

  1. Install uv.
  2. Install Python 3.11 or newer:
uv python install 3.11

Install for Cursor or VS Code

Cursor VS Code
Install MCP Server Install on VS Code

Configure another MCP client

Add this server definition to your MCP client configuration:

{
  "mcpServers": {
    "fetchv2": {
      "command": "uvx",
      "args": ["fetchv2-mcp-server@latest"]
    }
  }
}

Common configuration file locations:

  • Claude Desktop on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Claude Desktop on Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
  • Kiro: .kiro/settings/mcp.json in your project

Install in a Python environment

Use one of these commands if you want to install the package directly:

uv add fetchv2-mcp-server
pip install fetchv2-mcp-server

Try it

Ask your MCP client to perform a task such as:

  • "Fetch the documentation from <URL>."
  • "Find links on <docs URL> that contain tutorial."
  • "Read these pages and summarize their differences: [url1, url2, url3]."

Typical documentation workflow

First, find the relevant pages:

discover_links(url="https://docs.example.com/", filter_pattern="/guide/")

Then fetch the selected pages in one request:

fetch_batch(
    urls=[
        "https://docs.example.com/guide/intro",
        "https://docs.example.com/guide/setup",
    ]
)

Tool reference

fetch

Fetch one web page and extract its main content as Markdown.

fetch(
    url: str,
    max_length: int = 5000,
    start_index: int = 0,
    get_raw_html: bool = False,
    include_metadata: bool = True,
    include_tables: bool = True,
    include_links: bool = False,
    bypass_robots_txt: bool = False,
) -> str
Parameter Type Default Description
url str required Web page URL
max_length int 5000 Maximum number of characters to return
start_index int 0 Character offset for pagination
get_raw_html bool False Return raw HTML without extraction
include_metadata bool True Include the title, author, and date
include_tables bool True Preserve tables in Markdown
include_links bool False Preserve links in Markdown
bypass_robots_txt bool False Skip the robots.txt check for a user-requested fetch

If the response is truncated, use the returned start_index value in the next call.

fetch_batch

Fetch up to 10 web pages and combine the results.

fetch_batch(
    urls: list[str],
    max_length_per_url: int = 2000,
    get_raw_html: bool = False,
) -> str
Parameter Type Default Description
urls list[str] required Web page URLs to fetch
max_length_per_url int 2000 Maximum number of characters to return for each URL
get_raw_html bool False Return raw HTML without extraction

This tool reports a failed URL in its result and continues with the other URLs. It does not check robots.txt.

Find links on a web page and optionally filter them with a regular expression.

discover_links(url: str, filter_pattern: str = "") -> str
Parameter Type Default Description
url str required Web page URL to scan
filter_pattern str "" Regular expression used to filter links

The tool resolves relative links and returns up to 100 URLs.

fetch_llms_txt

Read an llms.txt file and list its documentation links.

fetch_llms_txt(
    url: str,
    include_content: bool = False,
    max_length_per_url: int = 2000,
) -> str
Parameter Type Default Description
url str required URL of an llms.txt file
include_content bool False Fetch the content of all linked pages
max_length_per_url int 2000 Maximum number of characters to return for each linked page

By default, this tool fetches only the llms.txt index. Set include_content=True to fetch all linked pages. This option can return a large response.

The tool resolves relative URLs, such as /docs/guide.md, against the llms.txt URL.

Security

FetchV2 fetches URLs that a model chooses. A web page can contain a prompt injection that asks the model to fetch an internal address. FetchV2 has these limits to reduce that risk.

Private network guard

FetchV2 refuses a request when the host is, or resolves to, a non-public address:

  • Loopback: 127.0.0.0/8, ::1, and localhost names
  • Private: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and IPv6 unique local fc00::/7
  • Link-local: 169.254.0.0/16 (including the cloud metadata address 169.254.169.254) and fe80::/10
  • Unspecified, multicast, shared (100.64.0.0/10), and reserved ranges
  • IPv4-mapped IPv6 addresses, such as ::ffff:127.0.0.1

The guard checks the first request and every redirect hop. It also applies to the robots.txt request and to the pages that fetch_llms_txt loads.

To fetch local or private hosts on purpose, set this environment variable for the server:

{
  "mcpServers": {
    "fetchv2": {
      "command": "uvx",
      "args": ["fetchv2-mcp-server@latest"],
      "env": { "FETCHV2_ALLOW_PRIVATE_NETWORKS": "1" }
    }
  }
}

The values 1, true, and yes turn the guard off. The guard is on by default.

Response size limit

FetchV2 reads at most 5 MB (5,242,880 bytes) of each response body. It refuses a response early when Content-Length is over the limit. It also counts bytes while it reads, and it stops at the limit. A cut body ends with a <!-- Truncated: response body exceeded ... --> comment.

Known limits

  • DNS rebinding. The guard resolves the host before the request, and then the HTTP client resolves it again to connect. A hostile DNS server can return a public address the first time and a private address the second time. The guard does not pin the connection to the checked address. If this risk matters, run the server where it cannot reach internal services, for example behind an egress firewall.
  • Proxies. If you set HTTP_PROXY or HTTPS_PROXY, the proxy connects to the host. The proxy must apply its own rules.
  • Untrusted content. Fetched page text is untrusted input. It can contain instructions written for the model. Do not let fetched text approve other tool calls. Be careful with autoApprove for this server.

Prompts

  • fetch_manual creates a request to fetch and summarize one URL.
  • research_topic creates a request to research a topic with optional URLs.

Development

Clone the repository and install the development dependencies:

git clone https://github.com/praveenc/fetchv2-mcp-server.git
cd fetchv2-mcp-server
uv sync --dev

Run the tests:

uv run pytest

Run the server with MCP Inspector:

uv run mcp dev src/fetchv2_mcp_server/server.py

Run lint and type checks:

uv run ruff check .
uv run pyright

Contributing

Read CONTRIBUTING.md before you submit a change.

Support

Use the GitHub issue tracker to report a problem or request a feature.

License

This project uses the MIT License. See LICENSE for details.

Metadata

Release files for fetchv2-mcp-server 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fetchv2-mcp-server 2.1.0
File Size Uploaded Provenance Actions
fetchv2_mcp_server-2.1.0.tar.gz 23.7 kB With provenance Details for fetchv2_mcp_server-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fetchv2-mcp-server 2.1.0
File Interpreter ABI Platform Actions
fetchv2_mcp_server-2.1.0-py3-none-any.whl Python 3 none any Details for fetchv2_mcp_server-2.1.0-py3-none-any.whl

Total release size: 40.4 kB

Release files / fetchv2_mcp_server-2.1.0.tar.gz

Download URL fetchv2_mcp_server-2.1.0.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b6c6165e6437cd0c66f54684562c101166eb423df7eecee8d1ec95647f1ea8f5
BLAKE2b-256 checksum
How to use checksums
75df50d817987dc0c44fcf15db5026feda7d7bc4de9b467ec3d3cb6a777e44da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / fetchv2_mcp_server-2.1.0-py3-none-any.whl

Download URL fetchv2_mcp_server-2.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3bbf18a94b4909b1ec4f16834b97e36da28a78c1177b6e457f0ed7e61cb6a8f1
BLAKE2b-256 checksum
How to use checksums
bdc339ae2d6d30720dd1a3054322b266e005dd0d58af026c0f41b362ddeba982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for fetchv2-mcp-server 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fetchv2_mcp_server-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page