Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in this Post-Effective Amendment No. 1 of Middlefield Banc Corp. on FormS-1 (No. 333-191895) of our report dated March 11, 2014, on Middlefield Banc Corp.’s consolidated financial statements appearing in the Annual Report on Form10-K of Middlefield Banc Corp. for the year ended December 31, 2013, and to the reference to us under the heading “Experts” in the prospectus, which is part of this registration statement.
/s/ S.R. Snodgrass, P.C.
Wexford, Pennsylvania
April 29, 2014