<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.10.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>393</ContextCount>
  <ElementCount>420</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>82</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfComprehensiveIncomeLossParenthetical</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Changes In Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfChangesInShareholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes In Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Statement - Consolidated Statements of Changes In Shareholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfChangesInShareholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes In Shareholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureBasisOfPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - Merger</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMerger</Role>
      <ShortName>Merger</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecurities</Role>
      <ShortName>Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - Loans and Allowance for Loan and Lease Losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLosses</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Fair Value Measurement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurement</Role>
      <ShortName>Fair Value Measurement</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Guarantees and Commitments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureGuaranteesAndCommitments</Role>
      <ShortName>Guarantees and Commitments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Subordinated Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubordinatedDebt</Role>
      <ShortName>Subordinated Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Defined Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlans</Role>
      <ShortName>Defined Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Accumulated Other Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss</Role>
      <ShortName>Accumulated Other Comprehensive Loss</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - Restricted Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRestrictedCommonStock</Role>
      <ShortName>Restricted Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Revenue Recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRevenueRecognition</Role>
      <ShortName>Revenue Recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Earnings per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShare</Role>
      <ShortName>Earnings per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Revenue Recognition (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRevenueRecognitionPolicies</Role>
      <ShortName>Revenue Recognition (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Merger (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</Role>
      <ShortName>Merger (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMerger</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</Role>
      <ShortName>Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecurities</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Loans and Allowance for Loan and Lease Losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLosses</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurement</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Defined Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansTables</Role>
      <ShortName>Defined Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlans</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Earnings per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShareTables</Role>
      <ShortName>Earnings per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShare</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Merger (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerNarrativeDetails</Role>
      <ShortName>Merger (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - Merger (Allocation of the Purchase Price) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerAllocationOfPurchasePriceDetails</Role>
      <ShortName>Merger (Allocation of the Purchase Price) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Merger (Preliminary Estimated Fair Value of Assets Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerPreliminaryEstimatedFairValueOfAssetsAcquiredDetails</Role>
      <ShortName>Merger (Preliminary Estimated Fair Value of Assets Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Merger (Fair Value Adjustments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerFairValueAdjustmentsDetails</Role>
      <ShortName>Merger (Fair Value Adjustments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Merger (Fair Value of Loans Acquired) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerFairValueOfLoansAcquiredDetails</Role>
      <ShortName>Merger (Fair Value of Loans Acquired) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100360 - Disclosure - Merger (Pro Forma Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerProFormaInformationDetails</Role>
      <ShortName>Merger (Pro Forma Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureMergerTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100370 - Disclosure - Investment Securities (Unrealized Gain (Loss) on Investments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesUnrealizedGainLossOnInvestmentsDetails</Role>
      <ShortName>Investment Securities (Unrealized Gain (Loss) on Investments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100380 - Disclosure - Investment Securities (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesNarrativeDetails</Role>
      <ShortName>Investment Securities (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100390 - Disclosure - Investment Securities (Schedule of Gross Realized Gains (Losses) on Sales of Available-For-Sale Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfGrossRealizedGainsLossesOnSalesOfAvailableForSaleSecuritiesDetails</Role>
      <ShortName>Investment Securities (Schedule of Gross Realized Gains (Losses) on Sales of Available-For-Sale Securities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Investment Securities (Schedule of Fair Value and Unrealized Loss on Investments in a Continuous Unrealized Loss Position) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesScheduleOfFairValueAndUnrealizedLossOnInvestmentsInContinuousUnrealizedLossPositionDetails</Role>
      <ShortName>Investment Securities (Schedule of Fair Value and Unrealized Loss on Investments in a Continuous Unrealized Loss Position) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>100410 - Disclosure - Investment Securities (Investments Classified by Contractual Maturity Date) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesInvestmentsClassifiedByContractualMaturityDateDetails</Role>
      <ShortName>Investment Securities (Investments Classified by Contractual Maturity Date) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>100420 - Disclosure - Loans and Allowance for Loan and Lease Losses (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesNarrativeDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>100430 - Disclosure - Loans and Allowance for Loan and Lease Losses (Classes Of The Loan Portfolio Summarized By The Aggregate Risk Rating) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesClassesOfTheLoanPortfolioSummarizedByTheAggregateRiskRatingDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Classes Of The Loan Portfolio Summarized By The Aggregate Risk Rating) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>100440 - Disclosure - Loans and Allowance for Loan and Lease Losses (Impaired Loans by Loan Portfolio Class) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesImpairedLoansByLoanPortfolioClassDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Impaired Loans by Loan Portfolio Class) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>100450 - Disclosure - Loans and Allowance for Loan and Lease Losses (Average Recorded Investment Of Impaired Loans And Related Interest Income By Loan Portfolio Class) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesAverageRecordedInvestmentOfImpairedLoansAndRelatedInterestIncomeByLoanPortfolioClassDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Average Recorded Investment Of Impaired Loans And Related Interest Income By Loan Portfolio Class) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>100460 - Disclosure - Loans and Allowance for Loan and Lease Losses (Nonaccrual Loans By Classes Of The Loan Portfolio) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesNonaccrualLoansByClassesOfTheLoanPortfolioDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Nonaccrual Loans By Classes Of The Loan Portfolio) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>100470 - Disclosure - Loans and Allowance for Loan and Lease Losses (Loan Portfolio Summarized By The Past Due Status) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesLoanPortfolioSummarizedByThePastDueStatusDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Loan Portfolio Summarized By The Past Due Status) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>100480 - Disclosure - Loans and Allowance for Loan and Lease Losses (Allowance And Recorded Investment In Financing Receivables) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesAllowanceAndRecordedInvestmentInFinancingReceivablesDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Allowance And Recorded Investment In Financing Receivables) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>100490 - Disclosure - Loans and Allowance for Loan and Lease Losses (Troubled Debt Restructurings) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTroubledDebtRestructuringsDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Troubled Debt Restructurings) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>100500 - Disclosure - Loans and Allowance for Loan and Lease Losses (Schedule of Accretion of Purchased Impaired Loan) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesScheduleOfAccretionOfPurchasedImpairedLoanDetails</Role>
      <ShortName>Loans and Allowance for Loan and Lease Losses (Schedule of Accretion of Purchased Impaired Loan) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureLoansAndAllowanceForLoanAndLeaseLossesTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>100510 - Disclosure - Fair Value Measurement (Assets Measured at Fair Value on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementAssetsMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurement (Assets Measured at Fair Value on Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>100520 - Disclosure - Fair Value Measurement (Fair Value Measurements, Nonrecurring) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementFairValueMeasurementsNonrecurringDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value Measurements, Nonrecurring) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>100530 - Disclosure - Fair Value Measurement (Fair Value Inputs, Assets, Quantitative Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementFairValueInputsAssetsQuantitativeInformationDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value Inputs, Assets, Quantitative Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>100540 - Disclosure - Fair Value Measurement (Fair Value, by Balance Sheet Grouping) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementFairValueByBalanceSheetGroupingDetails</Role>
      <ShortName>Fair Value Measurement (Fair Value, by Balance Sheet Grouping) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>100550 - Disclosure - Fair Value Measurements (Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>100560 - Disclosure - Guarantees and Commitments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureGuaranteesAndCommitmentsNarrativeDetails</Role>
      <ShortName>Guarantees and Commitments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureGuaranteesAndCommitments</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>100570 - Disclosure - Subordinated Debt (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubordinatedDebtNarrativeDetails</Role>
      <ShortName>Subordinated Debt (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubordinatedDebt</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>100580 - Disclosure - Defined Benefit Plans (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansNarrativeDetails</Role>
      <ShortName>Defined Benefit Plans (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>100590 - Disclosure - Defined Benefit Plans (Net Periodic Benefit Costs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansNetPeriodicBenefitCostsDetails</Role>
      <ShortName>Defined Benefit Plans (Net Periodic Benefit Costs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureDefinedBenefitPlansTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>100600 - Disclosure - Accumulated Other Comprehensive Loss (Components of Accumulated Other Comprehensive Loss, Net of Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossNetOfTaxesDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Components of Accumulated Other Comprehensive Loss, Net of Taxes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>100610 - Disclosure - Restricted Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRestrictedCommonStockDetails</Role>
      <ShortName>Restricted Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureRestrictedCommonStock</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>100620 - Disclosure - Earnings per Common Share (Basic Earnings (Loss) Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShareBasicEarningsLossPerShareDetails</Role>
      <ShortName>Earnings per Common Share (Basic Earnings (Loss) Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShareTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>100630 - Disclosure - Earnings per Common Share (Basic Earnings (Loss) Per Share) (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShareBasicEarningsLossPerShareNarrativeDetails</Role>
      <ShortName>Earnings per Common Share (Basic Earnings (Loss) Per Share) (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureEarningsPerCommonShareTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="mpb-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>100640 - Disclosure - Subsequent Events (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubsequentEventsNarrativeDetails</Role>
      <ShortName>Subsequent Events (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.midpennbank.com/20180630/taxonomy/role/DisclosureSubsequentEvents</ParentRole>
      <Position>65</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>mpb-20180630.xml</File>
    <File>mpb-20180630.xsd</File>
    <File>mpb-20180630_cal.xml</File>
    <File>mpb-20180630_def.xml</File>
    <File>mpb-20180630_lab.xml</File>
    <File>mpb-20180630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2018-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
