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

Critical

MCP server by addyosmani Verified · npm:critical

Extracts above-the-fold critical CSS from HTML, inlines it, and defers the remaining stylesheets. Built for static sites, MPAs and single-page apps, and for use by humans, build pipelines and coding agents.

  • Score 94
  • 10k stars
  • 36k a week
  • Apache-2.0
  • Updated

Install Critical

Built from the published package, never by AI.

claude mcp add critical -- npx -y critical

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

Step-by-step: install Critical 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 critical block.

About

Critical extracts the critical-path, above-the-fold CSS from an HTML document and inlines it into a style tag at the top of the head. It replaces each stylesheet link with a preload hint and moves the link to the end of the body, so the browser can paint the first screen without waiting on a full stylesheet. The output is deterministic, so the same input produces byte-identical output.

It offers two engines. The static engine matches CSS rules against the delivered DOM without a browser, while the render engine loads the page in a real viewport using Playwright. In auto mode it picks an engine for each document and reports why. It is aimed at static sites, MPAs and single-page apps, and is built to be driven by humans, build pipelines and coding agents.

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

What you need

  • Node.js
  • npm
  • Playwright and Chromium for the render engine (optional)
  • Docker (optional, container image includes Playwright and Chromium)

Try asking

  • Inline critical CSS into every HTML file in my dist folder.
  • Explain which engine Critical would use for my index.html.
  • Show the size savings from inlining critical CSS for my home page.

Good to know

  • The render engine needs Playwright, which is an optional peer dependency and must be installed separately outside Docker.
  • The critical() function returns results and does not write to disk on its own.
  • The source does not list the MCP server's tool names.

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

What you can do with it

  • Remove render-blocking CSS from static sites
  • Inline critical CSS in a CI build
  • Improve first render in single-page apps

Alternatives to Critical

All alternatives →

Compare with Appllama, codesign or Pascal 3D Editor

Critical: common questions

Does Critical work with a strict Content Security Policy?

Yes. It adds no inline scripts and defers stylesheets with preload links, and an inline nonce option can be set for a strict style-src policy.

Does Critical need a browser to run?

The static engine does not need a browser. The render engine uses Playwright and is only needed for single-page app shells or viewport-accurate results.

Is the output the same every time?

Yes. The source says the same input produces byte-identical output, so the results can be diffed in version control and run in CI.

How do I install Critical?

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

Is Critical the official server?

Critical is published by npm:critical from its verified domain in the official MCP Registry.

Is Critical free?

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

Is Critical safe to use?

It scores 94 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 Critical?

Similar MCP servers: Appllama, codesign, Pascal 3D Editor, Agent-Native Design.

Does Critical 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.

Critical Install

Add to stack

Loading.