Web fetch
web_fetch
Web fetch tool — anti-bot web page fetching via Scrapling.
Provides three fetching modes:
- basic: Fast HTTP requests with TLS fingerprinting.
- dynamic: Full browser automation via Playwright/Chromium.
- stealth: Anti-bot bypass with modified Firefox (Camoufox).
Scrapling is an optional dependency. If not installed, the tool returns a clear error message.
WebFetchTool
AXMTool-compatible wrapper around :func:fetch_page.
The MCP wrapping layer (register_one) invokes tools through a
synchronous execute(**kwargs) seam, while the central fetching
logic in :func:fetch_page is async. This wrapper bridges the two
via :func:asyncio.run without duplicating any business logic — all
fetching, mode dispatch, truncation and error handling stay in
:func:fetch_page.
Source code in packages/axm-mcp/src/axm_mcp/web_fetch.py
name
property
Tool name used for MCP registration.
execute(*, url, mode='auto', **_)
Fetch a web page, delegating to :func:fetch_page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL to fetch (required). |
required |
mode
|
str
|
Fetching mode — |
'auto'
|
Source code in packages/axm-mcp/src/axm_mcp/web_fetch.py
fetch_page(*, url, mode='auto')
async
Fetch a web page with optional anti-bot bypass.
Uses Scrapling as backend with automatic escalation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL to fetch (required). |
required |
mode
|
str
|
Fetching mode — |
'auto'
|
Returns:
| Type | Description |
|---|---|
FetchResult
|
Dict with |
FetchResult
|
and |
FetchResult
|
Dict with |