WebPerf Snippets
Measure Core Web Vitals and debug web performance with 56 snippets in a headless Chromium
At a glance
Not tested yet- GitHub stars
- 1,458
- Weekly downloads
- 1,228
- Last commit
- 2026-11-19
- Licence
- MIT
- Transport
- stdio
- Auth
- api-key
npx -y webperf-snippets
What it does
WebPerf Snippets is a set of tested JavaScript snippets that measure and debug web performance. The MCP server lets an agent in any MCP client call the snippets and workflows as tools on a headless Chromium and read the object each one returns. It is for people who want an agent to audit web performance with fixed measurement code instead of writing measurement code on the fly.
Tools it gives your agent
The sources do not list the individual MCP tools by name. They say the server exposes the snippets and the workflows as tools, and that the MCP server documentation covers the tools, the resources and prompts.
Quick start
- Add the server to your MCP client. In Claude Code:
claude mcp add webperf -- npx -y webperf-snippets mcp
- In Claude Code, the
webperfplugin installs the same server:
/plugin install webperf --marketplace nucliweb/webperf-snippets
- See the MCP server documentation for other clients, the tools, the resources and prompts, and the CrUX key.
Add this to .mcp.json in your project root (Claude Code) or .cursor/mcp.json (Cursor):
{
"mcpServers": {
"webperf-snippets": {
"command": "npx",
"args": [
"-y",
"webperf-snippets"
],
"env": {
"CRUX_API_KEY": "YOUR_CRUX_API_KEY"
}
}
}
}Replace each YOUR_ value with your own, and delete the variables you do not use.
Environment variables
CRUX_API_KEY: the sources mention a CrUX key in the MCP server documentation but do not explain what the variable is for.
Example prompts
- Audit this page for Core Web Vitals.
- Debug slow LCP on this URL.
- Why is my TTFB so high?
- Check for image optimization issues.
What to watch out for
- The server runs snippets on a headless Chromium.
- The sources point to the MCP server documentation for the CrUX key but do not describe its use or any cost.
- The sources state no other limits for the MCP server.
Not tested by tools4agents yet. Read the source repository before you install it.
Similar tools
Everything
The official test server. Exercises every part of the protocol, so it is the fastest way to check your setup works at all.
Filesystem
Gives an agent scoped read and write access to directories you name explicitly. The usual first MCP server people install.
Git
Read, search, and manipulate local Git repositories. Lets an agent inspect history and diffs without shelling out.
Sequential Thinking
Gives a model a scratchpad for multi step reasoning, letting it revise earlier steps instead of committing to a first answer.