Legumes are likely the lowest footprint of well known protein sources, but as @Carmi points, unless you are raising them yourself, they are not negative or zero, and maybe not then. Unless you are going completely off grid, there is fertilizer requirements, regardless of if it is organic or chemical, energy for watering and working the soil, storage, etc. and if you are not the source, transportation, and accounting for other items which may have been displaced by growing the item. Plant material other than legumes tend to go up, corn for instance tends to be a much higher feeder than most beans and peas so requires more inputs into the system. If you go with processed, such as tofu, then add in the costs of industrialized processing. Comparatively low, yes, but not free.
On meats, the dreaded broiler chicken, the nightmare to most who worry about carbon footprints, is likely the most efficient meat source readily available. They require small space, grow fast, and are much higher in efficiency in converting plant to meat than other major meat sources like beef and pork. This still makes them much less efficient that using the grains directly and will not go into opinions on the conditions that some commercial growers employ. You will pay a price to do so, but you can likely find local growers that use these birds and treat them in a manner you would more approve of it you are interested in meat in your diet. From my experience when I raised them, a regular chicken would take 6-8 months to mature and produce 3 lbs of usable meat on open pasture while consuming in a ballpark of 50-60 lbs of grain. A broil, on pasture not in those confined cages in buildings used commercially, would produce 6 lbs of usable meat in 7-8 weeks while eating 20 lbs or less of grain. Now, that is considered highly efficient protein conversion for a meat source, but makes it obvious why meat has a higher footprint than grain: The chicken required space to live, used the ground it was pastured on, produced waste product all of which cost, and still consumed up to 20 lbs of grain all of which also had footprint associated. One could have just consumed the grain and saved a lot. It is a trade off.
- My numbers are anecdotal and very rough approximations from personal experience. Though I would prefer solid documented data in an answer, I agree with earlier comments that I do not really think Seasoned Advice is the place for that detailed an argument, but a light touching of a more general answer seems OK to me in this case. Veto my opinion and remove as appropriate.