v3.25.4

BASIS OF PRESENTATION - (Details) $ in Thousands | 12 Months Ended |
--- | --- | ---
Dec. 31, 2025 USD ($) installment shares | Dec. 31, 2024 USD ($) installment shares | Dec. 31, 2023 USD ($) installment shares | Aug. 11, 2016 shares
Basis Of Presentation [Line Items] |  |  |  |
Repurchase of shares, value | $ 917,389 | $ 169,867 | $ 144,020 |
Actual tax benefits recognized related to stock-based compensation | 50,100 | 27,800 | 18,900 |
Government Assistance, Operating Income, Increase (Decrease) | 24,500 | 20,700 | $ 15,500 |
Government Assistance, Asset, Current | 24,500 | 24,100 |  |
Government Assistance, Asset, Noncurrent | 11,800 | 12,700 |  |
Government Assistance, Liability, Noncurrent | $ 14,200 | $ 6,300 |  |
Options granted (in shares) | shares | 127,764 | 81,192 | 12,437 |
Two Thousand Sixteen Amended and Restated Incentive Award Plan |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Number of shares registered and available for grant (in shares) | shares |  |  |  | 6,000,000
Shares available for future stock compensation grants (in shares) | shares | 1,900,000 | 2,100,000 |  |
Two Thousand Sixteen Amended and Restated Incentive Award Plan | Restricted Stock Units (RSU) | Non Employee Directors |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Award vesting installments | installment | 4 | 4 | 4 |
Shares granted (in shares) | shares | 386 | 674 | 848 |
Two Thousand Sixteen Amended and Restated Incentive Award Plan | Restricted Stock Units (RSU) | Vesting After Four Years |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Award vesting period |  | 4 years | 4 years |
Shares granted (in shares) | shares |  | 1,087 | 45,988 |
Two Thousand Sixteen Amended and Restated Incentive Award Plan | Restricted Stock Units (RSU) | Share Based Compensation Award Vesting After Five Years |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Award vesting period | 5 years | 5 years |  |
Shares granted (in shares) | shares | 41,075 | 131,156 |  |
Maximum | Two Thousand Sixteen Amended and Restated Incentive Award Plan |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Share-based compensation option terms | 10 years |  |  |
2022 Share Repurchase Program |  |  |  |
Basis Of Presentation [Line Items] |  |  |  |
Repurchase of shares (in shares) | shares | 2,961,924 | 527,160 | 781,068 |
Repurchase of shares, value | $ 912,900 | $ 174,200 | $ 144,000 |
Remaining amount of repurchase program | $ 821,700 |  |  |

X
- Definition Basis of presentation. + References No definition available. + Details
Name: | medp_BasisOfPresentationLineItems
Namespace Prefix: | medp_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Share-Based Compensation Arrangement By Share-Based Payment Award, Number Of Vesting Installments + References No definition available. + Details
Name: | medp_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfVestingInstallments
Namespace Prefix: | medp_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | duration

X
- Definition Aggregate number of common shares reserved for future issuance. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480566/210-10-S99-1 + Details
Name: | us-gaap_CommonStockCapitalSharesReservedForFutureIssuance
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of tax benefit for recognition of expense of award under share-based payment arrangement. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (h)(1)(i) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Amount of asset from government assistance, classified as current. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 832 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org/1943274/2147483507/832-10-50-3 + Details
Name: | us-gaap_GovernmentAssistanceAmountCumulativeCurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of asset from government assistance, classified as noncurrent. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 832 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org/1943274/2147483507/832-10-50-3 + Details
Name: | us-gaap_GovernmentAssistanceAmountCumulativeNoncurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of liability from government assistance, classified as noncurrent. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 832 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org/1943274/2147483507/832-10-50-3 + Details
Name: | us-gaap_GovernmentAssistanceLiabilityNoncurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Amount of increase (decrease) in income from government assistance, classified as operating. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 832 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 3 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org/1943274/2147483507/832-10-50-3 + Details
Name: | us-gaap_GovernmentAssistanceOperatingIncome
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition The cash outflow to reacquire common stock during the period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 230 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 15 -Subparagraph (a) -Publisher FASB -URI https://asc.fasb.org/1943274/2147482740/230-10-45-15 + Details
Name: | us-gaap_PaymentsForRepurchaseOfCommonStock
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Period over which grantee's right to exercise award under share-based payment arrangement is no longer contingent on satisfaction of service or performance condition, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, combination of market, performance or service condition. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(1) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition The number of grants made during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(2)(iii)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Topic 718 -SubTopic 10 -Section 50 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | instant

X
- Definition Gross number of share options (or share units) granted during the period. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (c)(1)(iv)(01) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Definition Period from grant date that an equity-based award expires, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (a)(2) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod
Namespace Prefix: | us-gaap_
Data Type: | xbrli:durationItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount remaining authorized for purchase of share under share repurchase plan. Includes, but is not limited to, repurchase of stock and unit of ownership. + References No definition available. + Details
Name: | us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Definition Number of shares that have been repurchased and retired during the period. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Name Accounting Standards Codification -Section 50 -Paragraph 2 -SubTopic 10 -Topic 505 -Publisher FASB -URI https://asc.fasb.org/1943274/2147481112/505-10-50-2 Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(28)) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480566/210-10-S99-1 Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(29)) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480566/210-10-S99-1 Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Topic 505 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.3-04) -Publisher FASB -URI https://asc.fasb.org/1943274/2147480008/505-10-S99-1 + Details
Name: | us-gaap_StockRepurchasedAndRetiredDuringPeriodShares
Namespace Prefix: | us-gaap_
Data Type: | xbrli:sharesItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_PlanNameAxis=medp_TwoThousandSixteenAmendedAndRestatedIncentiveAwardPlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_AwardTypeAxis=us-gaap_RestrictedStockUnitsRSUMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | srt_TitleOfIndividualAxis=medp_NonEmployeeDirectorsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=medp_ShareBasedCompensationAwardVestingAfterFourYearsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_VestingAxis=medp_ShareBasedCompensationAwardVestingAfterFiveYearsMember
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: | srt_ShareRepurchaseProgramAxis=medp_ShareRepurchaseProgramMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |