Exhibit 5.1


SULLIVAN & WORCESTER LLP
One Post Office Square
Boston, MA 02109

December 21, 2016

Tecogen Inc.
45 First Avenue
Waltham, MA 02451

Re: Registration Statement on Form S-4
 
Ladies and Gentlemen:
This opinion is furnished to you in connection with a Registration Statement on Form S-4 (the “Registration Statement”) being filed with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”), for the registration of up to 4,662,936.74 shares of Common Stock (the “Shares”), of Tecogen Inc., a Delaware corporation (the “Company”).
The Shares are to be issued by the Company pursuant to an Agreement and Plan of Merger (the “Merger Agreement”), dated as of November 1, 2016, by and among the Company, American DG Energy Inc., a Delaware corporation, and a merger subsidiary of the Company formed for the purpose of the transaction.  The Merger Agreement is being filed as Annex A to the Proxy Statement/Prospectus forming part of the Registration Statement.
We are acting as counsel for the Company in connection with the issuance by the Company of the Shares. We have examined signed copies of the Registration Statement being filed with the Commission. We have also examined and relied upon the Merger Agreement, minutes of meetings of the Board of Directors of the Company provided to us by the Company, the corporate charter and bylaws of the Company, each as restated and/or amended to date, and such other documents as we have deemed necessary for purposes of rendering the opinion hereinafter set forth.
In our examination of the foregoing documents, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as copies, the authenticity of the originals of such latter documents and the legal competence of all signatories to such documents.
We express no opinion herein as to the laws of any state or jurisdiction other than the General Corporation Law of the State of Delaware (including reported judicial decisions interpreting it).
Based upon and subject to the foregoing, we are of the opinion that the Shares have been duly authorized for issuance and, when the Shares are issued in accordance with the terms and conditions of the Merger Agreement, the Shares will be validly issued, fully paid and nonassessable.
Please note that we are opining only as to the matters expressly set forth herein, and no opinion should be inferred as to any other matters. This opinion is based upon currently existing statutes, rules, regulations and judicial decisions, and we disclaim any obligation to advise you of any change in any of these sources of law or subsequent legal or factual developments which might affect any matters or opinions set forth herein.
     We hereby consent to the filing of this opinion with the Commission as an exhibit to the Registration Statement in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Securities Act and to the use of our name therein and in the related Proxy Statement/Prospectus under the caption “Legal Matters.” In giving such consent, we do not hereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission.

Very truly yours,

/s/ SULLIVAN & WORCESTER LLP