I just built a web tool to help validate Magic: The Gathering decklists in custom formats. It automatically fetches card data from Scryfall, checks for banned or illegal cards, and gives instant feedback in your browser.

You can try it here: https://git.disroot.org/hirrolot19/mtg-legality-checker

I hope it’s useful for deckbuilders and casual players alike. I’d love to hear your thoughts, ideas, or suggestions for improving it!

Thanks in advance for checking it out.

  • counterspellOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    22 minutes ago

    MTG Deck Legality Web Checker

    A self-contained web tool for validating Magic: The Gathering decklists in a custom format.
    On first launch, the app automatically downloads and processes all required card data from Scryfall.
    No manual setup beyond running the app is needed.

    This project was inspired by Badaro’s Validator GitHub, a simple web tool for checking card lists in “nostalgia” Magic the Gathering formats: https://badaro.github.io/validator


    Features

    • Automatic setup: Downloads Oracle bulk-data from Scryfall and builds legality files on first run.
    • Custom format validation: Checks decks for banned or out-of-format cards.
    • Browser interface: Paste a decklist, click Validate, and view results instantly.

    Installation

    It is recommended to use a virtual environment to keep dependencies isolated.

    1. Clone the Repository

    git clone https://git.disroot.org/hirrolot19/mtg-legality-checker.git
    cd mtg-legality-checker
    

    2. Create and Activate a Virtual Environment

    python -m venv venv
    source venv/bin/activate
    

    3. Install Dependencies

    pip install -r requirements.txt
    

    Running the App

    From the project root (with the virtual environment activated):

    python app.py
    

    Then open your browser and navigate to:

    http://127.0.0.1:5000/
    

    First Run Behavior

    On first launch, the app will:

    1. Download Scryfall’s Oracle card data.
    2. Filter legal cards for the custom format based on a Scryfall query. Default query is f:standard usd<=1 tix<=0.1
    3. Convert the filtered data into a validation JSON file.

    This process may take a few minutes.
    Once complete, cached files are stored persistently for future sessions.


    Using the Web Checker

    1. Paste your decklist into the text box.
    2. Click Validate.
    3. The app displays any cards that are banned or not legal in the format.

    Decklist Rules

    • One card per line.
    • Quantities accepted (4 Lightning Bolt, 2x Opt).
    • Comments start with #.
    • “Deck” or “Sideboard” headers ignored.

    Advanced Usage

    For detailed information about the supporting scripts and command-line tools, see tools/README.md.