नमस्ते

(Overview)
Lighthouseexplainswhyapageisslow,butinareportwith100+itemsthattakesanexperttoturnintoaplan,andanAIassistantcan’trunabrowseritself.PerfLensisanMCP server published on npmthatgivestheassistantfourtools:auditapage,rankthefixes,comparebeforeandafter,andexplainametric.Onademostorewithcommonmistakes,itsrankedfixestookthemobilescorefrom39 to 100andthemainimagefrom52 s to 910 ms.
(Architecture)
AthinMCPlayeroverpure, deterministic code.ArunnervalidatestheURL,findsChromeorEdge,runsLighthousewithahardtimeoutandalwaysclosesthebrowser.Thecoreturnsa~1MBrawresultintoashortsummaryandranks fixes with 21 playbooksbyestimatedimpactperunitofeffort.EverytoolreturnsmarkdownforthemodelplusZod-validated structured output.ThereisdeliberatelynoLLMinside:theassistantitrunsinalreadydoesthereasoning.
(Engineering)
Itestedagainstrealpagesandchangedwhatdidn’tholdup.Lighthouse12reportsmostproblemstwiceandthecopiescandisagree,sonaivededuplicationdroppedareallayout-shiftfinding;Ikeptthestrongersignalinstead.Re-auditinganunchangedpageswungblockingtimefrom104msto0,socomparisonsuseper-metric noise bandsandmedian-of-runs.Tooldefinitionsloadintoeverychat,soIcutthem~16K → ~11.7K characters.CItestsonNode20and22andpublishesfromversiontagswithnpm trusted publishing and provenance,notokensstored.
DesignedandbuiltanMCP serverwithfourtoolsandvalidated,compactoutputsinsteadofrawLighthouseJSON.
Wroteanimpact-based rankingthatdoesn’tsaturate:pointslostonametrictimestheshareofthegapafixcloses.
Handledreal-worldnoise:duplicate Lighthouse findings,run-to-runvariance,missingbrowsers,DNSfailuresandtimeouts.
Keptstdoutcleanforthestdioprotocolandtestedthebuilt server end to endoverrealstdio.
SetupCIandtokenless npm publishingwithprovenancefromversiontags.
Builtalandingpagewithareal before/after demosonon-developerscanseewhatitdoes.
Gallery




Built with
Explore this project
Try the live site, browse the code, or get the package from npm.
Haveaprojectinmind?
autkarsh052@gmail.com