Skip to content

Commit f1a6140

Browse files
authored
Merge pull request #60 from j4th/release/v3.0.0
v3.0.0: Competitive constructed, sideboard strategy, Moxfield search
2 parents 3e7e956 + 4a04570 commit f1a6140

12 files changed

Lines changed: 1148 additions & 19 deletions

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,50 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.0.0] - 2026-04-03
9+
10+
v3.0.0 marks the constructed metagame milestone. The server now covers all major
11+
MTG domains -- Commander, draft/limited, competitive constructed, sideboard strategy,
12+
and deck sharing -- across 8 data sources. This is not a breaking change. All existing
13+
tools retain their parameters and behavior.
14+
15+
### Added
16+
17+
#### Metagame Workflows (4 tools)
18+
- `metagame_snapshot` -- Tiered metagame breakdown (T1/T2/T3) with MTGGoldfish primary, Spicerack fallback
19+
- `archetype_decklist` -- Stock decklist for a competitive archetype with fuzzy name matching
20+
- `archetype_comparison` -- Side-by-side comparison of 2-4 competitive archetypes
21+
- `format_entry_guide` -- Beginner guide for entering a competitive format with budget options
22+
23+
#### Sideboard Workflows (3 tools)
24+
- `suggest_sideboard` -- 15-card sideboard suggestions with format staple markers
25+
- `sideboard_guide` -- In/out plan for a specific matchup with reasoning
26+
- `sideboard_matrix` -- Full sideboard matrix across common matchups
27+
28+
#### Moxfield Provider (2 new tools)
29+
- `moxfield_search_decks` -- Search public Moxfield decks by format, keyword, or sort order
30+
- `moxfield_user_decks` -- List a user's public decks on Moxfield
31+
32+
#### Prompts (2 new, 19 total)
33+
- `explore_format` -- Explore a competitive format's metagame and find your deck
34+
- `build_constructed_deck` -- Build a competitive deck with metagame awareness
35+
36+
#### Infrastructure
37+
- Fuzzy matching utility (`utils/fuzzy.py`) for archetype and matchup name resolution
38+
- `parse_decklist` utility consolidated from duplicated implementations
39+
40+
### Changed
41+
- Moxfield provider: added `search_decks` and `user_decks` tools alongside existing `decklist` and `deck_info`
42+
43+
### Fixed
44+
- `archetype_decklist` double-slug generation causing 404s on MTGGoldfish lookups
45+
- Moxfield `user_decks` search parameter (`filter` not `q`)
46+
47+
### Security
48+
- Upgraded pygments >=2.20.0 to resolve CVE-2026-4539
49+
50+
[3.0.0]: https://github.com/j4th/mtg-mcp-server/compare/v2.2.0...v3.0.0
51+
852
## [2.1.0] - 2026-04-02
953

1054
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ For full architecture details, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
111111
| Doc | Purpose |
112112
|-----|---------|
113113
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | Full technical reference: stack, patterns, structure, decisions |
114-
| [TOOL_DESIGN.md](docs/TOOL_DESIGN.md) | All 51 tools, 17 prompts, 18 resources with inputs/outputs |
114+
| [TOOL_DESIGN.md](docs/TOOL_DESIGN.md) | All 69 tools, 19 prompts, 21 resources with inputs/outputs |
115115
| [SERVICE_CONTRACTS.md](docs/SERVICE_CONTRACTS.md) | API endpoints, rate limits, response shapes |
116116
| [DATA_SOURCES.md](docs/DATA_SOURCES.md) | Data sources evaluated, auth, stability, access patterns |
117117
| [CACHING_DESIGN.md](docs/CACHING_DESIGN.md) | TTL cache strategy, per-method TTLs, bulk data design |

README.md

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
1313
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1414

15-
51 tools, 17 prompts, and 18 resources that give AI assistants deep access to Magic: The Gathering -- card data, combos, draft analytics, Commander metagame, deck building, rules engine, and more. Works with Claude Code, Claude Desktop, or any MCP client.
15+
69 tools, 19 prompts, and 21 resources that give AI assistants deep access to Magic: The Gathering -- card data, combos, draft analytics, Commander metagame, competitive constructed, sideboard strategy, deck building, rules engine, and more. Works with Claude Code, Claude Desktop, or any MCP client.
1616

17-
> Built on data from [Scryfall](https://scryfall.com), [Commander Spellbook](https://commanderspellbook.com), [17Lands](https://www.17lands.com), and [EDHREC](https://edhrec.com). See [Data Sources & Attribution](#data-sources--attribution) for details and usage terms.
17+
> Built on data from [Scryfall](https://scryfall.com), [Commander Spellbook](https://commanderspellbook.com), [17Lands](https://www.17lands.com), [EDHREC](https://edhrec.com), [Moxfield](https://www.moxfield.com), [Spicerack](https://spicerack.gg), and [MTGGoldfish](https://www.mtggoldfish.com). See [Data Sources & Attribution](#data-sources--attribution) for details and usage terms.
1818
1919
## Table of Contents
2020

2121
- [What You Can Do](#what-you-can-do) — example prompts and real tool output
2222
- [Install](#install) — hosted, Claude Code, Claude Desktop, PyPI, development
2323
- [Configuration](#configuration) — environment variables and feature flags
24-
- [Tools](#tools) — all 51 tools across 10 domains
24+
- [Tools](#tools) — all 69 tools across 13 domains
2525
- [Architecture](#architecture) — FastMCP 3.x mount system
2626
- [Stack](#stack) — Python 3.12+, FastMCP, httpx, Pydantic
2727
- [Development](#development) — mise commands for testing, linting, typechecking
2828
- [Documentation](#documentation) — cookbook, architecture, tool reference, and more
2929
- [Status](#status) — current tool/test counts
30-
- [Data Sources & Attribution](#data-sources--attribution) — Scryfall, Spellbook, 17Lands, EDHREC
30+
- [Data Sources & Attribution](#data-sources--attribution) — Scryfall, Spellbook, 17Lands, EDHREC, Moxfield, Spicerack, MTGGoldfish
3131

3232
## What You Can Do
3333

@@ -52,6 +52,12 @@ Ask your AI assistant questions like these and it will use the MTG tools automat
5252
- "How do deathtouch and trample interact?"
5353
- "Resolve this combat scenario: my 3/3 with first strike blocks their 5/5 with trample"
5454

55+
**Constructed**
56+
- "What does the Modern metagame look like right now?"
57+
- "Show me the stock Boros Energy decklist for Modern"
58+
- "Build me a sideboard for this Pioneer deck"
59+
- "Give me a sideboard guide for my deck against Azorius Control"
60+
5561
### See It in Action
5662

5763
> "Compare Muldrotha, Meren, and Karador as graveyard commanders"
@@ -194,7 +200,7 @@ See `.env.example` for all available options including base URLs, rate limits, a
194200

195201
## Tools
196202

197-
51 tools across 10 domains. See [docs/TOOL_DESIGN.md](docs/TOOL_DESIGN.md) for full input/output details.
203+
69 tools across 13 domains. See [docs/TOOL_DESIGN.md](docs/TOOL_DESIGN.md) for full input/output details.
198204

199205
### Card Data (`scryfall_*`)
200206

@@ -244,6 +250,32 @@ See `.env.example` for all available options including base URLs, rate limits, a
244250
| `commander_staples` | Most-played cards for a commander with synergy scores |
245251
| `card_synergy` | Synergy data for a card with a specific commander |
246252

253+
### Decklists (`moxfield_*`)
254+
255+
| Tool | Description |
256+
|------|-------------|
257+
| `decklist` | Fetch a full decklist by deck ID or URL |
258+
| `deck_info` | Deck metadata (name, format, author, dates) |
259+
| `search_decks` | Search public decks by format, keyword, or sort order |
260+
| `user_decks` | List a user's public decks |
261+
262+
### Tournament Data (`spicerack_*`)
263+
264+
| Tool | Description |
265+
|------|-------------|
266+
| `recent_tournaments` | Recent tournaments for a competitive format |
267+
| `tournament_results` | Full standings for a specific tournament |
268+
| `format_decklists` | Top-finishing decklists across recent tournaments |
269+
270+
### Metagame (`goldfish_*`)
271+
272+
| Tool | Description |
273+
|------|-------------|
274+
| `metagame` | Current metagame breakdown for a competitive format |
275+
| `archetype_list` | Sample decklist for an archetype |
276+
| `format_staples` | Most-played cards in a format with deck inclusion % |
277+
| `deck_price` | Estimated paper price for an archetype deck |
278+
247279
### Commander Workflows
248280

249281
| Tool | Description |
@@ -280,11 +312,18 @@ See `.env.example` for all available options including base URLs, rate limits, a
280312
| `draft_signal_read` | Detect open colors from draft picks |
281313
| `draft_log_review` | Pick-by-pick review of a completed draft with grade |
282314

283-
### Constructed
315+
### Constructed Workflows
284316

285317
| Tool | Description |
286318
|------|-------------|
287319
| `rotation_check` | Standard rotation status and rotating cards |
320+
| `metagame_snapshot` | Tiered metagame breakdown with prices |
321+
| `archetype_decklist` | Stock decklist for a competitive archetype |
322+
| `archetype_comparison` | Compare 2-4 archetypes side-by-side |
323+
| `format_entry_guide` | Beginner guide for entering a competitive format |
324+
| `suggest_sideboard` | 15-card sideboard suggestions for a deck |
325+
| `sideboard_guide` | In/out plan for a specific matchup |
326+
| `sideboard_matrix` | Sideboard matrix across common matchups |
288327

289328
### Rules Engine
290329

@@ -307,7 +346,10 @@ MTG (orchestrator)
307346
├── draft (namespace: draft_) -> 17Lands data
308347
├── edhrec (namespace: edhrec_) -> EDHREC (scraped, feature-flagged)
309348
├── bulk (namespace: bulk_) -> Scryfall Oracle Cards bulk data
310-
└── workflows (no namespace) -> 27 tools (22 composed + 5 rules)
349+
├── moxfield (namespace: moxfield_) -> Moxfield (reverse-engineered, feature-flagged)
350+
├── spicerack (namespace: spicerack_) -> Spicerack tournament API
351+
├── goldfish (namespace: goldfish_) -> MTGGoldfish (scraped, feature-flagged)
352+
└── workflows (no namespace) -> 36 tools (31 composed + 5 rules)
311353
```
312354

313355
Services are pure async API clients. Providers register MCP tools. Workflows compose across services with partial failure tolerance. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full picture.
@@ -317,12 +359,13 @@ Services are pure async API clients. Providers register MCP tools. Workflows com
317359
| | |
318360
|---|---|
319361
| Runtime | Python 3.12+, uv |
320-
| MCP | FastMCP 3.1.x |
362+
| MCP | FastMCP 3.2.x |
321363
| HTTP | httpx (async) |
322364
| Validation | Pydantic v2 |
323365
| Logging | structlog |
324366
| Tooling | mise, ruff, ty (Astral) |
325367
| Testing | pytest, respx, pytest-asyncio |
368+
| HTML parsing | selectolax |
326369

327370
## Development
328371

@@ -347,7 +390,7 @@ mise run fix # Auto-fix lint and format issues
347390
| Doc | What it covers |
348391
|-----|----------------|
349392
| [COOKBOOK.md](docs/COOKBOOK.md) | Usage recipes -- Commander, draft, deck building, rules workflows |
350-
| [TOOL_DESIGN.md](docs/TOOL_DESIGN.md) | Full reference for all 51 tools, 17 prompts, 18 resources |
393+
| [TOOL_DESIGN.md](docs/TOOL_DESIGN.md) | Full reference for all 69 tools, 19 prompts, 21 resources |
351394
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | Technical architecture, FastMCP patterns, design decisions |
352395
| [SERVICE_CONTRACTS.md](docs/SERVICE_CONTRACTS.md) | API endpoints, rate limits, response shapes per backend |
353396
| [DATA_SOURCES.md](docs/DATA_SOURCES.md) | All data sources with auth, stability, and access patterns |
@@ -357,7 +400,7 @@ mise run fix # Auto-fix lint and format issues
357400

358401
## Status
359402

360-
51 tools, 17 prompts, 18 resource templates. 989 tests at 88% coverage.
403+
69 tools, 19 prompts, 21 resource templates. 1340 tests at 88% coverage.
361404

362405
| Phase | What | Status |
363406
|-------|------|--------|
@@ -369,6 +412,10 @@ mise run fix # Auto-fix lint and format issues
369412
| 5 | Analysis & comparison workflows, prompts, resources (4 tools) | Done |
370413
| Branch A | Structured output, rules engine, validation tools (17 tools) | Done |
371414
| Branch B | Format workflows -- deck building, commander depth, limited, constructed (11 tools) | Done |
415+
| Moxfield | Moxfield decklist provider (4 tools) | Done |
416+
| Spicerack | Tournament results provider (3 tools) | Done |
417+
| MTGGoldfish | Metagame data provider (4 tools) | Done |
418+
| v2.3.0 | Metagame workflows, sideboard tools, Moxfield search (9 tools) | Done |
372419

373420
## Data Sources & Attribution
374421

@@ -378,8 +425,9 @@ This project composes data from multiple third-party services:
378425
- **[Commander Spellbook](https://commanderspellbook.com)** -- Combo search, bracket estimation ([MIT license](https://github.com/SpaceCowMedia/commander-spellbook-backend))
379426
- **[17Lands](https://www.17lands.com)** -- Draft card ratings, archetype win rates ([usage guidelines](https://www.17lands.com/usage_guidelines))
380427
- **[EDHREC](https://edhrec.com)** -- Commander staples, synergy scores (undocumented endpoints, behind feature flag)
381-
382-
Scryfall bulk data (Oracle Cards) replaced MTGJSON in v2.0 for richer card information including prices, legalities, images, and EDHREC rank.
428+
- **[Moxfield](https://www.moxfield.com)** -- Public decklists and deck search (reverse-engineered API, behind feature flag)
429+
- **[Spicerack](https://spicerack.gg)** -- Tournament results and standings ([documented API](https://docs.spicerack.gg))
430+
- **[MTGGoldfish](https://www.mtggoldfish.com)** -- Competitive metagame data, archetypes, format staples (HTML scraping, behind feature flag)
383431

384432
See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for full license texts and usage terms.
385433

docs/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Claude Code / claude.ai / any MCP client
2525
│ stdio (default) or streamable HTTP
2626
2727
┌─────────▼──────────┐
28-
│ MTG Orchestrator │ ← FastMCP("MTG"), 69 tools, 19 prompts, 20 resources
28+
│ MTG Orchestrator │ ← FastMCP("MTG"), 69 tools, 19 prompts, 21 resources
2929
│ │
3030
│ Workflow Tools: │ ← Compose across backends (no namespace)
3131
│ Commander: │ Draft/Limited:

docs/COOKBOOK.md

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,121 @@ targeting your creature with ward will not trigger it.
512512

513513
---
514514

515+
## Constructed
516+
517+
### Explore a Format's Metagame
518+
519+
You want to see what people are playing in a competitive format.
520+
521+
**Tools involved:**
522+
- `metagame_snapshot`
523+
- `archetype_decklist`
524+
525+
**Prompts:**
526+
527+
> What does the Modern metagame look like right now?
528+
529+
**Example output** (from `metagame_snapshot`)**:**
530+
531+
```
532+
Modern Metagame Snapshot
533+
534+
Tier 1 (>10% meta share):
535+
Boros Energy 20.3% 142 decks ~$348
536+
Mardu Energy 11.5% 80 decks ~$412
537+
538+
Tier 2 (3-10%):
539+
Azorius Control 5.2% 36 decks ~$520
540+
Jeskai Control 4.8% 33 decks ~$485
541+
Golgari Midrange 3.9% 27 decks ~$380
542+
543+
Tier 3 (<3%):
544+
Living End 2.1% 15 decks ~$290
545+
Goryo's Vengeance 1.8% 12 decks ~$325
546+
...
547+
```
548+
549+
Drill into a specific deck:
550+
551+
> Show me the stock Boros Energy decklist for Modern.
552+
553+
**Tips:** The `explore_format` prompt chains metagame exploration with archetype details automatically.
554+
555+
---
556+
557+
### Build a Sideboard
558+
559+
You have a mainboard and need a sideboard plan.
560+
561+
**Tools involved:**
562+
- `suggest_sideboard`
563+
- `sideboard_guide`
564+
- `sideboard_matrix`
565+
566+
**Prompts:**
567+
568+
> Suggest a sideboard for this Modern deck:
569+
>
570+
> 4 Lightning Bolt
571+
> 4 Monastery Swiftspear
572+
> ... (paste full mainboard)
573+
574+
For a specific matchup plan:
575+
576+
> Give me a sideboard guide for my deck against Azorius Control.
577+
578+
For the full matrix:
579+
580+
> Generate a sideboard matrix for my deck across the top Modern matchups.
581+
582+
**What you get:** `suggest_sideboard` provides 15 categorized cards (graveyard hate, removal, counterspells, etc.) with format staple markers. `sideboard_guide` gives an in/out plan with reasoning per card. `sideboard_matrix` shows a grid with each sideboard card vs. each matchup as IN/OUT/FLEX.
583+
584+
**Tips:** The `build_constructed_deck` prompt walks through the full flow from metagame analysis to sideboard construction. Archetype names use fuzzy matching -- "boros energy" and "Boros Energy" both work.
585+
586+
---
587+
588+
### Find Tournament Results
589+
590+
You want to see what won recent events.
591+
592+
**Tools involved:**
593+
- `spicerack_recent_tournaments`
594+
- `spicerack_tournament_results`
595+
- `spicerack_format_decklists`
596+
597+
**Prompts:**
598+
599+
> What Legacy tournaments happened in the last two weeks?
600+
601+
> Show me the top 8 standings from that tournament.
602+
603+
> Show me the top-finishing decklists in Modern from the last two weeks.
604+
605+
**What you get:** Tournament listings with dates and player counts, full standings with Swiss and bracket records, and links to top-finishing decklists on Moxfield.
606+
607+
---
608+
609+
### Search for Decks on Moxfield
610+
611+
You want to find decklists for inspiration.
612+
613+
**Tools involved:**
614+
- `moxfield_search_decks`
615+
- `moxfield_user_decks`
616+
- `moxfield_decklist`
617+
618+
**Prompts:**
619+
620+
> Search Moxfield for Modern decks.
621+
622+
> Show me all public decks by user "aspiringspike".
623+
624+
> Fetch the decklist from this Moxfield URL: https://www.moxfield.com/decks/abc123
625+
626+
**What you get:** Paginated deck search results with format, author, colors, and dates. User deck listings. Full decklists organized by board (mainboard, sideboard, commanders).
627+
628+
---
629+
515630
## What's Next
516631

517-
This cookbook covers the most common workflows. For the full list of all 51 tools, 17 prompts, and 18 resource templates, see [TOOL_DESIGN.md](TOOL_DESIGN.md).
632+
This cookbook covers the most common workflows. For the full list of all 69 tools, 19 prompts, and 21 resource templates, see [TOOL_DESIGN.md](TOOL_DESIGN.md).

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Technical reference for the MTG MCP server. For installation and usage, see the
1111
| [DATA_SOURCES.md](DATA_SOURCES.md) | All data sources evaluated with stability and access patterns |
1212
| [CACHING_DESIGN.md](CACHING_DESIGN.md) | TTL cache strategy, per-method TTLs, Scryfall bulk data design |
1313
| [RELEASE_NOTES_v2.md](RELEASE_NOTES_v2.md) | v2.0.0 milestone summary |
14+
| [RELEASE_NOTES_v3.md](RELEASE_NOTES_v3.md) | v3.0.0 milestone summary |

0 commit comments

Comments
 (0)