Muddle the blueberries in a glass, pressing the skins as much as possible to extract color. Strain using a fine mesh sieve. Discard (or keep for another use) the pulp and skins.
Pour the blueberry juice into a cocktail shaker. Add the lime juice, tequila, Cointreau and ice. Shake vigorously.
Prepare the rim of the glass by rubbing it with a lime wedge. Pour some salt onto a small plate. Dip the rim of the glass into the salt to coat.
Fill the glass with ice. Pour the cocktail over the ice into each glass. Garnish with fresh blueberries.
Notes
Blueberry juice can be kept for up to a week in a container in the refrigerator.
Trade the tequila for mezcal for a smoky margarita.