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.
Install Critical
Built from the published package, never by AI.
claude mcp add critical -- npx -y criticalRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"critical": {
"args": [
"-y",
"critical"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"critical": {
"args": [
"-y",
"critical"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"critical": {
"args": [
"-y",
"critical"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add critical -- npx -y critical{
"mcpServers": {
"critical": {
"args": [
"-y",
"critical"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add critical npx -y criticalGemini 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 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
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
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 →Appllama gives AI assistants research on top-grossing mobile apps, plus a build bar for native-feeling Expo and React Native screens. It suits developers building mobile apps with AI assistants.
Creates, edits and exports editable designs for AI assistants through the CoDesign MCP server, built on IMG.LY's CE.SDK design engine. It suits social teams, agencies and designers who need posters, social posts, videos and print layouts.
Pascal 3D Editor lets AI agents inspect, edit, validate, and save editable 3D building scenes through an MCP server. It is aimed at architecture, engineering, construction, and operations teams. Local use needs no Pascal account.
Agent-Native Design is the Design agent in Agent-Native, an open-source TypeScript framework. It generates and refines interactive designs with agent help. The same actions serve both the agent and the UI.
Draws and edits draw.io diagrams on a live browser canvas for AI agents such as Claude Code, Cursor and VS Code. It suits people who want to draw diagrams with AI and keep editing them by hand.
Framelink MCP for Figma gives coding assistants access to your Figma files. It supplies design data so the assistant can implement designs in any framework, mainly for use with Cursor.
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.
