MTG Cheaper Deck is a local Python tool that takes a public Moxfield deck URL and surfaces the best cheaper alternatives for each card — ranked by real functional similarity, not just type or color. It syncs the full Scryfall card database locally so lookups are instant, and offers three interfaces to fit your workflow.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/invvd/mtg-cheaper-deck/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Set up the environment, sync Scryfall data, and run your first deck analysis in minutes.
Web App
Browse your deck visually with card images, click-to-replace suggestions, and a live price total.
How Scoring Works
Understand the weighted similarity formula that ranks cheaper card alternatives.
Module Reference
Explore every public function across all Python modules.
What It Does
MTG Cheaper Deck works through a five-step pipeline for every deck you analyze:Fetch the deck from Moxfield
Paste any public Moxfield deck URL. The tool extracts the deck ID and calls the Moxfield API to retrieve every card across commanders, mainboard, and companion boards.
Match cards against the local database
Each Moxfield card is matched to a row in the local Scryfall database — first by Scryfall ID, then by case-insensitive name — giving access to oracle text, keywords, color identity, legalities, and price.
Filter the candidate pool
For each card in the deck, the tool queries the local database for candidates that are cheaper, legal in the deck’s format, and within the card’s color identity — filtering ~38,000 cards down to a small shortlist using indexed SQL queries.
Score by functional similarity
Candidates are ranked by a weighted score combining keyword overlap, oracle text token similarity, mana cost proximity, and EDHREC popularity. Only candidates sharing at least one core card type (Creature, Instant, Sorcery, etc.) are considered.
Three Interfaces
Web App
Full deck view with card images, category filters, sort options, and click-to-replace.
Interactive Terminal
Walk through each card one by one, pick replacements, and see the updated deck list live.
CLI Report
Single-pass table or
--json output — ideal for scripting and pipeline integration.MTG Cheaper Deck is designed for local single-user use. It has no authentication, no session management, and is not hardened for public internet exposure. Run it on your own machine.