CSS MCP Server
Checks browser compatibility for CSS properties in Firefox.
Fetches CSS property documentation from MDN Web Docs.
Checks browser compatibility for CSS properties in Safari.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CSS MCP Serveranalyze this CSS: .btn{color:red}"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CSS MCP Server
Universal CSS Analysis and Documentation MCP Server. Analyze any CSS with 150+ metrics for complexity, specificity, and quality.
Features
CSS Analysis: 150+ metrics for CSS complexity, specificity, and quality
MDN Documentation: Fetch CSS property docs from MDN Web Docs
Browser Compatibility: Check cross-browser support for CSS properties
Project Analysis: Analyze all CSS files in a project
Installation
# Using uv
uv pip install css-mcp
# Using pip
pip install css-mcpUsage
Start Server
# Via CLI
css-mcp
# Via Python module
python -m css_mcp.serverEnvironment Variables
Variable | Default | Description |
| 3050 | Server port |
| localhost | Server host |
| false | Enable debug mode |
Available Tools
Tool | Description |
| Full CSS analysis with 150+ metrics |
| Quick CSS summary (faster) |
| MDN documentation for CSS properties |
| Check browser support for properties |
| Search for CSS properties |
| Get properties by category |
| Analyze all CSS in a project |
| List available capabilities |
| Check server health |
Programmatic Usage
Use the analyzer directly in Python for any CSS:
Example: Analyze Any CSS
from css_mcp.analyzer import CSSAnalyzer
# Analyze any CSS content
analyzer = CSSAnalyzer()
metrics = analyzer.analyze(css_content)
# Get complexity score
print(f"Complexity: {metrics.complexity_score}/100")
# Get optimization suggestions
suggestions = analyzer.get_suggestions()Metrics
The analyzer provides 150+ metrics including:
Basic Metrics
Total rules, selectors, properties
File size (bytes, gzipped)
Lines of code
Selector Metrics
ID, class, element, universal selectors
Pseudo-classes and pseudo-elements
Combinators (descendant, child, sibling)
Selector depth
Specificity Metrics
Average, min, max specificity
High specificity rules
Specificity distribution
Property Metrics
Unique properties
Category distribution (layout, typography, etc.)
Vendor prefixes
!importantusageCSS custom properties
Quality Metrics
Duplicate selectors
Duplicate properties
Empty rules
Complexity score
Efficiency scores
Browser Compatibility
Built-in compatibility data for common CSS properties across:
Chrome
Firefox
Safari
Edge
Development
# Install dev dependencies
uv sync --group dev
# Run tests
pytest
# Type check
mypy css_mcp
# Lint
ruff check css_mcpLicense
BSD-3-Clause
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lesleslie/css-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server