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.
Install WebPerf Snippets
Built from the published package, never by AI.
claude mcp add webperf-snippets -- npx -y webperf-snippetsRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"webperf-snippets": {
"args": [
"-y",
"webperf-snippets"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"webperf-snippets": {
"args": [
"-y",
"webperf-snippets"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"webperf-snippets": {
"args": [
"-y",
"webperf-snippets"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add webperf-snippets -- npx -y webperf-snippets{
"mcpServers": {
"webperf-snippets": {
"args": [
"-y",
"webperf-snippets"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add webperf-snippets npx -y webperf-snippetsGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
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
| Setting | Needed | What it is |
|---|---|---|
CRUX_Environment variable, secret | Optional | Chrome 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
ANo 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 →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
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.
