<?xml version="1.0" encoding="utf-8"?>
<!--Generated by DFIN XBRL Instance Document - http://www.dfinsolutions.com/ - Version R3.0 - on 09-November-2024 [03:21:57] {AM}-->
<schema targetNamespace="http://www.mastech.com/20240930" elementFormDefault="qualified" xmlns:mhh="http://www.mastech.com/20240930" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xl="http://www.xbrl.org/2003/XLink" xmlns:us-gaap="http://fasb.org/us-gaap/2024" xmlns:country="http://xbrl.sec.gov/country/2024" xmlns:currency="http://xbrl.sec.gov/currency/2024" xmlns:dei="http://xbrl.sec.gov/dei/2024" xmlns:exch="http://xbrl.sec.gov/exch/2024" xmlns:naics="http://xbrl.sec.gov/naics/2024" xmlns:sic="http://xbrl.sec.gov/sic/2024" xmlns:us-types="http://fasb.org/us-types/2024" xmlns:stpr="http://xbrl.sec.gov/stpr/2024" xmlns:deprecated="http://www.xbrl.org/2009/arcrole/fact-explanatoryFact" xmlns:srt="http://fasb.org/srt/2024" xmlns:srt-types="http://fasb.org/srt-types/2024" xmlns:dtr-types="http://www.xbrl.org/dtr/type/2020-01-21" xmlns:ecd="http://xbrl.sec.gov/ecd/2024">
<annotation>
<appinfo>
<link:roleType roleURI="http://www.mastech.com/role/CoverPage" id="CoverPage">
<link:definition>1001 - Document - Cover Page</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedStatementsOfOperations" id="CondensedConsolidatedStatementsOfOperations">
<link:definition>1002 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedStatementsOfComprehensiveIncomeLoss" id="CondensedConsolidatedStatementsOfComprehensiveIncomeLoss">
<link:definition>1003 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedBalanceSheets" id="CondensedConsolidatedBalanceSheets">
<link:definition>1004 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedBalanceSheetsParenthetical" id="CondensedConsolidatedBalanceSheetsParenthetical">
<link:definition>1005 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedStatementsOfShareholdersEquity" id="CondensedConsolidatedStatementsOfShareholdersEquity">
<link:definition>1006 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CondensedConsolidatedStatementsOfCashFlows" id="CondensedConsolidatedStatementsOfCashFlows">
<link:definition>1007 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/DescriptionOfBusinessAndBasisOfPresentation" id="DescriptionOfBusinessAndBasisOfPresentation">
<link:definition>999001 - Disclosure - Description of Business and Basis of Presentation</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RevenueFromContractsWithCustomers" id="RevenueFromContractsWithCustomers">
<link:definition>999002 - Disclosure - Revenue from Contracts with Customers</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNet" id="GoodwillAndOtherIntangibleAssetsNet">
<link:definition>999003 - Disclosure - Goodwill and Other Intangible Assets, net</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/Leases" id="Leases">
<link:definition>999004 - Disclosure - Leases</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CommitmentsAndContingencies" id="CommitmentsAndContingencies">
<link:definition>999005 - Disclosure - Commitments and Contingencies</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/EmployeeBenefitPlan" id="EmployeeBenefitPlan">
<link:definition>999006 - Disclosure - Employee Benefit Plan</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/StockBasedCompensation" id="StockBasedCompensation">
<link:definition>999007 - Disclosure - Stock-Based Compensation</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CreditFacility" id="CreditFacility">
<link:definition>999008 - Disclosure - Credit Facility</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxes" id="IncomeTaxes">
<link:definition>999009 - Disclosure - Income Taxes</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/ShareholdersEquity" id="ShareholdersEquity">
<link:definition>999010 - Disclosure - Shareholders' Equity</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/EarningsLossPerShare" id="EarningsLossPerShare">
<link:definition>999011 - Disclosure - Earnings (Loss) Per Share</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformation" id="BusinessSegmentsAndGeographicInformation">
<link:definition>999012 - Disclosure - Business Segments and Geographic Information</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RecentlyIssuedAccountingStandards" id="RecentlyIssuedAccountingStandards">
<link:definition>999013 - Disclosure - Recently Issued Accounting Standards</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RevenueFromContractsWithCustomersTables" id="RevenueFromContractsWithCustomersTables">
<link:definition>999014 - Disclosure - Revenue from Contracts with Customers (Tables)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNetTables" id="GoodwillAndOtherIntangibleAssetsNetTables">
<link:definition>999015 - Disclosure - Goodwill and Other Intangible Assets, net (Tables)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/LeasesTables" id="LeasesTables">
<link:definition>999016 - Disclosure - Leases (Tables)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxesTables" id="IncomeTaxesTables">
<link:definition>999017 - Disclosure - Income Taxes (Tables)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformationTables" id="BusinessSegmentsAndGeographicInformationTables">
<link:definition>999018 - Disclosure - Business Segments and Geographic Information (Tables)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RevenueFromContractsWithCustomersAdditionalInformationDetail" id="RevenueFromContractsWithCustomersAdditionalInformationDetail">
<link:definition>999019 - Disclosure - Revenue from Contracts with Customers - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RevenueFromContractsWithCustomersSummaryOfDisaggregationOfOurRevenuesByContractTypeAndOperatingSegmentDetail" id="RevenueFromContractsWithCustomersSummaryOfDisaggregationOfOurRevenuesByContractTypeAndOperatingSegmentDetail">
<link:definition>999020 - Disclosure - Revenue from Contracts with Customers - Summary of Disaggregation of Our Revenues by Contract Type and Operating Segment (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/RevenueFromContractsWithCustomersSummaryOfRevenueFromExternalCustomersDetail" id="RevenueFromContractsWithCustomersSummaryOfRevenueFromExternalCustomersDetail">
<link:definition>999021 - Disclosure - Revenue from Contracts with Customers - Summary of Revenue from External Customers (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNetAdditionalInformationDetail" id="GoodwillAndOtherIntangibleAssetsNetAdditionalInformationDetail">
<link:definition>999022 - Disclosure - Goodwill and Other Intangible Assets, net - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNetReconciliationOfGoodwillDetail" id="GoodwillAndOtherIntangibleAssetsNetReconciliationOfGoodwillDetail">
<link:definition>999023 - Disclosure - Goodwill and Other Intangible Assets, net - Reconciliation of Goodwill (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNetComponentsOfIdentifiableIntangibleAssetsDetail" id="GoodwillAndOtherIntangibleAssetsNetComponentsOfIdentifiableIntangibleAssetsDetail">
<link:definition>999024 - Disclosure - Goodwill and Other Intangible Assets, net - Components of Identifiable Intangible assets (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/GoodwillAndOtherIntangibleAssetsNetScheduleOfEstimatedAmortizationExpenseDetail" id="GoodwillAndOtherIntangibleAssetsNetScheduleOfEstimatedAmortizationExpenseDetail">
<link:definition>999025 - Disclosure - Goodwill and Other Intangible Assets, net - Schedule of Estimated Amortization Expense (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/LeasesAdditionalInformationDetail" id="LeasesAdditionalInformationDetail">
<link:definition>999026 - Disclosure - Leases - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/LeasesSummaryOfBalanceSheetClassificationOfLeaseAssetAndRelatedLeaseLiabilityDetail" id="LeasesSummaryOfBalanceSheetClassificationOfLeaseAssetAndRelatedLeaseLiabilityDetail">
<link:definition>999027 - Disclosure - Leases - Summary of Balance Sheet classification of lease asset and related lease liability (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/LeasesScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesDetail" id="LeasesScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesDetail">
<link:definition>999028 - Disclosure - Leases - Schedule of Future Minimum Rental Payments for Operating Leases (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CommitmentsAndContingenciesAdditionalInformationDetail" id="CommitmentsAndContingenciesAdditionalInformationDetail">
<link:definition>999029 - Disclosure - Commitments and Contingencies - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/EmployeeBenefitPlanAdditionalInformationDetail" id="EmployeeBenefitPlanAdditionalInformationDetail">
<link:definition>999030 - Disclosure - Employee Benefit Plan - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/StockBasedCompensationAdditionalInformationDetail" id="StockBasedCompensationAdditionalInformationDetail">
<link:definition>999031 - Disclosure - Stock-Based Compensation - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/CreditFacilityAdditionalInformationDetail" id="CreditFacilityAdditionalInformationDetail">
<link:definition>999032 - Disclosure - Credit Facility - Additional information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxesComponentsOfIncomeLossBeforeIncomeTaxesDetail" id="IncomeTaxesComponentsOfIncomeLossBeforeIncomeTaxesDetail">
<link:definition>999033 - Disclosure - Income Taxes - Components of Income (Loss) Before Income Taxes (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxesProvisionBenefitForIncomeTaxesDetail" id="IncomeTaxesProvisionBenefitForIncomeTaxesDetail">
<link:definition>999034 - Disclosure - Income Taxes - Provision (Benefit) for Income Taxes (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxesReconciliationOfIncomeTaxesDetail" id="IncomeTaxesReconciliationOfIncomeTaxesDetail">
<link:definition>999035 - Disclosure - Income Taxes - Reconciliation of Income Taxes (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/IncomeTaxesAdditionalInformationDetail" id="IncomeTaxesAdditionalInformationDetail">
<link:definition>999036 - Disclosure - Income Taxes - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/ShareholdersEquityAdditionalInformationDetail" id="ShareholdersEquityAdditionalInformationDetail">
<link:definition>999037 - Disclosure - Shareholders' Equity - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/EarningsLossPerShareAdditionalInformationDetail" id="EarningsLossPerShareAdditionalInformationDetail">
<link:definition>999038 - Disclosure - Earnings (Loss)  per Share - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformationAdditionalInformationDetail" id="BusinessSegmentsAndGeographicInformationAdditionalInformationDetail">
<link:definition>999039 - Disclosure - Business Segments and Geographic Information - Additional Information (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformationSummaryOfOperatingSegmentsDetail" id="BusinessSegmentsAndGeographicInformationSummaryOfOperatingSegmentsDetail">
<link:definition>999040 - Disclosure - Business Segments and Geographic Information - Summary of Operating Segments (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformationSummaryOfAssetsBySegmentDetail" id="BusinessSegmentsAndGeographicInformationSummaryOfAssetsBySegmentDetail">
<link:definition>999041 - Disclosure - Business Segments and Geographic Information - Summary of Assets by Segment (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/BusinessSegmentsAndGeographicInformationSummaryOfRevenueFromExternalCustomersDetail" id="BusinessSegmentsAndGeographicInformationSummaryOfRevenueFromExternalCustomersDetail">
<link:definition>999042 - Disclosure - Business Segments and Geographic Information - Summary of Revenue from External Customers (Detail)</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:roleType roleURI="http://www.mastech.com/role/InsiderTradingArrangements" id="InsiderTradingArrangements">
<link:definition>999043 - Disclosure - Insider Trading Arrangements</link:definition>
<link:usedOn>link:presentationLink</link:usedOn>
<link:usedOn>link:definitionLink</link:usedOn>
<link:usedOn>link:calculationLink</link:usedOn>
</link:roleType>
<link:linkbaseRef xlink:type="simple" xlink:href="mhh-20240930_pre.xml" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
<link:linkbaseRef xlink:type="simple" xlink:href="mhh-20240930_def.xml" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
<link:linkbaseRef xlink:type="simple" xlink:href="mhh-20240930_lab.xml" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
<link:linkbaseRef xlink:type="simple" xlink:href="mhh-20240930_cal.xml" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
</appinfo>
</annotation>
<import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" />
<import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" />
<import namespace="http://xbrl.org/2005/xbrldt" schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd" />
<import namespace="http://fasb.org/us-gaap/2024" schemaLocation="https://xbrl.fasb.org/us-gaap/2024/elts/us-gaap-2024.xsd" />
<import namespace="http://xbrl.sec.gov/country/2024" schemaLocation="https://xbrl.sec.gov/country/2024/country-2024.xsd" />
<import namespace="http://xbrl.sec.gov/currency/2024" schemaLocation="https://xbrl.sec.gov/currency/2024/currency-2024.xsd" />
<import namespace="http://xbrl.sec.gov/exch/2024" schemaLocation="https://xbrl.sec.gov/exch/2024/exch-2024.xsd" />
<import namespace="http://xbrl.sec.gov/naics/2024" schemaLocation="https://xbrl.sec.gov/naics/2024/naics-2024.xsd" />
<import namespace="http://xbrl.sec.gov/sic/2024" schemaLocation="https://xbrl.sec.gov/sic/2024/sic-2024.xsd" />
<import namespace="http://xbrl.sec.gov/stpr/2024" schemaLocation="https://xbrl.sec.gov/stpr/2024/stpr-2024.xsd" />
<import namespace="http://www.xbrl.org/2009/role/negated" schemaLocation="http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd" />
<import namespace="http://www.xbrl.org/2009/role/net" schemaLocation="http://www.xbrl.org/lrr/role/net-2009-12-16.xsd" />
<import namespace="http://www.xbrl.org/2009/arcrole/fact-explanatoryFact" schemaLocation="http://www.xbrl.org/lrr/arcrole/factExplanatory-2009-12-16.xsd" />
<import namespace="http://xbrl.sec.gov/dei/2024" schemaLocation="https://xbrl.sec.gov/dei/2024/dei-2024.xsd" />
<import namespace="http://fasb.org/us-types/2024" schemaLocation="https://xbrl.fasb.org/us-gaap/2024/elts/us-types-2024.xsd" />
<import namespace="http://fasb.org/srt-types/2024" schemaLocation="https://xbrl.fasb.org/srt/2024/elts/srt-types-2024.xsd" />
<import namespace="http://fasb.org/srt/2024" schemaLocation="https://xbrl.fasb.org/srt/2024/elts/srt-2024.xsd" />
<import namespace="http://www.xbrl.org/dtr/type/2020-01-21" schemaLocation="https://www.xbrl.org/dtr/type/2020-01-21/types.xsd" />
<import namespace="http://xbrl.sec.gov/ecd-sub/2024" schemaLocation="https://xbrl.sec.gov/ecd/2024/ecd-sub-2024.xsd" />
<import namespace="http://xbrl.sec.gov/ecd/2024" schemaLocation="https://xbrl.sec.gov/ecd/2024/ecd-2024.xsd" />
<import namespace="http://www.xbrl.org/2006/ref" schemaLocation="http://www.xbrl.org/2006/ref-2006-02-27.xsd" />
<import namespace="http://fasb.org/srt-roles/2024" schemaLocation="https://xbrl.fasb.org/srt/2024/elts/srt-roles-2024.xsd" />
<element name="EmploymentRelatedClaimNetOfRecoveries" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_EmploymentRelatedClaimNetOfRecoveries" substitutionGroup="xbrli:item" xbrli:balance="debit" />
<element name="PaymentsForRecoveryOfNoncurrentDeposits" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_PaymentsForRecoveryOfNoncurrentDeposits" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="LongtermAccruedIncomeTaxes" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LongtermAccruedIncomeTaxes" substitutionGroup="xbrli:item" xbrli:balance="debit" />
<element name="IncreaseDecreaseInOperatingLeaseAssetsNet" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_IncreaseDecreaseInOperatingLeaseAssetsNet" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="CreditFacilityDisclosureTextBlock" type="dtr-types:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_CreditFacilityDisclosureTextBlock" substitutionGroup="xbrli:item" />
<element name="SummaryOfBalanceSheetClassificationOfLeaseAssetAndRelatedLeaseLiabilityTableTextBlock" type="dtr-types:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_SummaryOfBalanceSheetClassificationOfLeaseAssetAndRelatedLeaseLiabilityTableTextBlock" substitutionGroup="xbrli:item" />
<element name="ReconciliationOfAssetsDepreciationAmortizationAndCapitalExpenditureFromSegmentToConsolidatedTableTextBlock" type="dtr-types:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_ReconciliationOfAssetsDepreciationAmortizationAndCapitalExpenditureFromSegmentToConsolidatedTableTextBlock" substitutionGroup="xbrli:item" />
<element name="RevenueFromExternalCustomersAndLongLivedAssetsByGeographicAreasTableTextBlock" type="dtr-types:textBlockItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_RevenueFromExternalCustomersAndLongLivedAssetsByGeographicAreasTableTextBlock" substitutionGroup="xbrli:item" />
<element name="TopTenCustomersMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_TopTenCustomersMember" substitutionGroup="xbrli:item" />
<element name="MaximumPercentageOfBillableExpensesOnRevenueFromCustomer" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_MaximumPercentageOfBillableExpensesOnRevenueFromCustomer" substitutionGroup="xbrli:item" />
<element name="CustomerPercentageOfRevenue" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_CustomerPercentageOfRevenue" substitutionGroup="xbrli:item" />
<element name="NumberOfCustomersAccountedForRevenues" type="xbrli:integerItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_NumberOfCustomersAccountedForRevenues" substitutionGroup="xbrli:item" />
<element name="RevenuePercentageToAggregateRevenue" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_RevenuePercentageToAggregateRevenue" substitutionGroup="xbrli:item" />
<element name="CgiMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_CgiMember" substitutionGroup="xbrli:item" />
<element name="AllergisMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_AllergisMember" substitutionGroup="xbrli:item" />
<element name="CgiAndAllergisMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_CgiAndAllergisMember" substitutionGroup="xbrli:item" />
<element name="DataAndAnalyticsServicesMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_DataAndAnalyticsServicesMember" substitutionGroup="xbrli:item" />
<element name="ITStaffingServicesMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_ITStaffingServicesMember" substitutionGroup="xbrli:item" />
<element name="IndiaAndOtherMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_IndiaAndOtherMember" substitutionGroup="xbrli:item" />
<element name="ScheduleOfIntangibleAssetsAndGoodwillTable" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_ScheduleOfIntangibleAssetsAndGoodwillTable" substitutionGroup="xbrldt:hypercubeItem" />
<element name="HudsonItMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_HudsonItMember" substitutionGroup="xbrli:item" />
<element name="InfoTrellisIncMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_InfoTrellisIncMember" substitutionGroup="xbrli:item" />
<element name="AmberLeafPartnersIncMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_AmberLeafPartnersIncMember" substitutionGroup="xbrli:item" />
<element name="GoodwillAndIntangibleAssetsLineItems" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_GoodwillAndIntangibleAssetsLineItems" substitutionGroup="xbrli:item" />
<element name="GoodwillAndIntangibleAssetsNetAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_GoodwillAndIntangibleAssetsNetAbstract" substitutionGroup="xbrli:item" />
<element name="CovenantNotToCompeteMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_CovenantNotToCompeteMember" substitutionGroup="xbrli:item" />
<element name="IntangibleLiabilityDisclosureAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_IntangibleLiabilityDisclosureAbstract" substitutionGroup="xbrli:item" />
<element name="LesseeOperatingLeasesRenewalTerm" type="xbrli:durationItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LesseeOperatingLeasesRenewalTerm" substitutionGroup="xbrli:item" />
<element name="ImputedInterestInRespectOfOperatingLeasesFutureMinimumRentalsPayable" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_ImputedInterestInRespectOfOperatingLeasesFutureMinimumRentalsPayable" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="LesseeOperatingLeaseLiabilityPaymentsDueYearFourAndThereafter" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_LesseeOperatingLeaseLiabilityPaymentsDueYearFourAndThereafter" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="FormerEmployeeUnassertedClaimMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_FormerEmployeeUnassertedClaimMember" substitutionGroup="xbrli:item" />
<element name="LossContingencyPaymentNetOfSettlement" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LossContingencyPaymentNetOfSettlement" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="StockOptionsAndRestrictedStockMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_StockOptionsAndRestrictedStockMember" substitutionGroup="xbrli:item" />
<element name="EmployeeStockPurchasePlanMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_EmployeeStockPurchasePlanMember" substitutionGroup="xbrli:item" />
<element name="ShareBasedCompensationMaximumLimitOfContributionsTowardsPlanPerPerson" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_ShareBasedCompensationMaximumLimitOfContributionsTowardsPlanPerPerson" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="ShareBasedCompensationPercentageOfDiscountToPurchaseOfCommonStock" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_ShareBasedCompensationPercentageOfDiscountToPurchaseOfCommonStock" substitutionGroup="xbrli:item" />
<element name="EmployeeStockPurchasePlanAwardFairValueAssumptionsMethodUsed" type="xbrli:stringItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_EmployeeStockPurchasePlanAwardFairValueAssumptionsMethodUsed" substitutionGroup="xbrli:item" />
<element name="TermLoanMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_TermLoanMember" substitutionGroup="xbrli:item" />
<element name="SwingLoansMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_SwingLoansMember" substitutionGroup="xbrli:item" />
<element name="LetterOfCreditOneFromPncBankToVietnamClientMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_LetterOfCreditOneFromPncBankToVietnamClientMember" substitutionGroup="xbrli:item" />
<element name="LetterOfCreditTwoFromPncBankToVietnamClientMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_LetterOfCreditTwoFromPncBankToVietnamClientMember" substitutionGroup="xbrli:item" />
<element name="PncBankNaMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_PncBankNaMember" substitutionGroup="xbrli:item" />
<element name="LineOfCreditFacilityAdditionalBorrowingCapacityUponCertainConditions" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LineOfCreditFacilityAdditionalBorrowingCapacityUponCertainConditions" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="PercentageOfEligibleAccountsReceivableUsedToDetermineBorrowingsAvailableUnderCreditFacility" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_PercentageOfEligibleAccountsReceivableUsedToDetermineBorrowingsAvailableUnderCreditFacility" substitutionGroup="xbrli:item" />
<element name="PercentageOfEligibleUnbilledAccountsUsedToDetermineBorrowingsAvailableUnderCreditFacility" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_PercentageOfEligibleUnbilledAccountsUsedToDetermineBorrowingsAvailableUnderCreditFacility" substitutionGroup="xbrli:item" />
<element name="RevolvingCreditFacilityPercentageMarginOverBaseRate" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_RevolvingCreditFacilityPercentageMarginOverBaseRate" substitutionGroup="xbrli:item" />
<element name="TermLoanPercentageMarginOverBaseRate" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_TermLoanPercentageMarginOverBaseRate" substitutionGroup="xbrli:item" />
<element name="LineOfCreditFacilityFinalAmount" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LineOfCreditFacilityFinalAmount" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="RevolvingCreditFacilityPercentageMarginAdjustedSofrRate" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_RevolvingCreditFacilityPercentageMarginAdjustedSofrRate" substitutionGroup="xbrli:item" />
<element name="TermLoanPercentageMarginAdjustedSofrRate" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_TermLoanPercentageMarginAdjustedSofrRate" substitutionGroup="xbrli:item" />
<element name="LetterOfCreditFacilityMaximumBorrowingCapacity" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_LetterOfCreditFacilityMaximumBorrowingCapacity" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="LetterOfCreditMaturityDate" type="xbrli:dateItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_LetterOfCreditMaturityDate" substitutionGroup="xbrli:item" />
<element name="InterestRateTypeAxis" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_InterestRateTypeAxis" substitutionGroup="xbrldt:dimensionItem" />
<element name="InterestRateTypeDomain" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_InterestRateTypeDomain" substitutionGroup="xbrli:item" />
<element name="FederalFundsRateMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_FederalFundsRateMember" substitutionGroup="xbrli:item" />
<element name="IncomeBeforeIncomeTaxesAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_IncomeBeforeIncomeTaxesAbstract" substitutionGroup="xbrli:item" />
<element name="IncomeTaxReconciliationChangesInExcessTaxBenefitFromStockOptionsAndRestrictedShares" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_IncomeTaxReconciliationChangesInExcessTaxBenefitFromStockOptionsAndRestrictedShares" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRatePercentage" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRatePercentage" substitutionGroup="xbrli:item" />
<element name="EffectiveIncomeTaxRateReconciliationChangesInExcessTaxBenefitFromStockOptionsAndRestrictedShares" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_EffectiveIncomeTaxRateReconciliationChangesInExcessTaxBenefitFromStockOptionsAndRestrictedShares" substitutionGroup="xbrli:item" />
<element name="DeferredTaxLiabilitiesValuationAllowance" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="instant" nillable="true" id="mhh_DeferredTaxLiabilitiesValuationAllowance" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="BusinessCombinationCreditAgreementMember" type="dtr-types:domainItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_BusinessCombinationCreditAgreementMember" substitutionGroup="xbrli:item" />
<element name="GrossMarginPercentage" type="dtr-types:percentItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_GrossMarginPercentage" substitutionGroup="xbrli:item" />
<element name="SegmentReconciliationAdjustmentEmploymentRelatedClaimNetOfRecoveries" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_SegmentReconciliationAdjustmentEmploymentRelatedClaimNetOfRecoveries" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="InterestIncomeExpenseForeignExchangeGainsLossesAndOtherNonOperatingIncomeExpenseNet" type="xbrli:monetaryItemType" abstract="false" xbrli:periodType="duration" nillable="true" id="mhh_InterestIncomeExpenseForeignExchangeGainsLossesAndOtherNonOperatingIncomeExpenseNet" substitutionGroup="xbrli:item" xbrli:balance="credit" />
<element name="InsiderTradingArrangementsAbstract" type="xbrli:stringItemType" abstract="true" xbrli:periodType="duration" nillable="true" id="mhh_InsiderTradingArrangementsAbstract" substitutionGroup="xbrli:item" />
</schema>
