If they are similar to other Mazda bars of that style the end caps have to be popped off to reveal the mounting bolts. A plastic trim removal tool would be desirable for doing this.
Oooohhhh. The euro roof rail, which quite a few early Mz5 owners lusted after (and jump seat and PSD). I wanted one too until I saw one in person and felt it made the car look all wonky.
The rails MIGHT be a direct replacement of the black strip that runs down the roof edges in North American cars. My Volvo is like that. To remove the rails, one has to get strips from a streamlined wagon to replace them with.
OP, can you give us close up shots of the fore and aft mounting points and the trim, like esp where the trim ends near the tailgate?