XML 82 R47.htm IDEA: XBRL DOCUMENT
v3.20.1

Business Combinations - Additional Information (Detail) $ / shares in Units, shares in Millions |  |  | 3 Months Ended | 12 Months Ended |  |  |  |  |
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Jul. 13, 2017 USD ($) | Jul. 07, 2017 USD ($) Agreement $ / shares shares | Dec. 31, 2019 USD ($) | Sep. 30, 2019 USD ($) | Jun. 30, 2019 USD ($) | Mar. 31, 2019 USD ($) | Dec. 31, 2018 USD ($) | Sep. 30, 2018 USD ($) | Jun. 30, 2018 USD ($) | Mar. 31, 2018 USD ($) | Dec. 31, 2019 USD ($) | Dec. 31, 2018 USD ($) | Dec. 31, 2017 USD ($) | Jul. 31, 2018 USD ($) | Apr. 20, 2018 USD ($) | Apr. 19, 2018 USD ($) | Apr. 19, 2017 USD ($) | Dec. 31, 2016 USD ($)
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Fair value of contingent consideration liability |  |  |  |  |  |  |  |  |  |  |  |  | $ 17,125,000 |  |  |  |  |
Contingent consideration liability |  |  |  |  |  |  | $ 6,069,000 |  |  |  |  | $ 6,069,000 | 17,125,000 |  |  |  |  | $ 0
Revolving credit availability |  |  | $ 13,000,000 |  |  |  | 9,000,000 |  |  |  | $ 13,000,000 | 9,000,000 |  |  |  |  |  |
Revenues |  |  | 50,360,000 | $ 49,543,000 | $ 48,472,000 | $ 45,199,000 | 44,645,000 | $ 44,292,000 | $ 44,894,000 | $ 43,333,000 | 193,574,000 | 177,164,000 | 147,882,000 |  |  |  |  |
Net income |  |  | 2,274,000 | $ 1,949,000 | $ 5,958,000 | $ 964,000 | $ 874,000 | $ 1,620,000 | $ 2,817,000 | $ 1,380,000 | 11,145,000 | 6,691,000 | 1,626,000 |  |  |  |  |
PNC Bank, National Association [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Credit agreement provides for total aggregate commitment | $ 65,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Share price for purposes of calculation (in dollars per share) | $ / shares |  | $ 0.01 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Gross proceeds from private placement | 6,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Revolving Line of Credit [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Credit agreement provides for total aggregate commitment |  |  | 32,500,000 |  |  |  |  |  |  |  | 32,500,000 |  |  |  | $ 32,500,000 |  |  |
Revolving credit availability |  |  | 22,500,000 |  |  |  |  |  |  |  | 22,500,000 |  |  |  | 22,500,000 | $ 27,500,000 | $ 27,500,000 |
Revolving Line of Credit [Member] | Swing Loans [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Credit agreement provides for total aggregate commitment |  |  | $ 5,000,000 |  |  |  |  |  |  |  | $ 5,000,000 |  |  |  | $ 5,000,000 | $ 3,000,000 | $ 3,000,000 |
Term Loan Facility [Member] | PNC Bank, National Association [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Term loan facility | 30,500,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Delayed Draw Term Loan Facility [Member] | PNC Bank, National Association [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Term loan facility | 7,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Ashok Trivedi and Sunil Wadhwani [Member] | PNC Bank, National Association [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Stock issued (in shares) | shares |  | 1.7 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Maximum [Member] | Revolving Line of Credit [Member] | PNC Bank, National Association [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Revolving credit availability | 27,500,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Revolving credit facility | 37,500,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Date of acquisition |  |  |  |  |  |  |  |  |  |  | Jul. 13, 2017 |  |  |  |  |  |  |
Business acquisition, description |  |  |  |  |  |  |  |  |  |  | On July 7, 2017, Mastech Digital, Inc., through its wholly-owned subsidiaries Mastech InfoTrellis, Inc., Mastech InfoTrellis Digital, Ltd., Mastech Digital Data, Inc. and Mastech Digital Private Limited (collectively, the “Company Entities”), entered into two Asset Purchase Agreements and a Share Purchase Agreement (collectively, the “Purchase Agreements”) to acquire substantially all of the assets comprising the consulting services business in the areas of master data management, data integration and big data (the “Acquired Business”) of InfoTrellis Inc., InfoTrellis, Inc. and 2291496 Ontario Inc., including all outstanding shares of InfoTrellis India Private Limited (collectively, “InfoTrellis”). The aforementioned transaction was closed on July 13, 2017. |  |  |  |  |  |  |
Cash consideration | 35,750,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Working capital adjustments excluded | (861,000) |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Contingent consideration in deferred cash payments | 19,250,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Fair value of contingent consideration liability | $ 17,125,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Contingent consideration liability |  |  |  |  |  |  |  |  |  |  |  |  |  | $ 0 |  |  |  |
Transaction costs related to acquisition |  |  |  |  |  |  |  |  |  |  |  |  | 2,000,000 |  |  |  |  |
Reversal of transaction costs related to acquisition |  |  |  |  |  |  |  |  |  |  | $ 110,000 | $ 140,000 |  |  |  |  |  |
Revenues |  |  |  |  |  |  |  |  |  |  |  |  | 9,200,000 |  |  |  |  |
Net income |  |  |  |  |  |  |  |  |  |  |  |  | $ 1,100,000 |  |  |  |  |
Info Trellis Inc [Member] | Asset Purchase Agreements [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of purchase agreement | Agreement |  | 2 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] | Share Purchase Agreement [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Number of purchase agreement | Agreement |  | 1 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] | Actual Year 1 EBIT [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
EBIT set as milestone |  | $ 10,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] | Actual Year 1 EBIT [Member] | Maximum [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Fair value of contingent consideration liability |  | 8,250,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] | Actual Year 2 EBIT [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
EBIT set as milestone |  | 10,700,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Info Trellis Inc [Member] | Actual Year 2 EBIT [Member] | Maximum [Member] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Business Acquisition [Line Items] |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Fair value of contingent consideration liability |  | $ 11,000,000 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |

X
- Definition Business acquisition contingent consideration potential cash payables. + References No definition available. + Details
Name: | mhh_BusinessAcquisitionContingentConsiderationPotentiallyPayableInAchievingMilestones
Namespace Prefix: | mhh_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Business Acquisition Cost Of Acquired Entity Transaction Cost + References No definition available. + Details
Name: | mhh_BusinessAcquisitionCostOfAcquiredEntityTransactionCost
Namespace Prefix: | mhh_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Business acquisition cost of acquired entity transaction cost reversal. + References No definition available. + Details
Name: | mhh_BusinessAcquisitionCostOfAcquiredEntityTransactionCostReversal
Namespace Prefix: | mhh_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Business acquisition contingent consideration possible milestone payments. + References No definition available. + Details
Name: | mhh_EbitSetAsMileStoneForContingentConsideration
Namespace Prefix: | mhh_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Number of agreements. + References No definition available. + Details
Name: | mhh_NumberOfAgreements
Namespace Prefix: | mhh_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | instant

X
- Definition With respect to a business combination completed during the period, this element provides a description of the business, other than the name, which may include the industry, size, products and other important information. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463 + Details
Name: | us-gaap_BusinessAcquisitionDescriptionOfAcquiredEntity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Date when the acquirer obtains control of the acquiree, in CCYY-MM-DD format. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 25 -Paragraph 7 -URI http://asc.fasb.org/extlink&oid=116868678&loc=d3e848-128460 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 25 -Paragraph 6 -URI http://asc.fasb.org/extlink&oid=116868678&loc=d3e845-128460 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463 + Details
Name: | us-gaap_BusinessAcquisitionEffectiveDateOfAcquisition1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:dateItemType
Balance Type: | na
Period Type: | duration

X
- Definition Number of shares of equity interests issued or issuable to acquire entity. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (b)(4) -URI http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479 + Details
Name: | us-gaap_BusinessAcquisitionEquityInterestsIssuedOrIssuableNumberOfSharesIssued
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_BusinessAcquisitionLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Price of a single share of a number of saleable stocks paid or offered to be paid in a business combination. + References No definition available. + Details
Name: | us-gaap_BusinessAcquisitionSharePrice
Namespace Prefix: | us-gaap_
Data Type: | num:perShareItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of liability recognized arising from contingent consideration in a business combination. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (c)(1) -URI http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 35 -Paragraph 1 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=116859824&loc=d3e6819-128478 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 25 -Paragraph 6 -URI http://asc.fasb.org/extlink&oid=6911189&loc=d3e6408-128476 + Details
Name: | us-gaap_BusinessCombinationContingentConsiderationLiability
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of liability recognized arising from contingent consideration in a business combination, expected to be settled beyond one year or the normal operating cycle, if longer. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 25 -Paragraph 6 -URI http://asc.fasb.org/extlink&oid=6911189&loc=d3e6408-128476 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 35 -Paragraph 1 -Subparagraph b -URI http://asc.fasb.org/extlink&oid=116859824&loc=d3e6819-128478 + Details
Name: | us-gaap_BusinessCombinationContingentConsiderationLiabilityNoncurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition This element represents the amount of any measurement period adjustment (as defined) realized during the reporting period to items of consideration transferred in connection with a business combination for which the initial accounting was incomplete. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 20 -Section 50 -Paragraph 4A -Subparagraph (c) -URI http://asc.fasb.org/extlink&oid=116869197&loc=SL65897772-128472 + Details
Name: | us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount, before unamortized (discount) premium and debt issuance costs, of long-term debt. Includes, but is not limited to, notes payable, bonds payable, commercial loans, mortgage loans, convertible debt, subordinated debt and other types of debt. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 470 -SubTopic 20 -Section 50 -Paragraph 4 -Subparagraph (b)(1) -URI http://asc.fasb.org/extlink&oid=109500613&loc=SL6031897-161870 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 944 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.7-03(16)) -URI http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(22)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 942 -SubTopic 210 -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-03(16)) -URI http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878 + Details
Name: | us-gaap_DebtInstrumentCarryingAmount
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of borrowing capacity currently available under the credit facility (current borrowing capacity less the amount of borrowings outstanding). + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02.19(b),22(b)) -URI http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682 + Details
Name: | us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition The portion of profit or loss for the period, net of income taxes, which is attributable to the parent. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section 45 -Paragraph 1A -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=118930883&loc=SL7669619-108580 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 942 -SubTopic 220 -Section S99 -Paragraph 1 -Subparagraph (SX 210.9-04(22)) -URI http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section 45 -Paragraph 1B -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=118930883&loc=SL7669625-108580 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 944 -SubTopic 220 -Section S99 -Paragraph 1 -Subparagraph (SX 210.7-04(18)) -URI http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263 Reference 5: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section S99 -Paragraph 2 -Subparagraph (SX 210.5-03(20)) -URI http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227 Reference 6: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 230 -SubTopic 10 -Section 45 -Paragraph 28 -URI http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585 Reference 7: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 260 -SubTopic 10 -Section 50 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257 + Details
Name: | us-gaap_NetIncomeLoss
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition The cash outflow associated with the acquisition of business during the period. The cash portion only of the acquisition price. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -Subparagraph (b)(1) -URI http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 230 -SubTopic 10 -Section 45 -Paragraph 13 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585 + Details
Name: | us-gaap_PaymentsToAcquireBusinessesGross
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition The cash inflow associated with the amount received from entity's raising of capital via private rather than public placement. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 230 -SubTopic 10 -Section 45 -Paragraph 14 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585 + Details
Name: | us-gaap_ProceedsFromIssuanceOfPrivatePlacement
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Amount of revenue recognized from goods sold, services rendered, insurance premiums, or other activities that constitute an earning process. Includes, but is not limited to, investment and interest income before deduction of interest expense when recognized as a component of revenue, and sales and trading gain (loss). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 280 -SubTopic 10 -Section 50 -Paragraph 22 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 280 -SubTopic 10 -Section 50 -Paragraph 32 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=115929826&loc=d3e8933-108599 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 280 -SubTopic 10 -Section 50 -Paragraph 22 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section S99 -Paragraph 2 -Subparagraph (SX 210.5-03(1)) -URI http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227 + Details
Name: | us-gaap_Revenues
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Details
Name: | us-gaap_LineOfCreditFacilityAxis=mhh_PNCBankNationalAssociationMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=us-gaap_RevolvingCreditFacilityMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=mhh_SwingLoansMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=mhh_TermLoanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_CreditFacilityAxis=mhh_DelayedDrawTermLoanFacilityMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_CounterpartyNameAxis=mhh_AshokTrivediAndSunilWadhwaniMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_RangeAxis=srt_MaximumMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_BusinessAcquisitionAxis=mhh_InfoTrellisIncMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_TypeOfArrangementAxis=mhh_AssetPurchaseAgreementMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_TypeOfArrangementAxis=mhh_SharePurchaseAgreementMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_TypeOfArrangementAxis=mhh_ActualYearOneEbitMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_TypeOfArrangementAxis=mhh_ActualYearTwoEbitMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |