Exhibit 23
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in Registration Statement (No. 333-233078 and 333-233077) on Form S-8 of MainStreet Bancshares, Inc. of our report dated June 21, 2021, relating to our audit of the financial statements and supplemental schedules of the MainStreet Bank 401(k) Plan (the Plan), which appears in this Annual Report on Form 11-K of the Plan for the year ended December 31, 2020.
/s/ Yount, Hyde & Barbour, P.C.
Richmond, Virginia
June 21, 2021