Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
To the Board of Directors of
Mastech Digital, Inc.
We hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (File Nos. 333-153759, 333-212413, 333-228808 and 333-240172) of Mastech Digital, Inc. of our report dated March 15, 2024, relating to the consolidated financial statements and financial statement schedule, which appear in this Annual Report on Form 10-K.
| /s/ UHY LLP |
| Farmington Hills, Michigan |
| March 15, 2024 |