Skip to main content

Wayback Machine MCP server (Python)

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wayback_mcp-0.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wayback_mcp-0.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file wayback_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: wayback_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for wayback_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b4019bd8cfd21aae1765ac00ef6423be4ab51b5f057aec5bef765bbcabef665d
MD5 f12c97a7d82fc61dca418d6563a0d8f4
BLAKE2b-256 e8e1a1988ed38d33756ea5a8f33f0ca668c8b1b5b9c03d402478ac38ebbfb3ee

See more details on using hashes here.

File details

Details for the file wayback_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wayback_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for wayback_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef3c01d55bd2d0146b690038c7cc5ab499421b6d6322a99b9c9b80b9e1ffbfbb
MD5 59e9c57c22d648b81f5be5e7ebfab698
BLAKE2b-256 286b60e8ec2a661cf528421193685c9d278d1b67f8ae736cecd9c6d41c3bc1e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page