this is something I have personal experience with.
technically, yes, you can make friends with "Australian Magpies" (which are the real magpies, other magpies should be called "fake magpies"). They're smart and will learn the difference between people who live near them and potential nest attackers, and will also bring gifts if you let them.
however, most Australians have had the absolute crap scared out of them from magpies by the media, painting them as monsters who'll swoop down and kill you if you break eye contact with them. My generation had the Neighbours episode where they had to get ice cream buckets and paint eyes on the back of them (see attached image A). Gen Post-Z has the Bluey episode "Curry Quest" where they face paint eyes to stop them from swooping (see attached image B).
No logic about "protecting their young", "learning people near them" or "they'll break their necks if they hit you" will remove this fear. We had a nest outside our driveway and even though I was never swooped, you'd better believe I rode like hell past that tree.
Therefore, all magpies are evil. It's our equivalent of anti-shark propoganda.
I need more info about the peanuts to make a call on. You're pushing it but maybe fine if they're shell in. I would simply just purchase more peanuts and use the current ones for arts and/or crafts.