lorcana-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LORCANA_API | No | URL to fetch cards API | https://danielenricocahall.github.io/lorcana-mcp/allCards.json |
| LORCANA_CACHE_PATH | No | Local file path for caching fetched cards | cards.json |
| LORCANA_SKIP_IF_DB_EXISTS | No | Skip API fetch if cache file already contains cards | true |
| LORCANA_REFRESH_ON_STARTUP | No | Always fetch from API on startup if true | false |
| LORCANA_HTTP_TIMEOUT_SECONDS | No | HTTP timeout in seconds | 60 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use this server to search and aggregate Disney Lorcana cards. Loaded 2753 cards on startup (mode=fetched). Valid color names: ruby, sapphire, emerald, amber, amethyst, steel. To count cards matching a filter (e.g. 'how many ruby cards?'), use count_cards. To get a breakdown of all cards by color, use aggregate_cards(field='color'). To retrieve card details or browse cards, use search_cards.
Disney Lorcana Game Rules
Win Condition
First player to reach 20 lore wins.
Card Text Symbols
Card full_text strings use these symbols. Decode them when reading abilities:
{E}— exert (rotate the card sideways; marks it as used until your next Ready Step). Used as a cost, e.g.{E} —means "exert this card to:".{I}— ink (the resource paid from your inkwell). E.g.2 {I}means "pay 2 ink".{S}— Strength.{L}— Lore.{W}— Willpower.
When summarizing cards or quoting their text to a user, always translate these symbols into their decoded form rather than echoing the raw symbol. Write "4 ink" not "4 {I}", "exert" not "{E}", "3 strength" not "3 {S}". The braces are an internal data format; users shouldn't see them.
Deck Building
Minimum 60 cards per deck. 60 is the standard size; there is no maximum, but larger decks dilute the chance of drawing any specific card.
Maximum 4 copies of any card (matched by full name).
Maximum 2 ink colors per deck (Amber, Amethyst, Emerald, Ruby, Sapphire, Steel).
Dual-ink cards (introduced in Set 7) have two ink colors. To include a dual-ink card in your deck, the deck MUST contain both of that card's colors. A dual-ink card cannot go in a deck that only uses one of its colors (e.g., a Ruby/Sapphire dual-ink card requires a Ruby+Sapphire deck). Dual-ink cards do not allow a third color — the 2-color limit still applies.
Game Setup
Each player draws 7 cards. Before the first turn, each player may mulligan: put any number of cards on the bottom of their deck, then draw that many (once only, no shuffle).
First player skips their draw step on turn 1.
Turn Structure
Beginning Phase (in order):
Ready Step - un-exert all your cards.
Set Step - resolve "at the start of your turn" triggers. Locations passively gain lore here.
Draw Step - draw 1 card (first player skips this on turn 1).
Main Phase (any order, as many actions as able):
Optionally add one inkable card face-down to your inkwell (at most once per turn).
Play a card by exerting inkwell cards equal to its cost.
Quest with a ready character (exert to gain lore equal to its lore value).
Challenge with a ready character (exert to fight an opponent's exerted character).
Use character or item abilities.
Move a character to a location (pay the location's move cost).
Ink System
Your inkwell is your resource pool. Only cards with the inkwell icon are inkable.
Exert inkwell cards to pay costs. They ready during your Ready Step.
Cards added to the inkwell are placed face-down and remain hidden — your opponent never sees what you've inked.
Summoning Sickness ("The Ink Is Drying")
Characters CANNOT quest, challenge, or use exert-based abilities on the turn they are played.
Rush is the only exception: Rush characters can challenge (but not quest) on the turn they are played.
Shift bypasses summoning sickness if the character underneath was already in play from a previous turn. When shifting onto two characters at once (Duo/Combo Shift), BOTH must have been in play from a previous turn, or the shifted character is summoning-sick.
Items are NOT subject to summoning sickness — they can be used immediately.
Locations are NOT subject to summoning sickness — they passively gain lore starting on your next Set Step.
Questing
Exert a ready character to gain lore equal to its lore value.
The character stays exerted until your next Ready Step (vulnerable to challenges).
Challenging
Exert a ready character to challenge an opponent's EXERTED character.
You can only challenge exerted characters (unless an ability says otherwise).
Locations can also be challenged at any time — see Card Types → Location for details.
Both characters deal simultaneous damage equal to their Strength.
Damage >= Willpower = banished (sent to discard pile).
Damage from abilities (e.g., "deal 2 damage to chosen character") also causes banishing at damage >= Willpower.
Damage persists between turns and is not removed during the Ready Step.
Card Types
Character - Has Strength, Willpower, and Lore. Can quest and challenge. Subject to summoning sickness. Action - One-time effect, then discarded. Actions (including Songs) can only be played on your own turn during your Main Phase. There is no per-turn limit on how many actions you can play (unlike inking, which is once per turn). Song - Subtype of Action. Can be played by paying its ink cost normally OR sung for free by an eligible character. Singing eligibility (this is the rule that's easy to miss):
Default rule (no keyword required): ANY character whose own ink cost is greater than or equal to the song's cost can exert to sing it for free. A 4-cost character can sing any song costing 4 or less. A 5-cost character can sing any song costing 5 or less. Etc.
Singer N (keyword) extends this: a character with
Singer Ncan sing songs costing up to N regardless of the character's own cost — useful on cheap characters.Sing Together N (keyword on the song itself): multiple of your characters can sing the song together if their combined cost ≥ N.
Voiceless (keyword) prevents a character from singing at all.
In every case, the singing character(s) must be ready and not have summoning sickness. Bottom line: the threshold for singing a song is the song's cost, not the presence of a Singer keyword. Item - Stays in play. No summoning sickness. Cannot quest or challenge, and cannot be challenged. Items can have passive abilities or activated abilities that require exerting the item (e.g., "Exert this item to give a character +1 lore this turn"). Exerting an item has no downside beyond the item being unavailable until your next Ready Step. Location - Stays in play. Has Willpower, Lore, and a Move Cost.
Locations have NO ready/exerted state — they are always played horizontally and stay that way.
Locations passively gain lore equal to their lore value during the Set Step of your Beginning Phase (no exertion needed). Some locations have 0 lore and provide other benefits instead.
Pay a location's move cost to move a character there. A character can be at one location at a time.
Opponents can challenge a location at any time (since locations are never "ready" to protect them). The attacker deals Strength damage but the location deals none back.
Location banished at damage >= Willpower; characters there remain in play but lose location bonuses.
Reading Card Text
Card abilities follow a few common patterns. Decoding them correctly is more important than memorizing every keyword.
Triggered abilities fire automatically when their condition is met. The controller of the ability resolves it (chooses targets, makes decisions).
"When you play this character..." — fires on entry to play. Every play of the card triggers this; "play" is the only way cards enter play in Lorcana.
"Whenever this character quests / challenges / is banished..." — fires every time the condition occurs.
"At the start of your turn..." — fires during your Set Step (see Beginning Phase).
"At the end of your turn..." — fires as your turn ends, before your opponent's turn begins.
Activated abilities are written as <cost> — <effect> (often {E} — to exert, or
<N> {I} — to pay ink). The controller pays the cost to fire the effect.
"Once during your turn" (the canonical Lorcana phrasing; "once per turn" appears occasionally) means the activated ability can be used at most once each turn.
Targeting. "Chosen character/item/location" means the controller of the ability picks a legal target. "Chosen opposing character" restricts the choice to the opponent's side. Targeting respects keywords like Ward (opponents can't target this card) and Evasive (only Evasive characters can challenge it).
Banish vs discard. Banish sends a card from play to its owner's discard pile (the Lorcana term for "destroyed"). Discard most often refers to discarding from hand. Both physically end up in the same discard pile, but a trigger that fires on banishing does NOT fire on a hand discard, and vice versa.
Look at vs Reveal vs Search.
"Look at the top N cards of your deck" — private to you. Often paired with a follow-up like "Put one into your hand and the rest on the bottom in any order."
"Reveal..." — shown to all players.
"Search your deck for..." — find a specified card; the deck is then shuffled.
Keywords
Bodyguard - Enters play exerted. Opponents must challenge this character before other non-Bodyguard characters you control. (Opponents are not forced to challenge, but if they do, they must target a Bodyguard if one is exerted.) If multiple Bodyguards are exerted, the opponent chooses which to challenge.
Challenger +N - Gets +N Strength when initiating a challenge (not when defending).
Evasive - Can only be challenged by other Evasive characters. Can challenge non-Evasive characters normally.
Reckless - Must challenge each turn if able. Cannot quest if a valid challenge target exists.
Resist +N - Takes N less damage from all sources. Minimum 0 damage.
Rush - Can challenge on the turn it is played (bypasses summoning sickness for challenging only, not questing).
Shift N - Play on top of an existing character with the same name, paying N ink instead of full cost. Name matching uses the base name only — any "Elsa" can shift onto any other "Elsa" regardless of subtitle/version. The shifted character inherits position (ready/exerted) and damage, and can take any action the character underneath could have taken this turn. If the base character was already in play from a prior turn, the shifted character is NOT subject to summoning sickness. A few cards use a non-ink Shift cost (e.g. "Shift: Discard 2 cards"). The card on top and the card(s) beneath it form a stack: only the top card is in play, and when it leaves play every card in the stack goes to the same zone with it (all to the discard when banished, even if an effect would send the top card elsewhere).
Dual-named characters and Shift. A character whose name line joins two names with "&" has THREE names: each half plus the combined name. "Aladdin & Genie - Mischievous Pals" is a character named Aladdin, a character named Genie, AND a character named Aladdin & Genie. ("Chip 'n' Dale - Recovery Rangers" is treated as if it had the ampersand.) Two consequences:
An effect referencing "characters named Aladdin" includes it; an effect naming "Aladdin & Genie" matches only the combined card, not a plain Aladdin or a plain Genie.
Plain Shift on a dual-named card can land on either half. Aladdin & Genie - Mischievous Pals (Shift 3) shifts onto any Aladdin or any Genie — one character, your choice. This is ordinary Shift plus the name rule, not a special keyword. Same for Carl Fredricksen & Russell, Lilo & Stitch, Woody & Buzz Lightyear, Belle & Beast, Peter Pan & Tinker Bell, and the rest of the "Team" cycle.
Shift variants. Shift has six variants. All follow the base Shift rules except as noted. If a card combines two variants in one ability (e.g. "Temporary Red Panda Shift"), ALL of their conditions apply.
[Classification] Shift N - shift onto any of your characters with that classification instead of matching the name: Puppy Shift, Madrigal Shift, Floodborn Shift, Red Panda Shift, etc.
Universal Shift N - shift onto any of your characters.
Duo Shift N - shift onto TWO of your characters, one matching each name on the card. Both are required; you cannot Duo Shift onto just one. Mickey Mouse & Minnie Mouse - Adventuring Duo has Duo Shift 0, so with a Mickey and a Minnie in play it costs nothing to play.
Combo Shift N - base Shift and Duo Shift on the same card: shift onto ONE character matching either name, OR onto TWO characters, one matching each name. Same cost either way (Sulley & Boo - Scare Buddies, Combo Shift 4; Dash Parr & Violet Parr - Super Siblings, Combo Shift 6).
Temporary Shift N - shift as normal, but at the end of your turn, if the card is still in play, remove all damage from the character and return ONLY the top card to your hand. The card underneath stays in play and becomes the character again — undamaged, since the damage was removed first. The returned card can be shifted down again on a later turn (Meilin Lee, Ming Lee, Grandma Wu).
Potato Shift N - shift onto one of your ITEMS named Potato rather than onto a character. When shifting onto a non-character, the shifted character is dry only if that card has been in play since the start of your turn (Posey - Vampire Potato).
Shifting onto two characters (Duo Shift / Combo Shift). Stack the two cards under the shifted card in any order; the result is still a single character. Each state resolves to the worse of the two:
Ready + exerted → the shifted character is exerted. It is ready only if BOTH were ready.
Dry + drying → the shifted character is drying (summoning-sick). It is dry, and can quest, challenge, use exert abilities, and sing, only if BOTH were already in play from a prior turn.
Damage carries over from the characters underneath, so damage on both is combined onto the single shifted character. (Damage counters stay physically on the stack; the rules state the shifted character retains the damage of what it was played on top of.)
It is a 2-for-1 in board presence: two of your characters become one, for one Shift cost.
Some cards grant Shift eligibility rather than having it — Morph - Little Imitator reads "You can shift any character on top of this character," and that includes every Shift variant.
Singer N - Lets a character sing songs costing up to N regardless of the character's own cost (see Card Types → Song for the full singing rules, including the default rule that any character with cost ≥ the song's cost can sing it without needing the Singer keyword).
Sing Together N - Keyword on the song. Any number of your (and your teammates', in multiplayer) characters whose combined cost is at least N may exert together to sing this song for free. Each participating character must be ready and not have summoning sickness.
Support - When questing, may add this character's Strength to another chosen character until your next turn.
Voiceless - Character cannot sing songs at all (overrides the default singing rule and Singer N).
Ward - Cannot be targeted by opponent's abilities or effects. Does NOT prevent being challenged. AoE effects ("all characters") still affect Ward characters.
Vanish - When an opponent chooses this character as the target of an action, this character is banished. Vanish is a downside on its bearer — opponent actions that target the card become free removal (even soft effects like "exert chosen character" banish it outright). Vanish cards typically carry above-rate stats or stronger-than-usual abilities to compensate for the drawback. Some Illusion-tribal builds turn the banish into upside via "when one of your characters is banished" triggers, but the default reading is "this card is easier for opponents to remove — play around opponent targeting."
Boost N - Once per turn, pay N ink to put the top card of your deck face-down under this character. The face-down card is not in play and cannot be looked at. Cards placed underneath typically enable the character's secondary ability (e.g., stat buffs while boosted, triggered effects on quest/challenge, or effects that fire when a card is placed underneath). Boost costs vary (1, 2, or 3 ink).
Additional Rules
Deck out: If your deck is empty, you do not lose. You simply cannot draw. The game continues until a player reaches 20 lore.
Classification traits: Characters have classification traits (Storyborn, Dreamborn, Floodborn) that may be referenced by card abilities. Floodborn characters are typically the ones with the Shift keyword. These traits also appear in subtypes alongside character traits (Hero, Villain, Princess, etc.).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_cardsA | Search Lorcana cards with optional filters. Returns card objects (not counts). Color must be one of: ruby, sapphire, emerald, amber, amethyst, steel. Use card_type to filter by card type: Character, Action, Item, Song, or Location. Use min_attack/max_attack and min_defence/max_defence for stat-based queries (e.g. 'characters with 4+ strength'). Use min_cost/max_cost for cost ranges. Use keyword to filter by Lorcana keyword (Bodyguard, Challenger, Evasive, Reckless, Resist, Rush, Shift, Singer, Sing Together, Support, Vanish, Voiceless, Ward, etc.) — matches against the structured ability list, more reliable than substring search. Use body_text to search card ability text — useful for value-specific keyword queries like 'Singer 5' or 'Resist +2', or for non-keyword phrases like 'gain 2 lore'. Use lore/min_lore/max_lore to filter by lore value. Use sort_by to order results (id, name, cost, strength, willpower, lore, rarity, set_code); use sort_order='asc' or 'desc'. Use set_code to filter by set number (e.g. '1' for The First Chapter). Use set_name to filter by set name as a case-insensitive substring (e.g. 'Wilds Unknown', 'frozen', 'Floodborn') — preferred when the user names a set in plain English so you don't have to look up the code first. Use offset to paginate through results (e.g. offset=20 for the next page). Use count_cards instead if you only need a total count. Set response_format='toon' to receive a TOON-encoded string instead of JSON objects (~10% fewer tokens; the printings array is nested so the savings are smaller than a purely flat schema would yield); default is 'json'. |
| count_cardsA | Count cards matching the given filters. Use this for questions like 'how many ruby cards are there?' or 'how many evasive characters?'. Supports stat ranges: min_attack/max_attack, min_defence/max_defence, min_cost/max_cost. Use keyword to filter by Lorcana keyword (Bodyguard, Challenger, Evasive, Reckless, Resist, Rush, Shift, Singer, Sing Together, Support, Vanish, Voiceless, Ward, etc.) — matches against the structured ability list. Use body_text for value-specific keyword queries like 'Singer 5' or 'Resist +2', or for non-keyword phrases like 'gain 2 lore'. Use lore/min_lore/max_lore to filter by lore value. Use card_type to filter by card type: Character, Action, Item, Song, or Location. Use set_code to filter by set number (e.g. '1' for The First Chapter). Use set_name to filter by set name as a case-insensitive substring (e.g. 'Wilds Unknown', 'frozen') — preferred when the user names a set in plain English. Color must be one of: ruby, sapphire, emerald, amber, amethyst, steel. |
| aggregate_cardsA | Return card counts grouped by a field. Valid fields: cost (ink curve), rarity, color, set_code, type. Examples: aggregate_cards('cost') for the ink curve, aggregate_cards('color') for color breakdown, aggregate_cards('rarity') for rarity breakdown, aggregate_cards('set_code') for set distribution. |
| top_traitsC | Return most common traits. |
| resolve_cardA | Resolve an informal, partial, or misspelled card name to the closest matching cards. Returns full card data (stats, abilities, cost, etc.) for each candidate — no follow-up query needed. Use this as follows:
|
| export_deckA | Render a Lorcana deck as a Dreamborn/Pixelborn-compatible text deck list ( |
| import_deckA | Parse a Dreamborn/Pixelborn-style deck list ( |
| validate_deckA | Validate a Lorcana deck against the format rules: at least 60 cards (no maximum — 60 is just the floor), max 4 copies of any card, max 2 distinct ink colors across the deck. Each entry is |
| deck_statsA | Compute summary stats for a Lorcana deck: ink curve (copies at each cost), color split (copies per color — dual-ink contributes to BOTH buckets, so the sum may exceed total_cards), inkable/uninkable counts, type breakdown (Character/Action/Item/Song/Location), |
| server_statusA | Show startup metadata for this server instance. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| build_deck | Guide the user through building a legal Lorcana deck (60-card minimum). Accepts preferred color(s) and playstyle, then uses the available search and aggregation tools to suggest a full deck list with synergy notes. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
The overlapping trio search_cards/count_cards/aggregate_cards is explicitly disambiguated in the descriptions ('Use count_cards instead if you only need a total count'), and resolve_card vs search_cards has a clear routing rule. The weakest boundaries are top_traits (what traits, from what scope?) versus aggregate_cards('type') and deck_stats' subtype_counts, plus the meta server_status tool.
Eight of ten tools follow a clear verb_noun pattern (validate_deck, search_cards, count_cards, aggregate_cards, resolve_card, import_deck, export_deck), all snake_case. The outliers are deck_stats, top_traits, and server_status, which use noun-first phrasing but remain readable and unambiguous.
Ten tools is squarely in the sweet spot for a domain server. Each tool maps to a distinct job—discovery (search/count/aggregate/resolve), deck lifecycle (import/validate/stats/export), and two metadata helpers—with no filler.
The deck lifecycle is well covered (import → validate → stats → export) and card discovery covers name, filter, count, and aggregation paths, so no obvious dead ends for core workflows. Minor gaps: no card lookup by id, no set/keyword/format listing tool, and no way to persist or compare decks across calls.