You will not be able to observe the Sun and transit safely using the unaided eye, or by looking through a telescope without a properly designed filter. Mercury will also appear very small (less than 1/150th of the diameter of the Sun) and so you will not be able to see the planet without using one of the methods below.
Option 1: Online Viewing
This is obviously completely safe for your eyes, and a good standby in bad weather. Several observatories and astronomical organisations will be showing live streams of the tranisit. You can see live streams on the following sites:
Option 2: Optical Projection
Pinhole cameras will not work for viewing a transit of Mercury. You will need to use some binoculars (or a small telescope) to project it.
Do not look through the binoculars (or telescope), or place your hand or anything flammable in front of the eyepiece.
Trace the binocular lenses onto the side of a cardboard box. Cut out two eye piece lenses and place the binoculars through. Cover one lens with a lens cover or duct tape, and seal around the binoculars’ eye holes to ensure no additional light is getting through. Point the binoculars towards the Sun while holding a piece of white cardboard about 30cm behind the eyepiece. It may take a little effort to find the image of the Sun but once you do, focus the binoculars to create a sharp image of the Sun.
Option 3: Telescopic Viewing
If you already have a telescope you must ensure you have a good quality filter over the telescope’s objective, or in a reflector, the open end of the tube. This must be obtained from a reputable astronomical supplier and meet the relevant safety standards.
You should never use the filter at the eyepiece end as it may crack or melt in the concentrated heat.
Viewing with a telescope and properly designed filter will give the best views of sunspots and the clearest view of the silhouetted disk of Mercury.
To find out more about watching the transit safely, watch this brilliant video from the Society for Popular Astronomy