It's very important you do not move your tax home to the US in this situation, NEVER file a regular 1040 return. If you do your tax home moves to the US and you become subject to departure tax, plus your CCPC loses it's CCPC status and becomes subject to the full rate of Canadian corporation tax.
Your Canadian corporation can file for an EIN and do US withholding, it's pretty complex obviously. I'm not sure there's any point though (except to claim your salary against US corporation tax), you can still pay yourself in Canada through the corporation, however if you do it that way you still have to declare your pay on your US 1040NR return and pay US
taxes on income earned on work performed while you were in the US. Then you claim a foreign tax credit in Canada with your T1.
The corporation will need to file an 1120-F return with the IRS every year and needs to make a tax treaty claim on Form 8833 so that your US client does not have to do non-resident tax withholding. I think you have to file a Form 8233 every year with the client as well to inform them of your tax treaty claim but I'm not sure if Form 8233 is used for corporations or whether you just give them a copy of the 8833, maybe there is another form.
Your corporation will be taxed on US-source income at US corporation tax rates, which is why it is not a terribly good idea to do it this way. However it does avoid having to set up an EIN and do all the US withholding, etc. to run it through the Canadian corporation. But you can't deduct Canadian salaries from the US corporation tax so that balls it up right there (at least I don't think you can).
Any tax the corporation pays can get a foreign tax credit in Canada using T2 schedule 21, but because the CCPC rate is so much lower you will not recover the full amount of tax paid in the US (unless you can defer it to future years but I don't think you can).
Getting an EIN for the Canadian corporation will be horrendously complex for other reasons, i.e. it will have to do non-resident alien withholding tax if you spend more than 90 days in the US or earn more than $10,000 (this is because of the tax treaty), which is a non-standard way of withholding tax obviously which makes the W-9 and W-4 more complex and the withholding rates are different.
To cut a long story short you are basically walking onto a bed of nails.
The better idea is to not use the corporation you have at all, and simply be directly employed by the US employer. Then you file a 1040NR and an 8833 every year to pay US tax and claim a closer connection to Canada (which you will have to because of your CCPC). On your W-4 when you start work you declare that you are a non-resident alien, so the only wrinkle is that your employer's accountant might be a bit miffed by that as it requires they do extra paperwork.
Then you claim a foreign tax credit in Canada on your T1 for any income tax you pay in the US - however as Social Security tax is way higher than CPP deductions in Canada bear in mind you can't claim that as a tax credit. You will have to pay social security
taxes in the US AND you end up paying the full amount of income tax in Canada. At least that's how it works out in the end after you add it all up. You may also have to claim a provincial foreign tax credit for any State income tax you pay in the US.
If you plan on staying in the US for a long time and the corporation will essentially be defunct, you may want to reduce the value of it so that departure tax is not an issue - departure tax is a 25% capital gains tax on any capital gain over $50,000, so if you started your corp. from zero and it's currently valued at say, $120,000, you have to pay 25% of $70,000 to the CRA when you leave. And that assumes your CCPC is the only asset you have subject to departure tax.
Bear in mind also that in TN-1 status you have to maintain "non-immigrant intent", if you move your tax home to the US, the IRS considers you resident in the US and that may cause problems with your immigration status.
Read this:
http://www.cra-arc.gc.ca/E/pub/tg/p151/
Also read IRS publication 519, the instructions for Form 1040NR and 1120-F, and pages 22-26 of publication 515.
Bear in mind also the tax treaty has recently changed, however if all the work you do is performed in one country or the other there is essentially no change. Publication 597 explains the treaty but it's out-of-date.
Steve.