# Critical MCP Server

> Extract and inline above-the-fold CSS, then defer the remaining stylesheets.

- **URL**: https://followmcp.com/en/servers/critical
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 10.3k
- **FMRS Score**: 49/100 (Grade D)
- **Source**: https://github.com/addyosmani/critical
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 22.13+
- **Auth**: No credential needed

## Overview
The Critical MCP Server extracts critical-path CSS for HTML pages and can inline it while deferring the remaining stylesheets. It exposes optimize_critical_css over stdio and returns critical CSS, rewritten HTML, and a structured report. The optional @modelcontextprotocol/sdk peer dependency is required.

## Best for
- Developers optimizing first-render stylesheet loading for HTML pages.
- Teams that want a report covering engine choice, rule counts, byte counts, and warnings.

## Not for
- Users who need a documented client installation configuration or compatibility list.
- Users who do not work with HTML, CSS, or page paths.

## Required permissions
- Provide the HTML path or HTML content to process; CSS may also be provided.
- The render engine requires Playwright and Chromium; the static engine does not require a browser.
- Inlining produces rewritten HTML; the README says the MCP tool returns results but does not say that it writes files itself.

## Risks
- Inlining changes how stylesheets load in the HTML output; review the result and page behavior before deployment.
- The render engine depends on Playwright and a browser, and cannot run without them.
- The static engine matches CSS against the delivered DOM; an empty application shell needs the render engine to measure rendered content.

## Tools (1)
- `optimize_critical_css`: Extract critical CSS from HTML with optional CSS and engine settings; optionally inline it and defer the remaining stylesheets. Returns critical CSS, rewritten HTML, and a report.
