The @depthark/css-first server is an intelligent CSS solution advisor that provides context-aware recommendations for UI implementation with MDN documentation integration and browser compatibility checking.
Core Capabilities:
Suggest CSS Solutions (
suggest_css_solution): Get intelligent, ranked CSS recommendations based on semantic analysis, framework detection, and preferred approach (modern, compatible, or progressive) with confidence scoringCheck Browser Support (
check_css_browser_support): Verify real-time browser compatibility for CSS properties using hybrid MDN/context7 integration, with options to include experimental featuresGet Property Details (
get_css_property_details): Retrieve comprehensive CSS property documentation including syntax, use cases, and optional code examplesConfirm Property Usage (
confirm_css_property_usage): Receive implementation guidance and framework-specific recommendations with optional fallback solutions through a consent-driven workflow
Key Features:
Project Context Awareness: Automatically detects frameworks (React, Vue, Angular, Svelte), CSS libraries (Tailwind, Bootstrap, Material-UI), and build tools
Intelligent Ranking: Scores suggestions based on intent match, browser support, and framework compatibility
Logical-First Approach: Prioritizes internationalization-friendly logical properties and units for RTL and vertical writing mode support
Modern CSS Support: Covers latest features (2021-2025) including container queries, CSS nesting,
:has(), dynamic viewport units, and scroll-driven animationsAutomated Feature Discovery: Continuously integrates new CSS features from MDN with intelligent categorization
Provides CSS-first solutions for UI implementation tasks by suggesting CSS properties, checking browser support, and offering implementation guidance with fallback strategies.
Integrates with Mozilla Developer Network (MDN) documentation to fetch accurate CSS property information, browser compatibility data, and implementation examples.
CSS First
An advanced MCP (Model Context Protocol) server that provides intelligent, context-aware CSS-first solutions for UI implementation tasks. Features semantic analysis, framework detection, and intelligent ranking with hybrid MDN integration including context7 support.
โข Glama Directory
Setup
Add to your MCP configuration:
Cursor
Add to your MCP settings:
Windsurf
Configure in your MCP settings:
GitHub Copilot / VS Code
Add to your MCP configuration:
Claude Code CLI
Add the MCP server:
Codex
Add config to your mcp_servers.toml:
Related MCP server: McpDocServer
Usage
After adding the configuration:
Restart your MCP client
Ask CSS questions like:
"Create a responsive card layout"
"Center a div vertically and horizontally"
"Add dark mode support"
"Make a sticky header"
"Create organic rounded corners with corner-shape"
"Design modern buttons with superellipse curves"
๐ Key Features
Intelligent Analysis
Semantic Intent Recognition: Understands user intent through advanced pattern matching (layout, animation, spacing, etc.)
Confidence Scoring: Provides transparency with confidence levels for suggestions
Context-Aware Keywords: Enhanced keyword extraction with semantic understanding
Project Context Awareness
Framework Detection: Automatically detects React, Vue, Angular, Svelte projects
CSS Framework Recognition: Supports Tailwind, Bootstrap, Material-UI, Chakra UI
Build Tool Integration: Recognizes Webpack, Vite, Parcel, Rollup environments
Constraint Analysis: Understands project constraints (performance, accessibility, responsive)
Enhanced MDN Integration
Hybrid Data Sources: Primary context7 integration with MDN fallback
Performance Caching: 1-hour intelligent caching for improved response times
Real-time Browser Support: Accurate compatibility data from MDN
Graceful Degradation: Fallback mechanisms ensure reliability
Intelligent Ranking
Relevance Scoring: Suggestions ranked by intent match, browser support, and framework compatibility
Category-Prioritized Search: Focuses on most relevant CSS feature categories
Framework-Specific Recommendations: Tailored advice for your tech stack
User Experience
Consent-Driven Workflow: User approval required before property recommendations
Detailed Analysis: Optional semantic analysis breakdown for transparency
Implementation Guidance: Framework-specific best practices and code examples
Development Installation
For contributors and advanced users who want to modify the source:
Development Usage
For development/testing with local builds:
Available Tools
1. suggest_css_solution โญ
Enhanced CSS-first solution suggester with semantic analysis, context awareness, and intelligent ranking.
Parameters:
task_description(string): Description of the UI task or problem to solvepreferred_approach(optional): 'modern', 'compatible', or 'progressive'target_browsers(optional): Array of target browsers/versionsproject_context(optional): Project context (framework, existing CSS patterns, constraints) NEWinclude_analysis(optional): Include semantic analysis details in response NEW
Examples:
Basic Usage:
With Project Context:
Response includes:
Intelligently ranked CSS suggestions
Framework-specific recommendations
Semantic analysis breakdown (optional)
Confidence scoring and intent detection
2. check_css_browser_support
Checks browser support for specific CSS properties using MDN data.
Parameters:
css_property(string): CSS property name to checkinclude_experimental(optional boolean): Include experimental features
Example:
3. get_css_property_details
Retrieves comprehensive information about a CSS property from MDN documentation.
Parameters:
css_property(string): CSS property name to get details forinclude_examples(optional boolean): Include code examples
Example:
4. confirm_css_property_usage
Confirms user consent for using a specific CSS property and provides implementation guidance.
Parameters:
css_property(string): CSS property name user wants to useuser_consent(boolean): User consent to use this CSS propertyfallback_needed(optional boolean): Whether fallback solutions are needed
Example:
๐ง How It Works
Intelligent Analysis Pipeline
Semantic Intent Recognition: Advanced regex patterns analyze task descriptions to understand user intent (layout, animation, spacing, responsive, visual, interaction)
Project Context Analysis: Detects frameworks, CSS libraries, build tools, and constraints from project context string
Hybrid MDN Integration:
Primary: Context7 tool for structured MDN data
Fallback: Direct MDN API scraping
Caching: 1-hour intelligent cache for performance
Intelligent Ranking: Scores suggestions based on:
Intent match relevance
Browser support level
Framework compatibility
User confidence multiplier
Context-Aware Recommendations: Provides framework-specific guidance and best practices
User Consent & Implementation: Consent-driven workflow with detailed implementation guidance
Example Analysis Flow
Development
๐ Project Structure
Key Architecture Benefits
Modular Design: Each CSS category has dedicated modules for maintainability
Semantic Analysis: Intent recognition and confidence scoring for accuracy
Context Awareness: Framework and project constraint detection
Performance Optimized: Intelligent caching and ranked results
Extensible: Easy to add new frameworks, patterns, and CSS features
๐ฏ CSS Feature Coverage
Intelligent Categories
The enhanced system provides context-aware suggestions across:
Layout ๐๏ธ: Flexbox, Grid, positioning, display modes
Animation โจ: CSS animations, transitions, transforms
Responsive ๐ฑ: Container queries, media queries, viewport units
Visual ๐จ: Shadows, gradients, borders, effects
Interaction ๐ฑ๏ธ: Hover states, focus, active, disabled
Logical Properties ๐: Writing-mode aware spacing and sizing
Typography ๐: Font properties, text alignment, spacing
Positioning ๐: Static, relative, absolute, fixed, sticky
Framework-Specific Features
React: Component-scoped styling, CSS-in-JS patterns
Vue: Scoped styles, transition components
Angular: ViewEncapsulation, Material Design integration
Svelte: Built-in scoped styling, reactive CSS
CSS Framework Integration
Tailwind: Utility-first patterns, responsive prefixes
Bootstrap: Grid system, utility classes
Material-UI: Theme customization, sx props
Chakra UI: Design system tokens
๐ Enhanced Browser Support Levels
Excellent (95%+): โ Safe for production use
Good (85%+): โ ๏ธ Consider fallbacks for legacy browsers
Moderate (70%+): โก Use with caution and provide fallbacks
Limited (<70%): ๐ Consider alternative approaches
Experimental (varies): ๐งช Cutting-edge features with progressive enhancement
๐ง Context7 Integration & Automated Feature Discovery
This MCP features automated CSS feature discovery using context7 MCP for MDN documentation. The system continuously discovers and integrates recent CSS features (2021-2025) with intelligent categorization.
Context7 Benefits
Faster Response Times: Pre-processed MDN data with intelligent caching
Structured Information: Better parsing of CSS property details and browser support
Reduced API Calls: Less reliance on direct MDN scraping
Enhanced Reliability: Multi-layered fallback mechanisms ensure service continuity
Automated Feature Discovery
๐ค Auto-Discovery: Automatically finds and categorizes new CSS features from MDN
๐ Intelligent Categorization: Uses semantic analysis to categorize features by type
๐ Continuous Updates: Built-in mechanisms for ongoing feature maintenance
๐ Browser Support Analysis: Automatic extraction of compatibility information
Recently Integrated Features (2021-2025)
๐ Major CSS Features Added
Container Queries (2022): Element-based responsive design with logical units (
cqi,cqb) and style/scroll queriesCSS Nesting (2023): Native CSS nesting without preprocessors
:has() Pseudo-class (2022): Parent selection based on children
Dynamic Viewport Units (2022-2023): Complete logical viewport units (
dvi,dvb,svi,svb,lvi,lvb) with physical fallbackscolor-mix() Function (2021-2024): Advanced color mixing in different color spaces
Scroll-driven Animations (2023-2024): Animations driven by scroll progress
CSS Cascade Layers (2022): Better style organization with @layer
Subgrid (2021-2023): Grid items participating in parent grid
aspect-ratio Property (2021): Native aspect ratio control
Enhanced Math Functions (2021-2023): clamp(), round(), trigonometric functions
๐ฑ Responsive & Modern Layout
CSS Anchor Positioning (2024): Position elements relative to other elements
View Transitions (2023-2024): Smooth page/view transitions
Enhanced Logical Properties: Complete writing-mode aware spacing, sizing, and positioning
Container Style Queries: Query container's computed style values
Container Scroll State Queries: Query container's scroll state
Masonry Layout (Experimental): Pinterest-style layouts
๐จ Visual & Color Enhancements
accent-color: Customize form control colors
color-scheme: Light/dark mode indication
light-dark() Function: Theme-aware color values
backdrop-filter: Glass morphism effects
conic-gradient: Conical gradients for complex designs
corner-shape (Experimental): Superellipse curves for organic, Apple-like rounded corners
Automated Update Commands
Context7 Setup
The MCP automatically detects and uses context7 when available:
Automatic Detection: Checks for context7 MCP in the environment
Graceful Fallback: Falls back to direct MDN integration if context7 unavailable
Performance Optimization: Uses caching and intelligent data processing
Error Handling: Robust error handling with multiple fallback strategies
Logical-First Approach: Automatically prioritizes logical CSS units and properties for internationalization
๐ Logical Units & Internationalization
This MCP implements a logical-first approach to CSS suggestions, prioritizing writing-mode aware properties for better internationalization support.
Logical Units Priority System
Viewport Units (Logical Preferred)
dvi,dvb(dynamic viewport inline/block) โdvw,dvh(physical fallback)svi,svb(small viewport inline/block) โsvw,svh(physical fallback)lvi,lvb(large viewport inline/block) โlvw,lvh(physical fallback)
Container Query Units (Logical Preferred)
cqi,cqb(container query inline/block) โcqw,cqh(physical fallback)
CSS Properties (Logical Preferred)
inline-size,block-sizeโwidth,height(physical fallback)margin-inline,margin-blockโmargin-left/right,margin-top/bottompadding-inline,padding-blockโpadding-left/right,padding-top/bottomborder-inline,border-blockโborder-left/right,border-top/bottominset-inline,inset-blockโleft/right,top/bottom
Advanced Container Queries
Size-based Container Queries (Enhanced)
Style Queries (NEW)
Scroll State Queries (NEW)
Writing-Mode Awareness
RTL Language Support: Logical properties automatically adapt to right-to-left languages
Vertical Writing Modes: Properties work correctly with
writing-mode: vertical-rlInternational Compatibility: Suggestions prioritize globally compatible approaches
License
MIT