Skip to main content

MCP server giving Claude and other LLM clients structured access to the Internet Archive's Wayback Machine.

Project description

Wayback Machine

wayback-mcp

A Model Context Protocol server giving Claude structured access to the Internet Archive's Wayback Machine.

CI Python 3.11+ MCP Built with uv


Overview

wayback-mcp is an async Python MCP server that exposes the Internet Archive's six core APIs — Availability, CDX, Advanced Search, Metadata, and Wayback content — as first-class tools, prompts, and resources for Claude. It handles rate limiting, retry/back-off, and response shape normalisation so the model only sees structured Pydantic data.

Features

  • Six MCP tools covering availability checks, snapshot lookups, full-text item search, domain crawls, page-text extraction, and item metadata
  • Four guided promptsresearch_topic, track_site_changes, audit_link_rot, setup_authentication
  • One MCP resourcewayback://item/{identifier} exposes IA item metadata as JSON
  • Async token-bucket rate limiter with per-endpoint buckets and Retry-After honoring
  • In-memory response cache with per-endpoint TTLs to keep token usage and IA load low
  • Internet Archive S3 authentication (optional) for higher rate-limit ceilings
  • Structured error model — expected failures return ToolError; unexpected ones raise
  • Tested against live IA APIs via an opt-in --integration pytest flag

Quick start

One command, then restart Claude Desktop:

uvx mcp-server-wayback --install

That's it. The installer writes the wayback entry into your claude_desktop_config.json (merging with anything already there) and prints a restart hint. To remove it later: uvx mcp-server-wayback --uninstall.

Need uvx? brew install uv on macOS, or pipx install uv. Python 3.11+ required.

Other clients

  • Claude Code: claude mcp add wayback -- uvx mcp-server-wayback
  • Anything else (Cursor, Windsurf, Codex CLI, Zed, etc.): most clients accept an MCP config block — use this one:
{
  "mcpServers": {
    "wayback": {
      "command": "uvx",
      "args": ["mcp-server-wayback"]
    }
  }
}

Optional: Internet Archive authentication

Set both keys in the server's environment to authenticate every IA request and raise your rate-limit ceiling. Run the setup_authentication prompt from Claude to walk through it interactively.

"env": {
  "WAYBACK_MCP_IA_ACCESS_KEY": "<your access key>",
  "WAYBACK_MCP_IA_SECRET_KEY": "<your secret key>"
}

Get keys at https://archive.org/account/s3.php.

Tools

Tool Purpose
check_availability Is this URL archived? Returns the closest snapshot
lookup_snapshots List CDX snapshots for a URL with date / status filters
search_archive Lucene search across IA collections with mediatype + year range
search_domain Discover archived URLs under a domain or path prefix
get_snapshot_content Fetch an archived page and extract its readable text
get_item_metadata Rich structured metadata for any IA item identifier

Prompts

Prompt What it does
research_topic Multi-mediatype IA search → synthesised topic overview
track_site_changes Sample snapshots over time → narrate how a page evolved
audit_link_rot Bulk-check URLs and surface archived alternatives
setup_authentication Walks the user through configuring IA S3 keys

Development

Requires Python 3.11+ and uv.

git clone https://github.com/lakshyamehta03/wayback-machine-mcp.git
cd wayback-machine-mcp
uv sync
uv run mcp-server-wayback      # run the server
uv run pytest                  # unit tests (httpx mocked via respx)
uv run pytest --integration    # also hit live Internet Archive APIs

CI runs the unit suite on every push and pull request via GitHub Actions.

License

MIT. The Wayback Machine logo is © Internet Archive and used here under fair use to identify the upstream service this project integrates with.

Acknowledgments

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

mcp_server_wayback-0.2.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

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

mcp_server_wayback-0.2.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_wayback-0.2.1.tar.gz.

File metadata

  • Download URL: mcp_server_wayback-0.2.1.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_server_wayback-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e000ae8f17e385de061c86863eb9da4d8ac8ded620d0e5de1ee83e99bc0ceef7
MD5 55a5fc4e040ff25aa471e471a5fd6199
BLAKE2b-256 3f4d99b96abba3637626895d45205f42dc37af7f7c6479c90152d8c45038a3c7

See more details on using hashes here.

File details

Details for the file mcp_server_wayback-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_server_wayback-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_server_wayback-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51cc9c3a7bf5e4302b32b00dfe42f808d590fd573ada85a2f1dc8be2b4d434cb
MD5 23f8eb40ce5b2e324143b2f370226348
BLAKE2b-256 014badde5ffa47d6fc5ac8bfdeb536e3356e14c45ae00928635999401c7405de

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