← Back to directory
C

Critical MCP Server

Community
Extract and inline above-the-fold CSS, then defer the remaining stylesheets.
Category
Dev Tools #443 of 751
Stars
★ 10.3k Very popular
Transport
stdio (local process)
Runtime
Node.js 22.13+
Credentials
No credential needed
License
Apache-2.0
Last commit
Tools
1
49FMRS · D

This is a stdio MCP server included with the Critical project. It exposes optimize_critical_css to extract critical CSS, rewrite HTML, and return a structured report. The README documents the server command and optional SDK dependency, but provides no client configuration example or compatibility list, so no clients are listed.

Strongest · Documentation 13/20 Weakest · Reliability 7/20

Reliability
7/20
Security and permissions
11/20
Maintenance
10/20
Documentation
13/20
Setup experience
8/20
Why each score
Reliability 7/20
The README describes static and browser-rendered paths, automatic routing, structured reports, and explicit write options, and it outlines the MCP tool. However, the manifest is not cached and no server source, CI, or test evidence is provided, so initialization and tool-list handshakes, parameter validation, and error handling cannot be verified. The score reflects only plausible documented behavior.
Security and permissions 11/20
The documentation says the API does not write to disk by default, CLI writes require an explicit option, and the output avoids inline scripts while supporting a CSP nonce. These indicate some side-effect boundaries. Without server source, file and URL access scope, network behavior, input isolation, and dependency behavior cannot be checked; data flows are not clearly disclosed. No evidence establishes a red-line issue.
Maintenance 10/20
The supplied material identifies an Apache-2.0 license and two maintainers, but provides no evidence about releases, commits, issue response, dependency updates, or a security-response channel. The unarchived status alone does not demonstrate sustained maintenance, so the score is limited.
Documentation 13/20
The README includes CLI and API references, the MCP tool name, some parameters, runtime requirements, optional dependencies, examples, and descriptions of the two engines. It lacks mainstream MCP client configuration, authentication and troubleshooting guidance, and complete MCP parameter and limitation details. Server source is also unavailable for cross-checking.
Setup experience 8/20
The README gives a stdio launch command, `node src/mcp.js`, and says the optional MCP SDK is required. It does not provide an SDK installation command, mainstream client connection configuration, platform compatibility details, or verifiable execution evidence, leaving setup steps for users to work out.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesUses the networkControls a browser

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 and side effects

  • 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.

Setup

Before you start

Runtime:Node.js 22.13+

Use Node.js ≥ 22.13 and install the optional @modelcontextprotocol/sdk peer dependency. Start the server over stdio with: node src/mcp.js. No client configuration example is provided.

Check that it works

Confirm optimize_critical_css appears in the client’s tool list, then call it on an HTML page; it should return critical CSS, rewritten HTML, and a structured report.

Troubleshooting

  1. Confirm that Node.js is version 22.13 or later.
  2. If the MCP server does not start, check that the optional @modelcontextprotocol/sdk peer dependency is installed.
  3. For the render engine, confirm that Playwright is installed and Chromium has been installed.
  4. Check that HTML and CSS paths resolve, along with the optional base setting.

Things to try

Once connected, you can ask your AI assistant things like:

  • Extract critical CSS from dist/index.html and return the optimized HTML and report.
  • Analyze this HTML for critical CSS and inline it while deferring the remaining stylesheets.

Tools 1

optimize_critical_css read-only
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.

Use cases

Extract and inline above-the-fold CSS for static sites or multipage applications.
Use browser rendering to generate viewport-specific critical CSS for single-page applications.
Retrieve optimization results and structured diagnostics in build pipelines or coding-agent workflows.

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.

Similar servers

Source revision 9220d2199681 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/critical.svg)](https://followmcp.com/en/servers/critical)