Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

CSS Server

БесплатноНе проверен

Enables CSS analysis with 150+ metrics, MDN documentation retrieval, and browser compatibility checks for CSS properties.

GitHubEmbed

Описание

Enables CSS analysis with 150+ metrics, MDN documentation retrieval, and browser compatibility checks for CSS properties.

README

Code style: crackerjack Runtime: oneiric Framework: FastMCP uv Python: 3.14+

Universal CSS Analysis and Documentation MCP Server. Analyze any CSS with ~150 derived metrics (built on ~78 CSSMetrics fields plus selector/property counters) for complexity, specificity, and quality.

Features

  • CSS Analysis: ~150 derived metrics (78 CSSMetrics fields plus selector/property counters) 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-mcp

Usage

Start Server

# Via CLI
css-mcp

# Via Python module
python -m css_mcp.server

Environment Variables

Variable Default Description
CSS_MCP_HTTP_PORT 3050 Server port
CSS_MCP_HTTP_HOST localhost Server host
CSS_MCP_DEBUG false Inherited Oneiric debug flag; sets the field on CSSMCPSettings but has no local behavioral effect (no code path in css_mcp/ reads settings.debug yet). Wire-up is tracked as a follow-up.

Available Tools

Tool Description
analyze_css Full CSS analysis with ~150 derived metrics
analyze_css_summary Quick CSS summary (faster)
get_docs MDN documentation for CSS properties
get_browser_compatibility Check browser support for properties
search_properties Search for CSS properties
get_properties_by_category Get properties by category
analyze_project_css Analyze all CSS in a project
list_capabilities List available capabilities
health_check 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 derived metrics (built from 78 CSSMetrics fields plus selector and property counters), 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
  • !important usage
  • CSS 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_mcp

Installation via Bodai Marketplace

The css plugin is published through the Bodai marketplace. Add the marketplace, install the plugin, and the css-mcp HTTP server becomes available as mcp__css__* tools alongside three slash commands (/css-audit-project, /css-analyze, /css-check-compat). The plugin manifest lives at .claude-plugin/plugin.json and the server is registered in the colocated .mcp.json at http://localhost:3050/mcp — start the css-mcp server first, then run claude plugin install css --marketplace bodai-plugins from a fresh session.

License

BSD-3-Clause

from github.com/lesleslie/css-mcp

Установить CSS Server в Claude Desktop, Claude Code, Cursor

Рекомендуется · одна команда, все IDE
unyly install css-mcp-server

Ставит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.

Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh

Или настроить вручную

Выполни в терминале:

claude mcp add css-mcp-server -- uvx css-mcp

Пошаговые гайды: как установить CSS Server

FAQ

CSS Server MCP бесплатный?

Да, CSS Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для CSS Server?

Нет, CSS Server работает без API-ключей и переменных окружения.

CSS Server — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить CSS Server в Claude Desktop, Claude Code или Cursor?

Открой CSS Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Playwright

Browser automation, scraping, screenshots

Microsoftавтор: Microsoft

Puppeteer

Browser automation and web scraping.

modelcontextprotocolавтор: modelcontextprotocol

Garmin Connect

An MCP server for Garmin Connect that provides access to fitness activities, health statistics, and sleep data by routing requests through a headless browser to

etweisbergавтор: etweisberg

Higgsfield Unlimited

MCP server for Higgsfield AI that enables unlimited-mode image, video, audio generation, uploads, and job management via multiple parallel accounts, using brows

nukIeerавтор: nukIeer

opentabs-dev/opentabs

Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a

opentabs-devавтор: opentabs-dev

robhunter/agentdeals

1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan

robhunterавтор: robhunter

hlydecker/ucsc-genome-mcp

MCP server to interact with the UCSC Genome Browser API, letting you find genomes, chromosomes, and more.

hlydeckerавтор: hlydecker

34892002/bilibili-mcp-js

A MCP server that supports searching for Bilibili content. Provides LangChain integration examples and test scripts.

34892002автор: 34892002

achiya-automation/safari-mcp

Native Safari browser automation for AI agents with 80+ tools. No Chrome dependency, optimized for Apple Silicon with 60% less CPU overhead.

achiya-automationавтор: achiya-automation

agent-infra/mcp-server-browser

Browser automation capabilities using Puppeteer, both support local and remote browser connection.

bytedanceавтор: bytedance

Compare CSS Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории browse