It would be best there, but you might want a safety switch before that... You're going to make me go get my copy of NEC aren't you? The new one has a whole section on transfer switches and generator connections - and I didn't memorize the darned thing.
But with your luck, your local codes are locally written and totally different. They really aren't standardized that well.
Make it easy on yourself - Call your local city/county building inspector, make an appointment for a pow-wow and talk it over, ask him/her what he wants to see. You can over-engineer it and make it "perfect" - but why? KISS.
You could stick it to one side of the meter socket, and put a big nipple or fitting between the boxes - but it's not the preferred method. You would have to send the 'Utility In' and 'Switch Out' power going through the same conduit and through the same meter socket can, and it would be too easy to get an accidental backfeed out onto the utility lines. ESPECIALLY if someone else gets in there and isn't clear on the concept.
I'd put the transfer switch off to one side of the main, and abandon the wires going out the back of the meter socket can directly to the house breaker panel. Make a new house feed out the back of the transfer switch going inside to the house breaker panel. And at the bottom of the transfer switch you put a landing-lug box where the leads from the portable generator tie down.
Try to lay it out so the wires inside the transfer switch can do not physically cross inside the can - so if the wires get all hot and melty (technical term, I know...) they can't make an unintentional cross connection.
I've always seen them in commercial situations with the Utility Main Breaker placed ahead of the transfer switch, so they can open that breaker as a drop-dead "No Way In HELL it can backfeed" safety. The extra safety step makes the utility linemen working on the snapped lines much happier when they hear a generator running way off in the distance.
That way you still have the separate Fire Alarm disconnect in parallel with the Main Breaker as a place to monitor whether the Utility Power has come back up. (For a business they might turn off and lock the Main and kill the lights for non-payment, but they have to leave the Fire Alarm feed on or the insurance coverage goes away. And it's also a Life Safety issue.)
In a residential situation, if you want to change over the entire house on the transfer switch you'd need a separate fused switch or enclosed breaker to power the monitor light. And get the concept cleared by the local inspector. Otherwise, how do you know for sure when they've got the utility power back on?
If it's a safe place to make a hole, you can get a pilot drill and a knockout punch and blast a hole through the side of the can in about two minutes. They can't put knockouts everywhere anyone could possibly need them, or the can would fall apart...
"Perfect" is an unreachable goal unless you are Bill Gates and have a ton o' money to spend on "Perfect" - Lets see here... A 40KW or
60KW genset with a ton of excess motor- starting oomph and automatic transfer switch, a large fuel tank, and a big UPS inverter running all the critical systems in the house as hold-over - That'll only cost you 25 grand or so to set up...The lights go out partially, you hear a very muted engine cranking and starting outside, and 15 seconds later all the lights pop back on like nothing happened, and will stay that way for days. And the genset is big enough that no power budgeting is needed, you can be working in the shop on the lathe with the AC up full blast while the Mrs. is baking in the electric oven, no worries.
-->--