Wayback Machine

•
4
•

Integrates the Internet Archive Wayback Machine's functionalities, enabling users to list website snapshots and retrieve archived web pages through a Model Context Protocol server.

This Model Context Protocol (MCP) server provides seamless access to the vast archives of the Internet Archive Wayback Machine. Inspired by the TypeScript server described in the LobeHub listing, it allows users to programmatically interact with historical web data. Whether you need to track website changes over time, retrieve specific archived versions of pages, or perform advanced searches across archive.org items, this tool simplifies the process by exposing these capabilities through a standardized protocol, making it ideal for developers and data enthusiasts.

Key Features

01Fetch the content of specific archived web pages by URL and timestamp, including the option for original content.
02List website snapshots using the Wayback CDX API, with filters for URL, date range, limit, and match type.
03Directly access archived page content via a custom `wayback://{url}/{timestamp}` resource URI.
040 GitHub stars
05Search for items across archive.org collections by query, media type, creator, and various other fields.

Use Cases

01Build applications that need to display or process content from archived web pages.
02Programmatically retrieve historical versions of websites for research or analysis.
03Automate the search and retrieval of digital items within the Internet Archive for data collection.

Wayback Machine MCP Server (Python)

CI PyPI version Python versions License: MIT

A Model Context Protocol (MCP) server that provides access to the Internet Archive Wayback Machine: list snapshots and fetch archived pages. Inspired by the TypeScript server described in the LobeHub listing.

Features

  • Tools
    • get_snapshots(url, from, to, limit, match_type) via Wayback CDX API
    • get_archived_page(url, timestamp, original) fetches archived content
    • search_items(query, mediatype, collection, fields, sort, rows, page) searches archive.org items
  • Resource
    • wayback://{url}/{timestamp} returns the archived page content

Install

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run (stdio)

python -m wayback_mcp.server

Install as CLI

pip install wayback-mcp
wayback-mcp

Run with uvx (no install)

uvx wayback-mcp
  • Pin Python version:
uvx --python 3.12 wayback-mcp
  • Pin package version:
uvx --from wayback-mcp==0.1.1 wayback-mcp

Configure in MCP client

Claude Desktop settings (example):

{
  "mcpServers": {
    "wayback-machine": {
      "command": "wayback-mcp",
      "args": [],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

Alternatively, using uvx (no install):

{
  "mcpServers": {
    "wayback-machine": {
      "command": "uvx",
      "args": ["wayback-mcp"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

Usage examples

  • Tool call (snapshots):
get_snapshots(url="example.com", from="20200101", to="20201231", limit=10)
  • Tool call (page):
get_archived_page(url="example.com", timestamp="20200101120000", original=true)
  • Tool call (items search):
search_items(
  query="title:(Wayback) AND creator:(Internet Archive)",
  mediatype="texts",
  fields=["identifier","title","creator","mediatype","publicdate"],
  sort=["publicdate desc"],
  rows=20,
  page=1
)
  • Resource fetch:
wayback://example.com/20200101120000

Notes

  • Snapshot data via CDX API: https://web.archive.org/cdx/search/cdx?url={url}&output=json
  • Page retrieval via Wayback: https://web.archive.org/web/{timestamp}/{url} (or id_ mode for original content)
  • Advanced item search endpoint: https://archive.org/advancedsearch.php (JSON output)