Metal-organic frameworks (MOFs) possess great potential for detecting toxic gases for environmental remediation and developing clean energy storage systems. Herein, two porphyrin-based MOF composites (Zn-TCPP@PVP and Ni-TCPP@PVP) were synthesized and successfully applied for selective detection of ammonia and supercapacitor applications. M-TCPP@PVP (M = Ni, Zn) polymer composite MOFs are controllably synthesized using Ni and Zn metal ions and TCPP (tetrakis-(4-carboxyphenyl) phosphonium porphyrin) organic linker in presence of polyvinyl pyrrolidone (PVP) modulator. All prepared materials were characterized by XRD, FT-IR, SEM, BET and XPS techniques. The obtained M-TCPP@PVP (M = Ni, Zn) composites were used as a sensing materials for ammonia, formaldehyde, ethanol, and acetic acid. The Ni-TCPP@PVP composite exhibits twofold more sensing activity towards ammonia gas than the Zn-TCPP@PVP composite at 50 ppm, with sensing response of 61 and 32.7 respectively. In addition, M-TCPP@PVP (M = Ni, Zn) MOFs with excellent surface area, high electrical conductivity and thermal stability, have been explored for supercapacitor applications. In a three-electrode measurement, Ni-TCPP@PVP composite delivered high specific capacity of 205 C g-1, whereas Zn-TCPP@PVP composite delivered only 98 C g-1 at a current density of 1 A g-1. Moreover, the as-fabricated symmetric supercapacitor device Ni-TCPP@PVP & Vert;Ni-TCPP@PVP\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left(\text{Ni}-\text{TCPP}@\text{PVP}\Vert \text{Ni}-\text{TCPP}@\text{PVP}\right)$$\end{document} utilizing Ni-TCPP@PVP material delivers a maximum energy density of 12 Wh kg-1 and power density of 3770 W kg-1. The present study explores the potential of porphyrin-based M-TCPP@PVP (M = Ni, Zn) MOFs for the detection of toxic gases and for the next generation charge storage applications.