In this article, we propose a multiport plasmonic system (MPS) for implementing all-type logic gates based on coding metamaterials and inverse design technology. Compared to traditional plasmonic logic gates, the coding metamaterials based on metal-dielectric-metal (MDM) structures provide powerful programmability for manipulating electromagnetic (EM) waves and have a compact footprint (0.8 µm × 1.1 µm) for integration. To improve the performance of logic gates, the nondominated sorting genetic algorithm version II (NSGA-II) are used to optimize the distributions of coding metamaterials. After the optimization, the simulation results show that all types of logic gates (AND, OR, NOT, NAND, NOR, XNOR, and XOR) can be obtained with an operating wavelength of 1.31 µm. The maximum extinction ratios between logic states "1" and "0" reach 10.15 dB, 57.54 dB, 43.25 dB, 20.76 dB, 10.42 dB, 24.04 dB, and 27.74 dB for the AND, OR, NOT, NAND, NOR, XNOR, and XOR gates, respectively. Moreover, wavelength-tunable logic operations are also demonstrated to work within a wide spectrum. Our proposed plasmonic system not only provides a universal scheme for implementing all-type compact logic gates for optical processing and computing but also demonstrates effective applications of inverse design in nanophotonic devices.