Because Magpie gains copies of itself, it does really well with the +bonus tokens and trash for benefit. Magpie also benefits from deep topdeck inspection/arrangement (e.g. Cartographer, Apothecary, Secret Chamber Reaction, Opponents' Ghost Ship) and treasure discarding with overdraw (e.g. Stables, Plaza).
Putting those factors aside aside, how valuable it is depends on how many additional copies it gains, your deck's treasure density, and your deck's average treasure value.
Inputs:
M - Number of additional Magpies gained.
D - Density of treasure cards in deck (number of treasure cards / number of total cards).
T - Average value of all treasures in deck (e.g. 7 coppers, 4 Silvers, 1 Gold : T = 18 / 12 = 1.5).
Outputs:
N - Expected number of cards drawn by Magpie (and the Magpies it gained) in one trip through your deck.
V - Expected monetary value gained by Magpie (and the Magpies it gained) in one trip through your deck.
N = (1 + M) * D
V = N * T
Examples:
Low-Treasure Deck
M = 4
D = 0.2
T = 2.5
---
N = 1
V = 2.5
---
A single purchased Magpie that gained four additional copies of itself in a deck with a treasure density of 0.2 and an average treasure value of 2.5 would be expected to draw one treasure with an expected value of 2.5.
Moderate-Treasure Deck
M = 3
D = 0.5
T = 2
---
N = 2
V = 4
---
A single purchased Magpie that gained three additional copies of itself in a deck with a treasure density of 0.5 and an average treasure value of 2 would be expected to draw two treasures with an expected value of 4.
Conclusion:
Even in a deck with a low treasure density, Magpie can be valuable if uncontested. If both players realize this, they will contest Magpie, at which point it won't be super valuable (excepting tokens and trash-for-benefit). In a mixed action/treasure engine, Magpie is very valuable. Strong silver gainers (Jack of All Trades, Amulet), gold gainers (Governor, Hero), and kingdom treasures (Counterfeit, Treasure Trove, Relic, Bank) encourage such decks.