Skip to main content
Glama

🪦 Lazarus — resurrect dead Python code

Old code doesn't die. The world moves on without it.

Try it live: https://rambopig06.github.io/lazarus/ (no install, no account)

You find the perfect repo — the paper's reference implementation, the scraper that does exactly what you need, the library your old project depended on. Last commit: 2015. You run pip install -r requirements.txt and today's packages pour in: ImportError: cannot import name 'cached_property' from 'werkzeug'. The code isn't broken. It's from a different time.

Lazarus travels back to the day a repository last breathed. It finds the repo's time of death, the Python and every package version that existed on PyPI that day, and hands you a resurrection kit — a Dockerfile and a date-locked requirements.lock.txt — plus an honest death certificate of what may still break.

Built for Kiroween 2026 · Resurrection with Kiro, spec-first.

What it does

Stage

What happens

1. Time of death

GitHub API → last commit date of the branch, tag or commit you choose (or a date you override)

2. Relics

Reads requirements.txt, setup.py, setup.cfg, pyproject.toml (PEP 621 + Poetry), Pipfile, environment.yml — including -e .[extras] self-references. No dependency files? It scans the imports and maps them to PyPI names (yaml → PyYAML, bs4 → beautifulsoup4)

3. Time travel

For each package: the newest PyPI release uploaded on or before the time of death that satisfies the repo's own constraints and the era's Python (requires_python checked per release). Exact pins are kept. Yanked releases are skipped

4. Resurrection kit

Python ≥ 3.8: a two-stage Dockerfile that compiles a full transitive lock with uv pip compile --exclude-newer <date>. Older Python: a single-stage pip Dockerfile, clearly marked. Plus RESURRECTION.md and a one-liner

5. Death certificate

Every package that did not exist yet, was yanked, isn't on PyPI or conflicts with the era's Python — as blockers or warnings, with an overall confidence

Example — jmcarp/robobrowser (3.7k ★, last commit June 2015):

Time of death : 2015-06-07   Python : 3.4   Confidence : MEDIUM
beautifulsoup4==4.3.2
requests==2.7.0
six==1.9.0
Werkzeug==0.10.4      ← from before the release that broke it

Related MCP server: FreshStack MCP

Run it

npm install
npm run dev                                                    # web app
npm run demo -- https://github.com/jmcarp/robobrowser          # same pipeline in the terminal
npm run demo -- https://github.com/kennethreitz/records --override-date 2019-06-01
npm test                                                       # unit + property + offline integration tests

Everything runs client-side against the public GitHub and PyPI APIs — no server, no account. GitHub allows 60 anonymous requests an hour (Lazarus uses roughly 3 + one per dependency file); add a token in Advanced to raise that. The token stays in sessionStorage for the current tab only.

Use it from your AI assistant (MCP)

The same pipeline is exposed as an MCP server with one tool, resurrect_repo(url, ref?, overrideDate?, token?), so an agent can set up a working environment before touching an old repo.

npm run mcp     # stdio server

Register it in Kiro (.kiro/settings/mcp.json) or any MCP client:

{
  "mcpServers": {
    "lazarus": {
      "command": "npx",
      "args": ["tsx", "mcp/server.ts"],
      "cwd": "/path/to/lazarus",
      "env": { "GITHUB_TOKEN": "optional" }
    }
  }
}

Examples (offline)

/examples holds two fixture repos that the integration tests run end-to-end with GitHub and PyPI served from local files:

  • with-requirements/ — a 2018 Flask app. Lazarus must keep Flask==0.12.2, pick requests 2.18.4 (not 2.19, released three months after death) and skip a yanked python-dateutil.

  • import-scan-only/ — no dependency files at all; dependencies are inferred from imports, stdlib is ignored.

How Kiro built this

  • Steering (.kiro/steering/): product principles ("honesty over magic", Python-only, WCAG AA under the graveyard theme), the tech stack, and the repo structure — loaded into every Kiro session.

  • Spec (.kiro/specs/time-travel-resurrection/): requirements in EARS form → a design with five correctness properties → 12 implementation tasks. Kiro executed Tasks 1–6 (scaffold, GitHub client, six parsers, PyPI client, the resolver, kit generators and CLI) and fixed the bugs the first demo exposed.

  • Property-based tests come straight from the design's correctness properties (fast-check, 100 runs each).

  • Agent hooks (.kiro/hooks/): Test on save runs the affected tests and explains any failure; Spec sync checks every change in src/lib/ and mcp/ against the requirements and tasks.

Limits

Python only for now. Lazarus reads the dependency files at the commit you choose; with --override-date it travels back in time for packages, not for the repository's own files. Native/system libraries (CUDA, libxml2…) are outside what a lock file can pin.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to automatically analyze GitHub repositories and set up development environments by detecting tech stacks, installing dependencies, and verifying project builds. Provides safe tools for repository cloning, file system operations, package installation, and build verification through an allowlisted command system.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI coding agents to inspect project dependency versions, resolve version constraints, and audit Python code for deprecated or incompatible APIs using authoritative evidence and local AST analysis.
      3
      MIT