Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

WebPerf Snippets

MCP server by nucliweb Community

Measures Core Web Vitals and other web performance metrics with tested JavaScript snippets run in headless Chromium. It is for developers and AI agents that need reliable, structured performance data.

  • Score 89
  • 1.5k stars
  • MIT
  • Updated

Install WebPerf Snippets

Built from the published package, never by AI.

claude mcp add webperf-snippets -- npx -y webperf-snippets

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install WebPerf Snippets in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the webperf-snippets block.

About

WebPerf Snippets is a set of tested JavaScript snippets that measure and debug web performance. The measurement code is fixed and tested in CI, and every snippet returns an object that follows one shared contract, so an agent reasons about the result instead of writing measurement code itself. The CLI includes an MCP server that gives an AI agent these snippets and workflows as tools, running on a headless Chromium through Playwright.

The project covers Core Web Vitals, loading, interaction, media and resources. The CLI prints JSON output for agents or scripts, supports performance budgets, and can run in CI. It is aimed at developers and teams who want repeatable performance audits from an AI assistant, from a terminal, or from DevTools.

Written from the project's README and checked against it.

Tools it gives your assistant

  • Core Web Vitals snippetsMeasures LCP, CLS and INP, with LCP sub-parts, trail, image entropy and video candidate.
  • Loading snippetsCovers TTFB, FCP, render-blocking resources, scripts, fonts, CSS, caching and compression.
  • Interaction snippetsChecks long animation frames, input latency, long tasks, layout shifts and scroll performance.
  • Media and resource snippetsAudits image and video elements, oversized images, network bandwidth and connection quality.
  • WorkflowsRuns predefined chains of snippets such as core-web-vitals, audit, loading and interaction.
  • Structured JSON outputReturns each result as an object that an agent or script can read.

What you need

  • Node.js, to run the npx commands
  • Headless Chromium, run through Playwright
SettingNeededWhat it is
CRUX_API_KEYEnvironment variable, secretOptionalChrome UX Report API key for the field data of get_crux; the other tools work without it

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Audit https://example.com for Core Web Vitals and report LCP, CLS and INP.
  • Run the loading audit on my site and explain the slowest resources.
  • Why is my TTFB so high on this page? Find the cause.

Good to know

  • Skills outside the project folder need a --workspace argument, or the server returns Access denied.
  • The Claude Code plugin install applies only to Claude Code.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to WebPerf Snippets

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

WebPerf Snippets: common questions

How does WebPerf Snippets work with an AI agent?

The agent calls fixed, tested snippets through the MCP server and reads the structured object each one returns. The agent then reasons about the measured result.

Which browser does the MCP server use?

The source says the MCP server runs on a headless Chromium.

Can I run the snippets without an AI agent?

Yes. The snippets can be pasted into the DevTools console, saved as DevTools snippets, run with the CLI, or used in the DevTools extension, which is in beta.

How do I install WebPerf Snippets?

In Claude Code run claude mcp add webperf-snippets -- npx -y webperf-snippets. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is WebPerf Snippets the official server?

WebPerf Snippets is a community project by nucliweb, not verified by a company domain.

Is WebPerf Snippets free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is WebPerf Snippets safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to WebPerf Snippets?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does WebPerf Snippets work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

WebPerf Snippets Install

Add to stack

Loading.