{"openapi":"3.1.0","info":{"title":"MTG Sim — Magic: The Gathering simulator for your AI: goldfish, mulligan & draw sims, Commander/EDH legality, mana curve","version":"1.0.0","description":"MTG Sim: a Magic: The Gathering simulator inside your AI (MCP server + pay-per-call API). Goldfish simulator and London mulligan sim for a pasted decklist (seeded Monte Carlo), draw odds and opening-hand odds (exact hypergeometric, joint odds for several cards, on the play or draw), land count and colored-source calculator, plus a FREE deck legality check (Standard, Pioneer, Modern, Legacy, Vintage, Pauper, Commander/EDH color identity and ban list) with mana curve. Works in Claude, ChatGPT, Cursor and VS Code. Paid tools from $0.001 via MPP on Tempo, no account; invalid input is never charged. Docs: https://mtg-sim.fmf-x402.workers.dev/docs — copy-paste examples for the mppx CLI, curl, the TypeScript SDK (mppx) and the Python SDK (pympp), plus an MCP config. Machine-readable: https://mtg-sim.fmf-x402.workers.dev/llms.txt and https://mtg-sim.fmf-x402.workers.dev/openapi.json. MCP (Streamable HTTP): https://mtg-sim.fmf-x402.workers.dev/mcp. Fleet of sister services: https://mpp-docs.fmf-x402.workers.dev, https://mpp-agent-data.fmf-x402.workers.dev, https://mpp-tools.fmf-x402.workers.dev, https://mpp-ai.fmf-x402.workers.dev, https://mpp-browser.fmf-x402.workers.dev, https://mpp-research.fmf-x402.workers.dev, https://mpp-chain.fmf-x402.workers.dev, https://mpp-stt.fmf-x402.workers.dev, https://mpp-compat.fmf-x402.workers.dev, https://mpp-domain.fmf-x402.workers.dev, https://mpp-utils.fmf-x402.workers.dev, https://mtg-sim.fmf-x402.workers.dev, https://controlplane-x402.fmf-x402.workers.dev. MTG Sim is unofficial Fan Content permitted under the Wizards of the Coast Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. ©Wizards of the Coast LLC. Card data from Scryfall (free, never paywalled). Paid tools sell only our own computation (probability and simulation on what you send) and return no card data.","x-guidance":"POST JSON (or GET with query params) to any /mpp/* route and pay the 402 challenge with MPP on Tempo (USDC.e or pathUSD, WWW-Authenticate: Payment) or x402 v2 on Base (USDC, PAYMENT-REQUIRED / PAYMENT-SIGNATURE headers). Bad input or an upstream failure returns 402 with an error and you are not charged.","contact":{"name":"FMF Tools","url":"https://mtg-sim.fmf-x402.workers.dev/docs","email":"fmf-tools@agentmail.to"},"x-docs":"https://mtg-sim.fmf-x402.workers.dev/docs","x-mcp":"https://mtg-sim.fmf-x402.workers.dev/mcp","x-llms":"https://mtg-sim.fmf-x402.workers.dev/llms.txt","x-fmf-id":"tcg"},"servers":[{"url":"https://mtg-sim.fmf-x402.workers.dev"}],"paths":{"/mpp/mtg/draw-odds":{"post":{"operationId":"mtg_draw_odds","summary":"MTG draw sim: exact odds to draw your cards by turn N","description":"Exact odds of drawing one or more cards (or card groups, jointly) in the opening hand and by each turn, on the play or on the draw. \"What are my odds of having Lightning Bolt and 2 lands by turn 2?\" Presets: mtg (60), commander (99 library, draws turn 1), limited (40), plus pokemon, yugioh, lorcana, onepiece. Exact hypergeometric, no sampling error. Price $0.001 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","description":"mtg | commander | limited (also pokemon, yugioh, lorcana, onepiece). Default mtg."},"cards":{"type":"array","description":"Card groups: [{\"name\":\"Lightning Bolt\",\"copies\":4,\"min\":1}, {\"name\":\"lands\",\"copies\":20,\"min\":2}] (max 6)"},"turn":{"type":"integer","description":"Last turn to report (1-20, default 4)"},"on_play":{"type":"boolean","description":"true = on the play (no turn-1 draw in 1v1 Magic); default true"},"deck_size":{"type":"integer","description":"Override deck/library size"}},"required":["cards"]},"example":{"format":"mtg","cards":[{"name":"Lightning Bolt","copies":4,"min":1},{"name":"lands","copies":20,"min":2}],"turn":3,"on_play":true}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/mpp/mtg/land-count":{"post":{"operationId":"mtg_land_count","summary":"MTG mana sim: land count and color sources","description":"How many lands should my deck play, and how many sources of each color do I need? Returns the land count needed to hit each land drop on curve at your target probability (default 90%), checks your current land count turn by turn, and gives colored-source counts for casting e.g. RR on turn 2. Works for 60-card, Commander (99) and Limited (40). Exact hypergeometric. Price $0.001 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","description":"mtg | commander | limited"},"lands":{"type":"integer","description":"Your current land count (optional)"},"curve_top":{"type":"integer","description":"Mana value you want to cast on curve (e.g. 4)"},"colors":{"type":"array","description":"[{\"color\":\"R\",\"pips\":2,\"turn\":2}]"},"probability":{"type":"number","description":"Target probability, default 0.9"},"on_play":{"type":"boolean","description":"Default true"}}},"example":{"format":"mtg","lands":24,"curve_top":4,"colors":[{"color":"R","pips":2,"turn":2}],"probability":0.9}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/mpp/mtg/goldfish":{"post":{"operationId":"mtg_goldfish","summary":"MTG goldfish simulator + mulligan sim for a pasted decklist","description":"Paste a decklist (Arena, MTGO, Moxfield or plain \"4 Card Name\") and get a seeded Monte Carlo goldfish: London-mulligan rate with your keep rule, land drops and mana screw by turn, and the odds of your own goals (\"Goblin Guide on turn 1\", \"2 creatures and 2 lands by turn 3\"). Basics are detected by name; tag other lands and groups via tags (the free mtg_deck_check returns ready-made goldfish_tags). Up to 20,000 games; same seed = same answer. Price $0.003 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decklist":{"type":"string","description":"Pasted decklist, one card per line"},"format":{"type":"string","description":"mtg | commander | limited"},"tags":{"type":"object","description":"{\"land\":[\"Inspiring Vantage\"],\"creature\":[\"Goblin Guide\"]}"},"goals":{"type":"array","description":"[{\"name\":\"T1 Guide\",\"turn\":1,\"need\":[{\"card\":\"Goblin Guide\"}]},{\"name\":\"T3 two creatures\",\"turn\":3,\"lands_in_play\":2,\"need\":[{\"group\":\"creature\",\"min\":2}]}]"},"keep":{"type":"object","description":"{\"min_lands\":2,\"max_lands\":5,\"max_mulligans\":2}"},"turns":{"type":"integer","description":"1-12, default 6"},"iterations":{"type":"integer","description":"100-20000, default 10000"},"seed":{"type":"integer","description":"RNG seed, default 1"},"on_play":{"type":"boolean","description":"Default true"}},"required":["decklist"]},"example":{"decklist":"4 Goblin Guide\n4 Monastery Swiftspear\n4 Lightning Bolt\n4 Lava Spike\n4 Rift Bolt\n4 Skewer the Critics\n4 Light Up the Stage\n4 Eidolon of the Great Revel\n4 Searing Blaze\n4 Skullcrack\n20 Mountain","tags":{"creature":["Goblin Guide","Monastery Swiftspear","Eidolon of the Great Revel"]},"goals":[{"name":"Goblin Guide on turn 1","turn":1,"need":[{"card":"Goblin Guide"}]},{"name":"two creatures and 2 lands by turn 3","turn":3,"lands_in_play":2,"need":[{"group":"creature","min":2}]}],"turns":4,"iterations":5000,"seed":7}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}}},"externalDocs":{"description":"Copy-paste examples (CLI, curl, TypeScript, Python, MCP)","url":"https://mtg-sim.fmf-x402.workers.dev/docs"},"components":{"securitySchemes":{"Payment":{"type":"http","scheme":"Payment","description":"MPP Payment credential on Tempo (USDC.e or pathUSD). Clients such as mppx handle the 402 challenge automatically. See https://mpp.dev/sdk"}}},"tags":[{"name":"paid","description":"Pay-per-call MPP routes. Unpaid requests receive 402. Invalid input is not charged."},{"name":"discovery","description":"Free discovery surfaces: /docs, /llms.txt, /openapi.json, /mcp, /health."}]}