MTG Assistant
unlistedby MIETech LLC.
Manage your Magic: The Gathering collection and deck lists via your notes.
MTG Assistant
MTG Assistant is an Obsidian plugin for working with Magic: The Gathering cards directly inside your notes. It supports inline card references, rendered deck lists, rendered collection lists, collection coverage checks, and a searchable collection overview powered by Scryfall data.
Features
- Inline card references with hover previews in Reading View and Live Preview.
- Rendered deck lists from fenced code blocks.
- Rendered collection lists from fenced code blocks.
- Deck analytics and deck-format validation for supported formats.
- Deck-vs-collection coverage checks, including missing-card cost estimates.
- Editable collection quantities from rendered collection blocks.
- Editable collection quantities from the collection overview view.
- Local caching for card metadata and card images.
- Retry controls for rate-limited lookups.
Disclosures
- Network use: the plugin sends card lookup and image requests to Scryfall to resolve card metadata, legality, prices, and preview images.
- External links: the plugin can generate TCGPlayer links for missing-card shopping, but it does not send your collection data to TCGPlayer unless you choose to open that link.
- Local file access: the plugin reads markdown notes in your configured collection folder and stores local cache files for card metadata and images in your Obsidian config directory under the plugin folder.
- Note modifications: when you use quantity steppers in rendered collection views or the collection overview, the plugin edits the underlying collection code block in the corresponding note.
- Telemetry and ads: the plugin does not include telemetry, analytics, or advertising.
Inline Card References
Use inline references like this anywhere in a note:
[mtg:Lightning Bolt]
[mtg:Sol Ring]
[mtg:Archangel Avacyn]
The plugin renders the reference text as the card name and shows a hover preview with:
- Card image
- Price data when available
- Format legality badges
The card prefix is configurable in plugin settings. The default prefix is mtg.
Deck Lists
Deck lists are rendered from fenced code blocks. The default code block tag is mtg-deck.
```mtg-deck
format: commander
commander: Atraxa, Praetors' Voice
- Creatures:
Birds of Paradise
1 Llanowar Elves
- Artifacts:
Sol Ring
Arcane Signet
```
Deck list behavior:
- One card per line.
- Explicit quantities like
4 Lightning Boltare supported. - Bare card lines like
Sol Ringare treated as quantity1. - An inline
commander:line is supported and preferred for commander-style formats. - Optional section labels are supported.
- A configurable legacy commander section marker is still supported.
- An optional
format:line enables format-specific validation.
Supported deck formats:
standardpioneermodernpaupercommanderbrawldueloathbreakerlegacyvintage
Rendered deck features:
- Sectioned deck table with current price totals
- Hover previews on card names
- Deck legality warnings for banned, not-legal, and restricted cards
- Deck validation for deck size, commander count, singleton rules, and Vintage restricted cards
- Collection coverage against notes in your configured collection folder
- Estimated missing-card cost
- TCGPlayer mass-entry link for missing cards
- Deck analytics including mana curve, type distribution, color identity, and keyword summaries
Collection Lists
Collection lists are rendered from fenced code blocks. The default code block tag is mtg-collection.
```mtg-collection
- Creatures:
4 Llanowar Elves
2 Birds of Paradise
- Artifacts:
1 Sol Ring
```
Rendered collection features:
- Sectioned collection table
- Hover previews on card names
- Color identity badges
- Current unit prices when available
- Inline quantity steppers
- Optional automatic row removal when quantity reaches zero
Collection lists are writable from the rendered view. Adjusting a quantity updates the underlying code block in the note.
Collection Overview
The plugin includes a command:
Open collection overview
The collection overview aggregates collection blocks from the configured collection folder and shows:
- Total cards
- Unique cards
- Estimated collection value
- Search filtering
- Type filtering
- Sorting by mana value, quantity, name, type, collection, unit price, and total value
- Quantity steppers for updating cards directly from the overview
When a card appears in multiple collection notes, the overview still aggregates it into one row while keeping track of the underlying source blocks for edits.
Settings
The settings tab includes:
Card prefixCard image widthFoil price suffixEtched price suffixDeck list code block tagCommander marker (legacy)Collection list code block tagCollections folderRemove collection rows at zero quantityImage cache duration in daysMetadata cache duration in hoursClear metadata cacheClear image cache
Caching
MTG Assistant caches both metadata and images locally to reduce repeated Scryfall requests and improve responsiveness.
- Metadata cache stores resolved card data and price information.
- Image cache stores downloaded card images for hover previews.
- Failed and rate-limited lookups are also handled to avoid wasteful repeated requests.
Example Workflow
- Add inline card references to regular notes for quick previews.
- Keep deck lists in
mtg-deckcode blocks. - Keep owned cards in
mtg-collectioncode blocks inside your collection folder. - Open collection overview to browse and adjust your inventory.
- Use deck rendering to compare a deck against your collection and see what is missing.
Development
For local development in an Obsidian vault:
- Run
npm install. - Run
npm run devornpm run build. - Reload Obsidian.
- Enable
MTG Assistantin Community Plugins.
Current Limitations
- Card resolution uses Scryfall lookup behavior, so ambiguous names may resolve to an unexpected card or printing.
- Source Mode intentionally leaves inline references and code blocks unrendered.
- Collection coverage is based on parsed quantities in collection blocks, not separate database records.
- When a card exists in multiple collection source blocks, overview quantity edits target one tracked source block per adjustment rather than asking you which note to update.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.