Skip to main content
Glama
sisilet

Wayback Machine MCP Server

by sisilet

get_archived_page

Retrieve archived webpage content from the Wayback Machine using a specific timestamp to access historical website versions and data.

Instructions

Retrieve content of an archived webpage from the Wayback Machine using YYYYMMDDHHMMSS timestamp. If original=true, request id_ mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalNo
timestampYes
urlYes

Implementation Reference

  • Implements the core logic for retrieving an archived webpage from the Wayback Machine. Constructs the archived URL based on timestamp and optional 'original' mode, fetches the response using _fetch_text helper, and returns structured data including status, headers, and page text.
    async def get_archived_page( url: str, timestamp: str, original: bool = False, ) -> Dict[str, Any]: """ Fetch the archived page content. Returns status, headers, and text content. If `original` is True, uses the `id_` mode to minimize Wayback rewriting/banners. """ mode = "id_/" if original else "" archived_url = f"{WAYBACK_ENDPOINT}/{timestamp}/{mode}{url}" resp = await _fetch_text(archived_url) text: Optional[str] try: text = resp.text except Exception: text = None return { "url": url, "timestamp": timestamp, "archived_url": archived_url, "status_code": resp.status_code, "headers": dict(resp.headers), "text": text, }
  • Registers the 'get_archived_page' tool with the FastMCP app, specifying the name and description.
    @app.tool( name="get_archived_page", description=( "Retrieve content of an archived webpage from the Wayback Machine " "using YYYYMMDDHHMMSS timestamp. If original=true, request id_ mode." ), )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sisilet/wayback-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server