The structure and electronic properties of carbon atom chains Cn in contact with Ag electrodes are investigated in detail with first principles means. The ideal Ag(100) surface is used as a model for binding, and electron transport through the chains is studied as a function of their length, applied bias voltage, presence of capping atoms (Si, S) and adsorption site. It is found that the metal-molecule bond largely influences electronic coupling to the leads. Without capping atoms the quality of the electric contact improves when increasing the carbon atom coordination number to the metal (1, 2 and 4 for adsorption on a top, bridge and hollow position, respectively) and this finding translates almost unchanged in more realistic tip-like contacts which present one, two or four metal atoms at the contact. Current-voltage characteristics show Ohmic behaviour over a wide range of bias voltages and the resulting conductances change only weakly when increasing the wire length. The effect of a capping species is typically drastic, and either largely reduces (S) or largely increases (Si) the coupling of the wire to the electrodes. Comparison of our findings with recent experimental results highlights the limits of the adopted approach, which can be traced back to the known gap problem of density-functional-theory.