Skip to main content

Webarchiver

GitHub Repo stars GitHub forks GitHub contributors GitHub license GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Version PyPI - Downloads PyPI - License PyPI - Wheel PyPI - Implementation MCP Server

Governed web fetch, extract, render, screenshot and link connector

The documentation site contains the full API, deployment, security, and operational reference. This README is the concise entry point for installation and the supported runtime surfaces.

Overview

webarchiver is the fleet's web fetch and scrape connector. It reads public web pages under an explicit policy and returns typed results an agent or the graph can ingest: raw pages, extracted main content with document metadata, rendered DOMs, full-page screenshots and outbound links. It holds no credentials.

Key capabilities

  • Governed fetch — robots.txt, a per-domain rate limit, size and content-type caps, re-checked redirects and egress pinning that refuses private and loopback destinations. Every refusal has a typed reason.
  • Main-content extraction — clean text and markdown with title, author, published date, canonical URL, content digest and links.
  • Rendering — headless Chromium for pages built by scripts, with ad and tracker requests aborted and fixed overlays removed.
  • Screenshots — full-page PNG captures.
  • Site crawl — a bounded breadth-first walk from one seed URL that returns page URLs (up to 1000) under the same robots and rate policy.
  • One tool per operation — web_fetch, web_extract, web_render, web_screenshot, web_crawl and web_links, all read-only.
  • Shared web-source contract — web_fetch and web_extract are the agent-connector-sdk web-source contract's tools: the same request, page result and refusal reasons as every page connector, including the ArchiveBox connector. Each page names its backend (webarchiver).

Quick start

Install the package and run its generated entry points:

python -m pip install "webarchiver[mcp]"
webarchiver-mcp

For an on-demand run, use uvx:

uvx --from "webarchiver[mcp]" webarchiver-mcp

The networked server binds to loopback by default:

webarchiver-mcp --transport streamable-http --host 127.0.0.1 --port 8000

Architecture

The provider keeps the boundary between transport and domain code explicit:

client → MCP entry point → one tool per operation → fetch policy → web
                                  └── skills, prompts, ontology, connector presets

The MCP surface has one typed, read-only tool per operation. Regenerate the tool fingerprints with python scripts/generate_tool_schemas.py after changing a tool contract.

MCP configuration

The server supports local stdio and authenticated streamable-http deployments. Keep endpoint, credential, selector, and TLS references in SDK configuration; do not put resolved values in client configuration.

{
  "mcpServers": {
    "webarchiver-mcp": {
      "command": "webarchiver-mcp",
      "args": [],
      "env": {"SYSTEMTOOL": "true"}
    }
  }
}

For a networked deployment, use an authenticated TLS ingress and keep the allowlist in MCP_ALLOWED_HOSTS. A configured remote example is https://service.example.invalid/mcp; it is documentation-only and is never contacted by the generator.

{
  "mcpServers": {
    "webarchiver-mcp": {
      "command": "webarchiver-mcp",
      "args": ["--transport", "streamable-http", "--port", "8000"],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "127.0.0.1",
        "PORT": "8000",
        "SYSTEMTOOL": "true"
      }
    }
  }
}

Container builds install the published wheel for the pinned version. Publish the release first, then run from the repository root:

docker build --file docker/Dockerfile --target mcp -t webarchiver:<version>-mcp .

Deploy reviewed images by digest (webarchiver@sha256:<digest>) and include --cap-drop=ALL in the runtime policy. The deployment guide contains the complete transport and container examples.

Documentation

Use the Pages documentation for installation details, API capabilities, deployment profiles, platform integration, and the concept registry. The concise local references remain available at:

Development

Create an isolated branch, install the test extra, and run the complete local gate:

uv sync --extra test
pytest tests -q
pre-commit run --all-files

Keep MCP examples and environment documentation aligned with the implemented settings. Add focused positive and adversarial tests for every behavior change. See AGENTS.md for the current module ownership and release checks.

License

This project is distributed under the MIT license. See LICENSE for the complete terms.

Metadata

Release files for webarchiver 1.2.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 webarchiver 1.2.0
File Size Uploaded
webarchiver-1.2.0.tar.gz 3.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for webarchiver 1.2.0
File Interpreter ABI Platform
webarchiver-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 MB

Release files / webarchiver-1.2.0.tar.gz

Download URL webarchiver-1.2.0.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
f6e8d1b8d1f5da3af160f14928164b4a93c80c93eb1ed4434b238973e9efb4e7
BLAKE2b-256 checksum
How to use checksums
419cf65c844c80e76666c338a05c07a0bfbf1ec5ef15621104df25e270182a61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / webarchiver-1.2.0-py3-none-any.whl

Download URL webarchiver-1.2.0-py3-none-any.whl
Size 36.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
183e60fe804843bb0d9aeb059bba0f90c28acd0c4133baf72ec7265b80804b04
BLAKE2b-256 checksum
How to use checksums
5d4e55378df4892e4fec0c8213245c1ad7a9529103a43553cb2b58cd88984a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.32.7

1 release file

0.32.6

1 release file

0.32.5

1 release file

0.32.4

1 release file

0.32.3

1 release file

0.32.2

1 release file

0.32.1

1 release file

0.32.0

1 release file

0.31.0

1 release file

0.30.0

1 release file

0.29.0

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.0

1 release file

0.21.0

1 release file

0.20.0

1 release file

0.19.0

1 release file

0.17.0

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.5

1 release file

0.1.3

1 release file

0.1.2

1 release file

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