Building modern web applications often means encountering browser compatibility issues:
- β Unclear feature support - Not knowing which browsers support your CSS and HTML
- β Runtime surprises - Features breaking in production on older browsers
- β Manual research - Constantly checking MDN and Can I Use for compatibility
- β Guesswork polyfills - Adding unnecessary or missing polyfills
- β Inconsistent baselines - No standardized way to assess browser support
AmICompat MCP automatically analyzes your CSS and HTML code and provides instant Web Baseline compatibility insights using ESLint-based feature detection.
Audit my web project for CSS and HTML compatibility issues using widely available baselineCheck this CSS file for modern features that might need polyfillsAnalyze my HTML code and tell me what browsers support these elementsAmICompat provides:
- π ESLint-based detection - Robust feature detection using web-features data
- π compute-baseline enrichment - Detailed browser support with versions and dates
- π Comprehensive compatibility reports - Full Baseline status with browser versions
- π― Targeted recommendations - Specific baseline violation identification
- π Local processing - Fast analysis using native ESLint rules
- π Rich JSON exports - Detailed compatibility data for integration
- Node.js >= v18.0.0
- Cursor, Claude Code, Windsurf, VS Code, or another MCP Client
AmICompat works out of the box with npx - no installation needed! Just configure your MCP client with the configurations below.
For faster startup times, you can optionally install AmICompat globally:
npm install -g amicompat-mcpThen use "command": "amicompat-mcp" in your configurations instead of the npx commands.
Install in Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}If you installed globally: use
"command": "amicompat-mcp"and"args": []
Install in Claude Code
Run this command. See Claude Code MCP docs for more info.
claude mcp add amicompat-mcp -- npx -y amicompat-mcpInstall in Windsurf
Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in VS Code
Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
"mcp": {
"servers": {
"amicompat-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Cline
- Open Cline.
- Click the hamburger menu icon (β°) to enter the MCP Servers section.
- Choose Local Servers tab.
- Click the Edit Configuration button.
- Add amicompat-mcp to
mcpServers:
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Zed
Add this to your Zed settings.json. See Zed Context Server docs for more info.
{
"context_servers": {
"AmICompat": {
"command": {
"path": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}
}Install in Roo Code
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Gemini CLI
See Gemini CLI Configuration for details.
Add the following to the mcpServers object in your ~/.gemini/settings.json file:
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Claude Desktop
Open Claude Desktop developer settings and edit your claude_desktop_config.json file. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in OpenAI Codex
Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.amicompat-mcp]
args = ["-y", "amicompat-mcp"]
command = "npx"Install in JetBrains AI Assistant
See JetBrains AI Assistant Documentation for more details.
- In JetBrains IDEs, go to
Settings->Tools->AI Assistant->Model Context Protocol (MCP) - Click
+ Add. - Add this configuration and click
OK
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Copilot Coding Agent
Add the following configuration to the mcp section of your Copilot Coding Agent configuration file:
{
"mcpServers": {
"amicompat-mcp": {
"command": "npx",
"args": ["-y", "amicompat-mcp"],
"tools": ["audit_project", "audit_file"]
}
}
}Install in LM Studio
- Navigate to
Program(right side) >Install>Edit mcp.json. - Paste the configuration given below:
{
"mcpServers": {
"AmICompat": {
"command": "npx",
"args": ["-y", "amicompat-mcp"]
}
}
}Install in Perplexity Desktop
- Navigate
Perplexity>Settings - Select
Connectors. - Click
Add Connector. - Select
Advanced. - Enter Server Name:
AmICompat - Paste the following JSON in the text area:
{
"args": ["-y", "amicompat-mcp"],
"command": "npx",
"env": {}
}AmICompat MCP provides the following tools that LLMs can use:
-
audit_project: Comprehensive project-wide compatibility analysisproject_path(required): Path to the project directorytarget(optional): Baseline target (widely,newly)max_files(optional): Maximum number of files to scan (default: 10000)export_path(optional): Path to export JSON report
-
audit_file: Single file compatibility analysisfile_path(required): Path to the CSS or HTML file to analyze
AmICompat uses advanced ESLint-based feature detection to analyze:
- β
Container queries (
@container) - β
:has()selector - β CSS Grid subgrid
- β
Cascade layers (
@layer) - β
Custom properties (
@property) - β
color-mix()function - β CSS nesting
- β
View transitions (
view-transition-name) - β
Anchor positioning (
anchor-name) - β And more modern CSS features
- β
Dialog element (
<dialog>) - β
Search element (
<search>) - β
Popover API (
<popover>) - β Lazy loading attributes
- β Modern input types
- β Web components
- β ARIA attributes
- β And more semantic HTML5+ features
Choose your compatibility target:
widely: High baseline - features widely supported across browsersnewly: Features available in newest browser versions
Run a baseline compatibility audit on my web project for widely available features and export the results to compatibility-report.jsonAnalyze this CSS file for container query usage and browser supportAdd this rule to your MCP client for automatic compatibility checking:
Always run compatibility analysis with AmICompat when I'm working with modern CSS features,
container queries, CSS Grid, HTML elements, or when I mention browser support concerns.
Use 'widely' as the default target unless specified otherwise.π― Baseline Compatibility Report
π Summary:
Target: widely
Features Detected: 3
Baseline Violations: 3
Files Scanned: 2
π Detected Features:
β’ CSS backdrop-filter property (2 locations)
β’ CSS outline property (1 location)
{
"project_path": "/path/to/project",
"target": "widely",
"features_detected": [
{
"feature": "CSS backdrop-filter property",
"locations": [...],
"detailed_support": {
"baseline_status": "low",
"baseline_low_date": "2024-09-16",
"browser_support": {
"chrome": "76",
"firefox": "103",
"safari": "18",
"edge": "79"
},
"discouraged": false
}
}
]
}AmICompat also provides a command-line interface:
# Show server information
npx amicompat-mcp info
# Test parser on a file
npx amicompat-mcp test-parse ./src/styles.css
# Audit a project
npx amicompat-mcp audit ./my-project --target widely
# Start MCP server (default)
npx amicompat-mcpAmICompat includes a comprehensive test suite:
npm test # Run all tests
npm run test:coverage # Run with coverage report
npm run test:integration # Integration tests only
npm run test:cli # Test CLI functionality- Unit Tests: ESLint wrapper, file walker, type validation
- Integration Tests: CLI interface, MCP tools end-to-end functionality
- Feature Detection: CSS and HTML feature detection tests
- Error Handling: Edge cases, malformed code, missing files
- TypeScript Native: Built with modern TypeScript and strict type checking
- Hybrid Detection: ESLint detection + compute-baseline enrichment for maximum accuracy
- Native Baseline Rules: Uses
@eslint/cssand@html-eslintbuilt-inuse-baselinerules - web-features Powered: ESLint plugins natively integrate web-features for Baseline validation
- Browser Compatibility Data: Real-time enrichment with BCD via compute-baseline
- Zod Validation: Type-safe MCP tool inputs and outputs
- Rich Data Export: Comprehensive JSON reports with browser versions and dates
- π Robust Detection: ESLint handles syntax parsing with web-features validation
- π Rich Data: compute-baseline provides detailed browser support information
- β‘ Performance: Local processing with native ESLint + BCD data
- π― Accuracy: Double-validation via ESLint detection + compute-baseline analysis
- π Comprehensive: Both detection and detailed compatibility in one tool
AmICompat leverages the native Baseline support in ESLint plugins:
@eslint/css- CSS plugin with built-inuse-baselinerule powered by web-features data@html-eslint- HTML plugin with built-inuse-baselinerule powered by web-features data- web-features integration - ESLint plugins automatically validate against curated Baseline features
- Seamless detection - No custom parsing needed, ESLint handles all syntax variations with Baseline awareness
src/
βββ types/index.ts # Zod schemas, TypeScript types + DetailedSupport
βββ lib/
β βββ eslint-wrapper.ts # ESLint detection + compute-baseline enrichment
β βββ walker.ts # File system walker with filtering
βββ tools/index.ts # MCP tools implementation
βββ server.ts # Main MCP server
βββ cli.ts # CLI interface with test commands
We welcome contributions! Here's how to get started:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
npm install - Run tests:
npm test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
MIT License. See LICENSE for details.
- MCP TypeScript SDK - Native MCP implementation
- ESLint - Robust CSS and HTML feature detection
- @eslint/css - CSS feature detection with use-baseline rule
- @html-eslint - HTML feature detection with use-baseline rule
- compute-baseline - Browser compatibility data enrichment
- @mdn/browser-compat-data - Comprehensive browser compatibility database
- web-features - Curated web platform features dataset
- Zod - Runtime type validation
AmICompat MCP - Be compatible regardless of the browser πβ¨